Documentation
¶
Index ¶
- type Config
- func (i Config) AuthorizeClientCredentials() (string, error)
- func (i Config) AuthorizeJWTExchange() (TokenInfo, error)
- func (i Config) AuthorizeService() (string, error)
- func (i Config) AuthorizeUser() (string, error)
- func (i Config) ClusterExchange() (TokenInfo, error)
- func (i Config) DecodeToken() ([]string, error)
- func (i Config) GetAdminOrganizations() (string, error)
- func (i Config) GetAdminProfile() (string, error)
- func (i Config) GetOrganizations() (string, error)
- func (i Config) GetProfile() (string, error)
- func (i Config) InvalidateToken() error
- func (i Config) Refresh() (RefreshInfo, error)
- func (i Config) ValidateToken() (TokenInfo, error)
- type RefreshInfo
- type TokenInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
URL string
ClientID string
ClientSecret string
PrivateKeyPath string
Organization string
Account string
Scopes []string
Metascopes []string
AccessToken string
RefreshToken string
DeviceToken string
ServiceToken string
AuthorizationCode string
ProfileApiVersion string
OrgsApiVersion string
Timeout int
ProxyURL string
ProxyIgnoreTLS bool
PublicClient bool
UserID string
Cascading bool
Token string
Port int
PKCE bool
FullOutput bool
Guid string
AuthSrc string
DecodeFulfillableData bool
}
func (Config) AuthorizeClientCredentials ¶
AuthorizeClientCredentials : Client Credentials OAuth flow
func (Config) AuthorizeJWTExchange ¶
func (Config) AuthorizeService ¶
AuthorizeService : Login for the service to service IMS flow
func (Config) AuthorizeUser ¶
AuthorizeUser uses the standard Oauth2 authorization code grant flow. The Oauth2 configuration is taken from the Config struct.
func (Config) ClusterExchange ¶
ClusterExchange performs the Cluster Access Token Exchange grant flow
func (Config) DecodeToken ¶
func (Config) GetAdminOrganizations ¶
GetAdminOrganizations requests the user's organizations using the admin API and a service token.
func (Config) GetAdminProfile ¶
GetAdminProfile requests the user profile using an access token.
func (Config) GetOrganizations ¶
GetOrganizations requests the user's organizations using an access token.
func (Config) GetProfile ¶
GetProfile requests the user profile using an access token.
func (Config) InvalidateToken ¶
InvalidateToken Invalidates the token provided in the configuration using the IMS API.
func (Config) Refresh ¶
func (i Config) Refresh() (RefreshInfo, error)
Refresh performs the refresh token flow.
func (Config) ValidateToken ¶
ValidateToken Validates the token provided in the configuration using the IMS API. Return the endpoint response or an error.