Documentation ¶
Index ¶
- func CheckRegistrationToken(store cache.Store, signature string) (string, error)
- func CheckResetConsumerToken(store cache.Store, signature string) (string, error)
- func CleanResetConsumerToken(store cache.Store, consumerID string)
- func CleanVerifyConsumerToken(store cache.Store, consumerID string)
- func CompareHashAndPassword(hash []byte, password string) error
- func DeleteRegistrationByID(db gorp.SqlExecutor, id string) error
- func HashPassword(password string) ([]byte, error)
- func InsertRegistration(ctx context.Context, db gorpmapper.SqlExecutorWithTx, ur *sdk.UserRegistration) error
- func LoadRegistrationByID(ctx context.Context, db gorp.SqlExecutor, id string) (*sdk.UserRegistration, error)
- func NewConsumer(ctx context.Context, db gorpmapper.SqlExecutorWithTx, userID string) (*sdk.AuthUserConsumer, error)
- func NewConsumerWithHash(ctx context.Context, db gorpmapper.SqlExecutorWithTx, userID, hash string) (*sdk.AuthUserConsumer, error)
- func NewDriver(ctx context.Context, signupDisabled bool, uiURL, allowedDomains string, ...) sdk.AuthDriver
- func NewRegistrationToken(store cache.Store, regID string, isFirstConnection bool) (string, error)
- func NewResetConsumerToken(store cache.Store, consumerID string) (string, error)
- type AuthDriver
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckRegistrationToken ¶
CheckRegistrationToken checks that the given signature is a valid registration token.
func CheckResetConsumerToken ¶
CheckResetConsumerToken checks that the given signature is a valid reset consumer token.
func CleanResetConsumerToken ¶
CleanResetConsumerToken deletes a consumer reset token from cache if exists.
func CleanVerifyConsumerToken ¶
CleanVerifyConsumerToken deletes a consumer verify token from cache if exists.
func CompareHashAndPassword ¶
CompareHashAndPassword returns an error if given password don't match given hash.
func DeleteRegistrationByID ¶
func DeleteRegistrationByID(db gorp.SqlExecutor, id string) error
DeleteRegistrationByID removes a user registration in database for given id.
func HashPassword ¶
HashPassword return a hash from given password.
func InsertRegistration ¶
func InsertRegistration(ctx context.Context, db gorpmapper.SqlExecutorWithTx, ur *sdk.UserRegistration) error
InsertRegistration in database.
func LoadRegistrationByID ¶
func LoadRegistrationByID(ctx context.Context, db gorp.SqlExecutor, id string) (*sdk.UserRegistration, error)
LoadRegistrationByID returns an user registration from database.
func NewConsumer ¶
func NewConsumer(ctx context.Context, db gorpmapper.SqlExecutorWithTx, userID string) (*sdk.AuthUserConsumer, error)
NewConsumer returns a new local consumer for given data.
func NewConsumerWithHash ¶
func NewConsumerWithHash(ctx context.Context, db gorpmapper.SqlExecutorWithTx, userID, hash string) (*sdk.AuthUserConsumer, error)
NewConsumerWithHash returns a new local consumer with given hash.
func NewDriver ¶
func NewDriver(ctx context.Context, signupDisabled bool, uiURL, allowedDomains string, orga string) sdk.AuthDriver
NewDriver returns a new initialized driver for local authentication.
func NewRegistrationToken ¶
NewRegistrationToken returns a new token for given registration id.
Types ¶
type AuthDriver ¶
type AuthDriver struct {
// contains filtered or unexported fields
}
AuthDriver for local authentication.
func (AuthDriver) GetDriver ¶ added in v0.53.0
func (d AuthDriver) GetDriver() sdk.Driver
func (AuthDriver) GetManifest ¶
func (d AuthDriver) GetManifest() sdk.AuthDriverManifest
GetManifest .
func (AuthDriver) GetSessionDuration ¶
func (d AuthDriver) GetSessionDuration() time.Duration
GetSessionDuration .
func (AuthDriver) GetUserInfo ¶
func (d AuthDriver) GetUserInfo(ctx context.Context, req sdk.AuthConsumerSigninRequest) (sdk.AuthDriverUserInfo, error)
GetUserInfo .