authentication

package
v0.0.0-...-84e757a Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2017 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IAMTokenEndpoint

func IAMTokenEndpoint(apiEndpoint string) string

Types

type IAMAuthRepository

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

func NewIAMAuthRepository

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

func (*IAMAuthRepository) AuthenticateAPIKey

func (auth *IAMAuthRepository) AuthenticateAPIKey(apiKey string) error

func (*IAMAuthRepository) AuthenticatePassword

func (auth *IAMAuthRepository) AuthenticatePassword(username string, password string) error

func (*IAMAuthRepository) AuthenticateSSO

func (auth *IAMAuthRepository) AuthenticateSSO(passcode string) error

func (*IAMAuthRepository) LinkAccounts

func (auth *IAMAuthRepository) LinkAccounts(updatedAccounts core_config.AccountsInfo) error

func (*IAMAuthRepository) RefreshToken

func (auth *IAMAuthRepository) RefreshToken() (string, error)

type IAMError

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

func (IAMError) Description

func (e IAMError) Description() string

type IAMTokenResponse

type IAMTokenResponse struct {
	AccessToken     string `json:"access_token"`
	RefreshToken    string `json:"refresh_token"`
	UAAAccessToken  string `json:"uaa_token"`
	UAARefreshToken string `json:"uaa_refresh_token"`
	TokenType       string `json:"token_type"`
}

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 UAAError

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

type UAARepository

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

func NewUAARepository

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

func (*UAARepository) AuthenticateAPIKey

func (auth *UAARepository) AuthenticateAPIKey(apiKey string) error

func (*UAARepository) AuthenticatePassword

func (auth *UAARepository) AuthenticatePassword(username string, password string) error

func (*UAARepository) AuthenticateSSO

func (auth *UAARepository) AuthenticateSSO(passcode string) error

func (*UAARepository) RefreshToken

func (auth *UAARepository) RefreshToken() (string, error)

type UAATokenResponse

type UAATokenResponse struct {
	AccessToken  string `json:"access_token"`
	TokenType    string `json:"token_type"`
	RefreshToken string `json:"refresh_token"`
}

Jump to

Keyboard shortcuts

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