Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UAATokenResponse ¶
type UAATokenResponse struct { AccessToken string `json:"access_token"` ExpiresIn int `json:"expires_in"` Jti string `json:"jti"` Scope string `json:"scope"` TokenType string `json:"token_type"` }
UAATokenResponse is the struct version of the json /oauth/token gives us when we ask for client credentials.
type UaaClientCredentials ¶
type UaaClientCredentials struct {
// contains filtered or unexported fields
}
UaaClientCredentials provides a token for a given clientId and clientSecret. The token is refreshed for you according to expires_in
func New ¶
func New(uaaURI *url.URL, skipSSLValidation bool, clientID string, clientSecret string) (*UaaClientCredentials, error)
New UaaClientCredentials factory
func (*UaaClientCredentials) GetBearerToken ¶
func (creds *UaaClientCredentials) GetBearerToken() (string, error)
GetBearerToken returns a currently valid bearer token to use against the CF API. You should not cache the token as the library will handle updating it if it's expired. This API will return an empty string and an error if there was a problem aquiring a token from UAA
Click to show internal directories.
Click to hide internal directories.