Documentation ¶
Overview ¶
Package uaa is a GoLang library that interacts with CloudFoundry User Account and Authentication (UAA) Server.
It is currently designed to support UAA API X.X.X. However, it may include features and endpoints of later API versions.
Index ¶
- type AuthenticationStore
- type Client
- type Config
- type ConflictError
- type Connection
- type ConnectionWrapper
- type InsufficientScopeError
- type InvalidAuthTokenError
- type InvalidSCIMResourceError
- type RawHTTPStatusError
- type RefreshTokenResponse
- type RequestError
- type Response
- type UAAConnection
- type UAAErrorResponse
- type UnverifiedServerError
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthenticationStore ¶
type AuthenticationStore interface { UAAOAuthClient() string UAAOAuthClientSecret() string AccessToken() string RefreshToken() string SetAccessToken(token string) SetRefreshToken(token string) }
AuthenticationStore represents the storage the UAA client
type Client ¶
type Client struct { URL string // contains filtered or unexported fields }
Client is the UAA client
func (*Client) AccessToken ¶
AccessToken returns the implicit grant access token
func (*Client) RefreshToken ¶
RefreshToken refreshes the current access token
func (*Client) WrapConnection ¶
func (client *Client) WrapConnection(wrapper ConnectionWrapper)
WrapConnection wraps the current Client connection in the wrapper.
type Config ¶
type Config struct { AppName string AppVersion string DialTimeout time.Duration SkipSSLValidation bool Store AuthenticationStore URL string }
Config allows the Client to be configured
type ConflictError ¶
type ConflictError struct {
Message string
}
ConflictError is returned when the response status code is 409. It represents when there is a conflict in the state of the requested resource.
func (ConflictError) Error ¶
func (e ConflictError) Error() string
type Connection ¶
Connection creates and executes http requests
type ConnectionWrapper ¶
type ConnectionWrapper interface { Connection Wrap(innerconnection Connection) Connection }
ConnectionWrapper can wrap a given connection allowing the wrapper to modify all requests going in and out of the given connection.
type InsufficientScopeError ¶
type InsufficientScopeError struct {
Message string
}
InsufficientScopeError is returned when the client has insufficient scope
func (InsufficientScopeError) Error ¶
func (e InsufficientScopeError) Error() string
type InvalidAuthTokenError ¶
type InvalidAuthTokenError struct {
Message string
}
InvalidAuthTokenError is returned when the client has an invalid authorization header.
func (InvalidAuthTokenError) Error ¶
func (e InvalidAuthTokenError) Error() string
type InvalidSCIMResourceError ¶
type InvalidSCIMResourceError struct {
Message string
}
InvalidSCIMResourceError is returned usually when the client tries to create an inproperly formatted username
func (InvalidSCIMResourceError) Error ¶
func (e InvalidSCIMResourceError) Error() string
type RawHTTPStatusError ¶
RawHTTPStatusError represents any response with a 4xx or 5xx status code.
func (RawHTTPStatusError) Error ¶
func (r RawHTTPStatusError) Error() string
type RefreshTokenResponse ¶
type RefreshTokenResponse struct { AccessToken string `json:"access_token"` RefreshToken string `json:"refresh_token"` TokenType string `json:"token_type"` }
RefreshTokenResponse represents the UAA refresh token response
func (RefreshTokenResponse) AuthorizationToken ¶
func (refreshTokenResponse RefreshTokenResponse) AuthorizationToken() string
AuthorizationToken returns formatted authorization header
type RequestError ¶
type RequestError struct {
Err error
}
RequestError represents a generic error encountered while performing the HTTP request. This generic error occurs before a HTTP response is obtained.
func (RequestError) Error ¶
func (e RequestError) Error() string
type Response ¶
type Response struct { // Result represents the resource entity type that is expected in the // response JSON. Result interface{} // RawResponse represents the response body. RawResponse []byte // HTTPResponse represents the HTTP response object. HTTPResponse *http.Response }
Response represents an UAA response object.
type UAAConnection ¶
UAAConnection represents the connection to UAA
func NewConnection ¶
func NewConnection(skipSSLValidation bool, dialTimeout time.Duration) *UAAConnection
NewConnection returns a pointer to a new UAA Connection
type UAAErrorResponse ¶
type UAAErrorResponse struct { Type string `json:"error"` Description string `json:"error_description"` }
UAAErrorResponse represents a generic UAA error response.
func (UAAErrorResponse) Error ¶
func (e UAAErrorResponse) Error() string
type UnverifiedServerError ¶
type UnverifiedServerError struct {
URL string
}
UnverifiedServerError replaces x509.UnknownAuthorityError when the server has SSL but the client is unable to verify it's certificate
func (UnverifiedServerError) Error ¶
func (e UnverifiedServerError) Error() string
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter
|
This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter |
wrapperfakes
This file was generated by counterfeiter This file was generated by counterfeiter
|
This file was generated by counterfeiter This file was generated by counterfeiter |