userpool

package
v0.0.0-...-9592e8f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 16, 2019 License: GPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChallengeResponse

type ChallengeResponse struct {
	Name    string
	Session string
}

ChallengeResponse struct

type LoginHandler

type LoginHandler struct {
	// contains filtered or unexported fields
}

LoginHandler handles cognito user pool functions.

func NewLoginHandler

func NewLoginHandler(tokenCache oauth.TokenCache, cognitoConfig *config.Config, cognitoIdentityProvider *cognitoidentityprovider.CognitoIdentityProvider, credentialsResolver *awscreds.CredentialsResolver) LoginHandler

NewLoginHandler creates a new login handler.

func (*LoginHandler) ChangePasswordChallenge

func (r *LoginHandler) ChangePasswordChallenge(username string, password string, sess string) (awscreds.Credentials, error)

ChangePasswordChallenge responds to a change password challenge.

func (*LoginHandler) Login

func (r *LoginHandler) Login(username string, password string) (awscreds.Credentials, ChallengeResponse, error)

Login logs in a user with username and password.

type LogoutHandler

type LogoutHandler struct {
	// contains filtered or unexported fields
}

LogoutHandler struct.

func NewLogoutHandler

func NewLogoutHandler(credentialsCache awscreds.CredentialsCache, tokenCache oauth.TokenCache, tokensResolver *oauth.TokensResolver, cognitoIdentityProvider *cognitoidentityprovider.CognitoIdentityProvider) *LogoutHandler

NewLogoutHandler creates a logout handler.

func (*LogoutHandler) Logout

func (r *LogoutHandler) Logout() error

Logout logs out the current user.

type PasswordResetter

type PasswordResetter struct {
	CognitoConfig config.Config
	// contains filtered or unexported fields
}

PasswordResetter type

func NewPasswordResetter

func NewPasswordResetter(cognitoConfig *config.Config, identityProvider *cognitoidentityprovider.CognitoIdentityProvider) *PasswordResetter

NewPasswordResetter creates a new password resetter.

func (*PasswordResetter) ConfirmResetPassword

func (r *PasswordResetter) ConfirmResetPassword(username string, password string, code string) error

ConfirmResetPassword confirms the password reset.

func (*PasswordResetter) InitResetPassword

func (r *PasswordResetter) InitResetPassword(username string) error

InitResetPassword initiates the password reset flow.

type TokensRefresher

type TokensRefresher struct {
	// contains filtered or unexported fields
}

TokensRefresher struct

func NewTokensRefresher

func NewTokensRefresher(cognitoConfig *config.Config, tokenCache oauth.TokenCache, cognitoIdentityProvider *cognitoidentityprovider.CognitoIdentityProvider) *TokensRefresher

NewTokensRefresher creates a new tokens refresher.

func (*TokensRefresher) RefreshOAuthTokens

func (r *TokensRefresher) RefreshOAuthTokens(refreshToken string) (oauth.Tokens, error)

RefreshOAuthTokens refreshes the oauth tokens, and saves them to file.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL