Documentation
¶
Index ¶
- Constants
- func DefaultHeaders() map[string]string
- func DefaultSystemHeaders() map[string]string
- func HasCacheRecord(profile *models.ArkProfile, username string, refreshAuthAllowed bool) (bool, error)
- func IsIdpUser(username string, identityURL *string, identityTenantSubdomain *string) (bool, error)
- func IsPasswordRequired(username string, identityURL string, identityTenantSubdomain string) bool
- func ResolveTenantFqdnFromTenantSubdomain(tenantSubdomain string, env commonmodels.AwsEnv) (string, error)
- func ResolveTenantFqdnFromTenantSuffix(tenantSuffix string, identityEnvURL string) (string, error)
- type ArkIdentity
- func (ai *ArkIdentity) AuthIdentity(profile *models.ArkProfile, interactive bool, force bool) error
- func (ai *ArkIdentity) GetApps() (map[string]interface{}, error)
- func (ai *ArkIdentity) IdentityURL() string
- func (ai *ArkIdentity) RefreshAuthIdentity(profile *models.ArkProfile, interactive bool, force bool) error
- func (ai *ArkIdentity) Session() *common.ArkClient
- func (ai *ArkIdentity) SessionDetails() *identity.AdvanceAuthResult
- func (ai *ArkIdentity) SessionToken() string
- type ArkIdentityServiceUser
Constants ¶
const (
DefaultTokenLifetimeSeconds = 3600
)
DefaultTokenLifetimeSeconds is the default token lifetime in seconds.
Variables ¶
This section is empty.
Functions ¶
func DefaultHeaders ¶
DefaultHeaders returns the default headers for HTTP requests to identity.
func DefaultSystemHeaders ¶
DefaultSystemHeaders returns the default system headers for HTTP requests to identity.
func HasCacheRecord ¶
func HasCacheRecord(profile *models.ArkProfile, username string, refreshAuthAllowed bool) (bool, error)
HasCacheRecord Checks if a cache record exists for the specified profile and username
func IsPasswordRequired ¶
IsPasswordRequired Checks if a password is required for the specified username
func ResolveTenantFqdnFromTenantSubdomain ¶
func ResolveTenantFqdnFromTenantSubdomain(tenantSubdomain string, env commonmodels.AwsEnv) (string, error)
ResolveTenantFqdnFromTenantSubdomain resolves the tenant's FQDN URL from its subdomain. The resolved URL is based on the current working environment, which is provided in the `tenantSubdomain` argument.
Types ¶
type ArkIdentity ¶
type ArkIdentity struct {
// contains filtered or unexported fields
}
ArkIdentity is a struct that represents an identity authentication session.
func NewArkIdentity ¶
func NewArkIdentity(username string, password string, identityURL string, identityTenantSubdomain string, mfaType string, logger *common.ArkLogger, cacheAuthentication bool, loadCache bool, cacheProfile *models.ArkProfile) (*ArkIdentity, error)
NewArkIdentity creates a new ArkIdentity instance with the specified parameters.
func (*ArkIdentity) AuthIdentity ¶
func (ai *ArkIdentity) AuthIdentity(profile *models.ArkProfile, interactive bool, force bool) error
AuthIdentity Authenticates to Identity with the information specified in the constructor. If MFA is configured and `interactive` is enabled, the user is prompted for the MFA secret. The auth token and other details are stored in the object for future use.
func (*ArkIdentity) GetApps ¶
func (ai *ArkIdentity) GetApps() (map[string]interface{}, error)
GetApps Returns the applications to which the user is logged in.
func (*ArkIdentity) IdentityURL ¶
func (ai *ArkIdentity) IdentityURL() string
IdentityURL returns the current identity URL
func (*ArkIdentity) RefreshAuthIdentity ¶
func (ai *ArkIdentity) RefreshAuthIdentity(profile *models.ArkProfile, interactive bool, force bool) error
RefreshAuthIdentity Performs a token refresh with the object's existing details.
func (*ArkIdentity) Session ¶
func (ai *ArkIdentity) Session() *common.ArkClient
Session returns the current identity session
func (*ArkIdentity) SessionDetails ¶
func (ai *ArkIdentity) SessionDetails() *identity.AdvanceAuthResult
SessionDetails returns the current identity session details if logged in
func (*ArkIdentity) SessionToken ¶
func (ai *ArkIdentity) SessionToken() string
SessionToken returns the current identity session token if logged in
type ArkIdentityServiceUser ¶
type ArkIdentityServiceUser struct {
// contains filtered or unexported fields
}
ArkIdentityServiceUser is a struct that represents identity authentication with service user.
func NewArkIdentityServiceUser ¶
func NewArkIdentityServiceUser(username string, token string, appName string, identityURL string, identityTenantSubdomain string, logger *common.ArkLogger, cacheAuthentication bool, loadCache bool, cacheProfile *models.ArkProfile) (*ArkIdentityServiceUser, error)
NewArkIdentityServiceUser creates a new instance of ArkIdentityServiceUser.
func (*ArkIdentityServiceUser) AuthIdentity ¶
func (ai *ArkIdentityServiceUser) AuthIdentity(profile *models.ArkProfile, force bool) error
AuthIdentity Authenticates to Identity with a service user. This method creates an auth token and authorizes to the service.
func (*ArkIdentityServiceUser) IdentityURL ¶
func (ai *ArkIdentityServiceUser) IdentityURL() string
IdentityURL returns the current identity URL
func (*ArkIdentityServiceUser) Session ¶
func (ai *ArkIdentityServiceUser) Session() *common.ArkClient
Session returns the current identity session
func (*ArkIdentityServiceUser) SessionToken ¶
func (ai *ArkIdentityServiceUser) SessionToken() string
SessionToken returns the current identity session token if logged in