Documentation ¶
Index ¶
- type LoginHandler
- func CreateLoginHandler(cognitoConfig *config.Config, sess client.ConfigProvider, ...) *LoginHandler
- func CreateLoginHandlerFileCache(cognitoConfig *config.Config, sess *session.Session, cacheDir string) *LoginHandler
- func CreateLoginHandlerKeychainCache(cognitoConfig *config.Config, sess *session.Session, username string) *LoginHandler
- func NewLoginHandler(config *config.Config, tokensCache oauth.TokenCache, ...) *LoginHandler
- type TokensRefresher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LoginHandler ¶
type LoginHandler struct {
// contains filtered or unexported fields
}
LoginHandler struct
func CreateLoginHandler ¶
func CreateLoginHandler(cognitoConfig *config.Config, sess client.ConfigProvider, tokenCache oauth.TokenCache, awscredsCache awscreds.CredentialsCache) *LoginHandler
CreateLoginHandler creates a login handler.
func CreateLoginHandlerFileCache ¶
func CreateLoginHandlerFileCache(cognitoConfig *config.Config, sess *session.Session, cacheDir string) *LoginHandler
CreateLoginHandlerFileCache creates a login handler with a file cache.
func CreateLoginHandlerKeychainCache ¶
func CreateLoginHandlerKeychainCache(cognitoConfig *config.Config, sess *session.Session, username string) *LoginHandler
CreateLoginHandlerKeychainCache creates a login handler with a keychain cache.
func NewLoginHandler ¶
func NewLoginHandler(config *config.Config, tokensCache oauth.TokenCache, credentialsResolver *awscreds.CredentialsResolver) *LoginHandler
NewLoginHandler creates a new login handler
func (*LoginHandler) GetAuthCodeURL ¶
func (l *LoginHandler) GetAuthCodeURL() (string, string)
GetAuthCodeURL gets the authorisation code URL.
func (*LoginHandler) Handle ¶
func (l *LoginHandler) Handle(state string) (awscreds.Credentials, error)
Handle handles the OAuth2 code flow.
func (*LoginHandler) Login ¶
func (l *LoginHandler) Login(code string) (awscreds.Credentials, error)
Login logs in a user with the authorization code.
type TokensRefresher ¶
type TokensRefresher struct {
// contains filtered or unexported fields
}
TokensRefresher struct
func NewTokensRefresher ¶
func NewTokensRefresher(cognitoConfig *config.Config, tokensCache oauth.TokenCache) *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.
Click to show internal directories.
Click to hide internal directories.