oidc

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: 16 Imported by: 0

Documentation

Index

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.

Jump to

Keyboard shortcuts

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