authentication

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2018 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IAMAuthRepository

type IAMAuthRepository interface {
	AuthenticatePassword(username string, password string) (iamToken Token, err error)
	AuthenticateSSO(passcode string) (iamToken Token, err error)
	AuthenticateAPIKey(apiKey string) (iamToken Token, err error)
	GetUAAToken(iamAccessToken string) (uaaToken Token, err error)
	RefreshToken(refreshToken string) (iamToken Token, err error)
	RefreshTokenToLinkAccounts(refreshToken string, accounts core_config.AccountsInfo) (iamToken Token, err error)
	RefreshTokenToLinkAccountsAndGetUAAToken(refreshToken string, accounts core_config.AccountsInfo) (iamToken, uaaToken Token, err error)
}

func NewIAMAuthRepository

func NewIAMAuthRepository(config *IAMConfig, client *rest.Client) IAMAuthRepository

type IAMConfig

type IAMConfig struct {
	// the token endpoint. for example: https://iam.example.com/indentity/token
	TokenEndpoint string
}

type IAMError

type IAMError struct {
	ErrorCode    string `json:"errorCode"`
	ErrorMessage string `json:"errorMessage"`
	ErrorDetails string `json:"errorDetails"`
}

type InvalidTokenError

type InvalidTokenError struct {
	Description string
}

func NewInvalidTokenError

func NewInvalidTokenError(description string) *InvalidTokenError

func (*InvalidTokenError) Error

func (e *InvalidTokenError) Error() string

type ServerError

type ServerError struct {
	StatusCode  int
	ErrorCode   string
	Description string
}

func NewServerError

func NewServerError(statusCode int, errorCode string, description string) *ServerError

func (*ServerError) Error

func (s *ServerError) Error() string

type Token

type Token struct {
	AccessToken  string
	RefreshToken string
	TokenType    string
}

func (Token) Token

func (t Token) Token() string

type UAAConfig

type UAAConfig struct {
	UAAEndpoint string
}

type UAAError

type UAAError struct {
	ErrorCode   string `json:"error"`
	Description string `json:"error_description"`
}

type UAARepository

type UAARepository interface {
	AuthenticatePassword(username string, password string) (Token, error)
	AuthenticatePasswordAndConnectIAM(username string, password string, iamAccessToken string) (Token, error)
	AuthenticateSSO(passcode string) (Token, error)
	AuthenticateSSOAndConnectIAM(passcode string, iamAccessToken string) (Token, error)
	AuthenticateAPIKey(apiKey string) (Token, error)
	AuthenticateWithIAMToken(iamAccessToken string) (Token, error)
	DisconnectIAM(uaaToken string) error
	RefreshToken(uaaRefreshToken string) (Token, error)
}

func NewUAARepository

func NewUAARepository(config *UAAConfig, client *rest.Client) UAARepository

Jump to

Keyboard shortcuts

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