Documentation
¶
Overview ¶
Package identityservice owns remote account and credential policies.
Index ¶
- Constants
- Variables
- type Account
- type CreatedToken
- type PasswordCredential
- type Purpose
- type Service
- func (service *Service) Accounts(ctx context.Context) ([]Account, error)
- func (service *Service) AuthenticateSession(ctx context.Context, secret string) (Session, error)
- func (service *Service) AuthenticateToken(ctx context.Context, secret string) (TokenIdentity, error)
- func (service *Service) Bootstrap(ctx context.Context, username, password string) (Account, error)
- func (service *Service) ChangePassword(ctx context.Context, accountID, current, password string) error
- func (service *Service) CreateToken(ctx context.Context, accountID, name string, purpose Purpose, ...) (CreatedToken, error)
- func (service *Service) Login(ctx context.Context, username, password string) (Session, error)
- func (service *Service) Logout(ctx context.Context, secret string) error
- func (service *Service) Provision(ctx context.Context, username, password string) (Account, error)
- func (service *Service) ResetPassword(ctx context.Context, username, password string) error
- func (service *Service) RevokeToken(ctx context.Context, accountID, tokenID string) error
- func (service *Service) Tokens(ctx context.Context, accountID string) ([]Token, error)
- type Session
- type Store
- type Token
- type TokenIdentity
Constants ¶
Variables ¶
Functions ¶
This section is empty.
Types ¶
type CreatedToken ¶
type PasswordCredential ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) AuthenticateSession ¶
func (*Service) AuthenticateToken ¶
func (*Service) ChangePassword ¶
func (*Service) CreateToken ¶
func (*Service) ResetPassword ¶
func (*Service) RevokeToken ¶
type Store ¶
type Store interface {
CreateAccount(context.Context, Account, string, bool, time.Time) (Account, error)
AccountPassword(context.Context, string) (PasswordCredential, error)
AccountPasswordByID(context.Context, string) (PasswordCredential, error)
ReplacePassword(context.Context, string, string, string) error
CreateSession(context.Context, string, string, string, string, time.Time) error
ResolveSession(context.Context, string, time.Time) (Session, error)
DeleteSession(context.Context, string) error
CreateIdentityToken(context.Context, string, Token, string) error
IdentityTokens(context.Context, string) ([]Token, error)
DeleteIdentityToken(context.Context, string, string) error
ResolveIdentityToken(context.Context, string, time.Time) (TokenIdentity, error)
IdentityAccounts(context.Context) ([]Account, error)
}
Store operations preserve credential races atomically. Password replacement revokes sessions in its transaction; session creation compares the verified hash.
Click to show internal directories.
Click to hide internal directories.