Documentation ¶
Index ¶
- Constants
- type AuthnStore
- func (s *AuthnStore) Authenticate(email, password string) (token string, err error)
- func (s *AuthnStore) CheckToken(r *http.Request, token string) (*http.Request, *auth.Claims, error)
- func (s *AuthnStore) Close()
- func (s *AuthnStore) Exist(email string) bool
- func (s *AuthnStore) Filepath() string
- func (s *AuthnStore) Flush() error
- func (s *AuthnStore) InternalState() string
- func (s *AuthnStore) Len() int
- func (s *AuthnStore) ListUsers() (users [][]string, err error)
- func (s *AuthnStore) RemoveUser(email string) error
- func (s *AuthnStore) SetName(email, name string) error
- func (s *AuthnStore) SetPassword(email, password string) error
- type AuthzStore
- func (s *AuthzStore) AddPolicy(email, act string) error
- func (s *AuthzStore) Authorized(r *http.Request, email, scope string) (bool, error)
- func (s *AuthzStore) Close()
- func (s *AuthzStore) Flush() error
- func (s *AuthzStore) ListPolicies(email string) (scopes []string, err error)
- func (s *AuthzStore) RemovePolicy(email, act string) error
Constants ¶
View Source
const DefaultTokenDuration time.Duration = time.Hour * 24 * 90 // 90 days
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthnStore ¶
type AuthnStore struct { ErrChan chan error // contains filtered or unexported fields }
func NewAuthnStore ¶
func (*AuthnStore) Authenticate ¶
func (s *AuthnStore) Authenticate(email, password string) (token string, err error)
func (*AuthnStore) CheckToken ¶
func (*AuthnStore) Close ¶ added in v0.7.0
func (s *AuthnStore) Close()
func (*AuthnStore) Exist ¶
func (s *AuthnStore) Exist(email string) bool
func (*AuthnStore) Filepath ¶
func (s *AuthnStore) Filepath() string
func (*AuthnStore) Flush ¶
func (s *AuthnStore) Flush() error
func (*AuthnStore) InternalState ¶
func (s *AuthnStore) InternalState() string
InternalState returns internal state as a CSV string for debugging purpose
func (*AuthnStore) Len ¶
func (s *AuthnStore) Len() int
func (*AuthnStore) ListUsers ¶
func (s *AuthnStore) ListUsers() (users [][]string, err error)
func (*AuthnStore) RemoveUser ¶
func (s *AuthnStore) RemoveUser(email string) error
func (*AuthnStore) SetName ¶
func (s *AuthnStore) SetName(email, name string) error
func (*AuthnStore) SetPassword ¶
func (s *AuthnStore) SetPassword(email, password string) error
type AuthzStore ¶
type AuthzStore struct { ErrChan chan error // contains filtered or unexported fields }
func NewAuthzStore ¶
func NewAuthzStore(rd *local.RepoDir) (s *AuthzStore, err error)
func (*AuthzStore) AddPolicy ¶
func (s *AuthzStore) AddPolicy(email, act string) error
func (*AuthzStore) Authorized ¶
func (*AuthzStore) Close ¶ added in v0.7.0
func (s *AuthzStore) Close()
func (*AuthzStore) Flush ¶
func (s *AuthzStore) Flush() error
func (*AuthzStore) ListPolicies ¶
func (s *AuthzStore) ListPolicies(email string) (scopes []string, err error)
func (*AuthzStore) RemovePolicy ¶
func (s *AuthzStore) RemovePolicy(email, act string) error
Click to show internal directories.
Click to hide internal directories.