authentication

package
v0.0.0-...-a3be206 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2024 License: Apache-2.0 Imports: 7 Imported by: 104

Documentation

Index

Constants

View Source
const (
	//ErrCodeInvalidToken  ...
	ErrCodeInvalidToken = "InvalidToken"
)

Variables

This section is empty.

Functions

func PopulateTokens

func PopulateTokens(tokenProvider client.TokenProvider, c *bluemix.Config) error

PopulateTokens populate the relevant tokens in the bluemix Config using the token provider

Types

type IAMAuthRepository

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

IAMAuthRepository ...

func NewIAMAuthRepository

func NewIAMAuthRepository(config *bluemix.Config, client *rest.Client) (*IAMAuthRepository, error)

NewIAMAuthRepository ...

func (*IAMAuthRepository) AuthenticateAPIKey

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

AuthenticateAPIKey ...

func (*IAMAuthRepository) AuthenticatePassword

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

AuthenticatePassword ...

func (*IAMAuthRepository) AuthenticateSSO

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

AuthenticateSSO ...

func (*IAMAuthRepository) GetPasscode

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

GetPasscode ...

func (*IAMAuthRepository) RefreshToken

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

RefreshToken ...

type IAMError

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

IAMError ...

func (IAMError) Description

func (e IAMError) Description() string

Description ...

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"`
}

IAMTokenResponse ...

type UAAError

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

UAAError ...

type UAARepository

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

UAARepository ...

func NewUAARepository

func NewUAARepository(config *bluemix.Config, client *rest.Client) (*UAARepository, error)

NewUAARepository ...

func (*UAARepository) AuthenticateAPIKey

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

AuthenticateAPIKey ...

func (*UAARepository) AuthenticatePassword

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

AuthenticatePassword ...

func (*UAARepository) AuthenticateSSO

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

AuthenticateSSO ...

func (*UAARepository) GetPasscode

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

GetPasscode ...

func (*UAARepository) RefreshToken

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

RefreshToken ...

type UAATokenResponse

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

UAATokenResponse ...

Jump to

Keyboard shortcuts

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