Documentation
¶
Overview ¶
Package ims implements the core business logic for interacting with the Adobe Identity Management System (IMS) API. It provides functions for authorization flows, token management, profile retrieval, and client registration.
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) AuthorizeUserPKCE() (string, error)
- func (i Config) ClusterExchange() (TokenInfo, error)
- func (i Config) DCRRegister() (string, error)
- func (i Config) DecodeToken() (*DecodedToken, 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) OBOExchange() (TokenInfo, error)
- func (i Config) Refresh() (RefreshInfo, error)
- func (i Config) ValidateToken() (TokenInfo, error)
- type DecodedToken
- 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
FullOutput bool
Verbose bool
Guid string
AuthSrc string
DecodeFulfillableData bool
ClientName string
RedirectURIs []string
}
Config holds all parameters needed to interact with the IMS API. Fields are populated from CLI flags, environment variables, or a config file.
func (Config) AuthorizeClientCredentials ¶ added in v0.7.0
AuthorizeClientCredentials performs the Client Credentials OAuth flow.
func (Config) AuthorizeJWTExchange ¶
AuthorizeJWTExchange performs the JWT Bearer exchange flow.
func (Config) AuthorizeService ¶
AuthorizeService performs the service-to-service IMS authorization flow.
func (Config) AuthorizeUser ¶
AuthorizeUser uses the standard OAuth2 authorization code grant flow.
func (Config) AuthorizeUserPKCE ¶ added in v0.13.0
AuthorizeUserPKCE uses the OAuth2 authorization code grant flow with PKCE.
func (Config) ClusterExchange ¶ added in v0.4.0
ClusterExchange performs the Cluster Access Token Exchange grant flow
func (Config) DCRRegister ¶ added in v0.15.0
func (Config) DecodeToken ¶ added in v0.6.0
func (i Config) DecodeToken() (*DecodedToken, error)
DecodeToken decodes a JWT token into its header and payload parts.
func (Config) GetAdminOrganizations ¶ added in v0.10.0
GetAdminOrganizations requests the user's organizations using the admin API and a service token.
func (Config) GetAdminProfile ¶ added in v0.10.0
GetAdminProfile requests the user profile using a service token.
func (Config) GetOrganizations ¶ added in v0.2.0
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 ¶ added in v0.5.0
InvalidateToken invalidates the token provided in the configuration using the IMS API.
func (Config) OBOExchange ¶ added in v0.13.0
func (Config) Refresh ¶ added in v0.9.0
func (i Config) Refresh() (RefreshInfo, error)
Refresh performs the refresh token flow.
func (Config) ValidateToken ¶ added in v0.3.0
ValidateToken validates the token provided in the configuration using the IMS API. It returns the endpoint response or an error.
type DecodedToken ¶ added in v0.12.0
DecodedToken represents the decoded parts of a JWT token.
type RefreshInfo ¶ added in v0.9.0
RefreshInfo extends TokenInfo with the new refresh token returned by a token refresh.