identity

package
v1.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 14, 2025 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultTokenLifetimeSeconds = 3600
)

DefaultTokenLifetimeSeconds is the default token lifetime in seconds.

Variables

This section is empty.

Functions

func DefaultHeaders

func DefaultHeaders() map[string]string

DefaultHeaders returns the default headers for HTTP requests to identity.

func DefaultSystemHeaders

func DefaultSystemHeaders() map[string]string

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 IsIdpUser

func IsIdpUser(username string, identityURL *string, identityTenantSubdomain *string) (bool, error)

IsIdpUser Checks whether or not the specified username is from an external IDP

func IsPasswordRequired

func IsPasswordRequired(username string, identityURL string, identityTenantSubdomain string) bool

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.

func ResolveTenantFqdnFromTenantSuffix

func ResolveTenantFqdnFromTenantSuffix(tenantSuffix string, identityEnvURL string) (string, error)

ResolveTenantFqdnFromTenantSuffix resolves the tenant's FQDN URL from its suffix.

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL