Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetDefaultClient ¶
func SetDefaultClient(c Service)
SetDefaultClient set auth client that will be returned by auth.DefaultClient
Types ¶
type Client ¶
type Client struct { URL string // contains filtered or unexported fields }
Client used to access auth service
func (*Client) CreateRedirectURL ¶
CreateRedirectURL gets us the URI which we are supposed to use to logging in with fabric8-auth Client on giving auth Client URL and redirectURL as input.
func (*Client) OSOTokenForCluster ¶
OSOTokenForCluster returns Openshift online token given the clusterURL and raw JWT token
type MockAuth ¶
type MockAuth struct {
URL string
}
MockAuth is a mock implementation of auth service
func NewMockAuth ¶
NewMockAuth creates a mock auth client
func (*MockAuth) CreateRedirectURL ¶
CreateRedirectURL gets us the URI which we are supposed to use to logging in with fabric8-auth Client on giving auth Client URL and redirectURL as input.
func (*MockAuth) OSOTokenForCluster ¶
OSOTokenForCluster returns Openshift online token given the clusterURL and raw JWT token
type Service ¶
type Service interface { UIDFromToken(accessToken string) (sub string, err error) OSOTokenForCluster(clusterURL, accessToken string) (osoToken string, err error) CreateRedirectURL(to string) string }
Service talks to fabric8-auth for authentication and authorization
func DefaultClient ¶
DefaultClient returns default auth client
type TokenJSON ¶
type TokenJSON struct { AccessToken string `json:"access_token"` RefreshToken string `json:"refresh_token"` TokenType string `json:"token_type"` ExpiresIn int `json:"expires_in"` RefreshExpiresIn int `json:"refresh_expires_in"` Errors []util.ErrorInfo }
TokenJSON represents a JSON Web Token