Documentation ¶
Index ¶
- type AuthManager
- func (tm *AuthManager) Authenticate(credentials map[string]string) error
- func (tm *AuthManager) Authorize(token string) (string, error)
- func (tm *AuthManager) DumpRequest(req *http.Request)
- func (tm *AuthManager) DumpResponse(res *http.Response)
- func (tm *AuthManager) GetClientToken(clientID, clientSecret, subDomain string) (clientToken string, err error)
- func (tm *AuthManager) RefreshToken() (string, error)
- type ClientManager
- func (manager *ClientManager) ChangeSecret(id, oldSecret, newSecret, zoneId string) (err error)
- func (manager *ClientManager) Create(newClient UAAClient, zoneId string) (client UAAClient, err error)
- func (manager *ClientManager) DeleteClient(id, zoneId string) (err error)
- func (manager *ClientManager) FindByClientID(clientID, zoneId string) (client UAAClient, err error)
- func (manager *ClientManager) GetClient(id, zoneId string) (client *UAAClient, err error)
- func (manager *ClientManager) UpdateClient(updatedClient *UAAClient, zoneId string) (client UAAClient, err error)
- type Config
- type GroupManager
- func (manager *GroupManager) CreateGroup(displayName string, description string, zoneId string) (group *UAAGroup, err error)
- func (manager *GroupManager) DeleteGroup(id, zoneId string) error
- func (manager *GroupManager) FindByDisplayName(displayName, zoneId string) (group *UAAGroup, err error)
- func (manager *GroupManager) GetGroup(id, zoneId string) (group *UAAGroup, err error)
- func (manager *GroupManager) UpdateGroup(id, displayName, description, zoneId string) (group *UAAGroup, err error)
- type IdentityZone
- type IdentityZoneBrandingBanner
- type IdentityZoneBrandingConfig
- type IdentityZoneClientSecretPolicy
- type IdentityZoneConfig
- type IdentityZoneCorsConfig
- type IdentityZoneCorsPolicy
- type IdentityZoneLinks
- type IdentityZoneLogoutLinks
- type IdentityZoneManager
- func (manager *IdentityZoneManager) Create(identityZone *IdentityZone) (*IdentityZone, error)
- func (manager *IdentityZoneManager) Delete(id string) error
- func (manager *IdentityZoneManager) FindById(id string) (*IdentityZone, error)
- func (manager *IdentityZoneManager) FindByName(name string) (*IdentityZone, error)
- func (manager *IdentityZoneManager) Update(id string, identityZone *IdentityZone) (*IdentityZone, error)
- type IdentityZoneSamlConfig
- type IdentityZoneSamlKey
- type IdentityZoneTokenPolicy
- type InputPrompt
- type Logger
- type MfaConfig
- type SelfServiceLinks
- type Session
- type UAAClient
- type UAAClientResourceList
- type UAAGroup
- type UAAGroupResourceList
- type UAAUser
- type UAAUserEmail
- type UAAUserGroup
- type UAAUserName
- type UAAUserResourceList
- type UaaApi
- func (api *UaaApi) Delete(path string) error
- func (api *UaaApi) Get(path string, responseBody any) error
- func (api *UaaApi) Patch(path string, body any, responseBody any) error
- func (api *UaaApi) Post(path string, body any, responseBody any) error
- func (api *UaaApi) Put(path string, body any, responseBody any) error
- func (api *UaaApi) WithHeaders(headers map[string]string) *UaaApi
- func (api *UaaApi) WithZoneId(zoneId string) *UaaApi
- type UserConfig
- type UserManager
- func (um *UserManager) ChangePassword(id, oldPassword, newPassword, zoneId string) (err error)
- func (um *UserManager) CreateUser(username, password, origin, givenName, familyName, email, zoneId string) (user *UAAUser, err error)
- func (um *UserManager) DeleteUser(id, zoneId string) error
- func (um *UserManager) FindByUsername(username, zoneId string) (user UAAUser, err error)
- func (um *UserManager) GetUser(id, zoneId string) (user *UAAUser, err error)
- func (um *UserManager) IsDefaultGroup(zoneId, group string) (ok bool, err error)
- func (um *UserManager) UpdateRoles(id string, scopesToDelete, scopesToAdd []string, origin, zoneId string) (err error)
- func (um *UserManager) UpdateUser(id, username, givenName, familyName, email, zoneId string) (user *UAAUser, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthManager ¶
type AuthManager struct {
// contains filtered or unexported fields
}
AuthManager -
func NewAuthManager ¶
func NewAuthManager(gateway net.Gateway, config coreconfig.ReadWriter, dumper net.RequestDumper) *AuthManager
NewAuthManager -
func (*AuthManager) Authenticate ¶
func (tm *AuthManager) Authenticate(credentials map[string]string) error
Authenticate -
func (*AuthManager) Authorize ¶
func (tm *AuthManager) Authorize(token string) (string, error)
Authorize -
func (*AuthManager) DumpRequest ¶
func (tm *AuthManager) DumpRequest(req *http.Request)
DumpRequest -
func (*AuthManager) DumpResponse ¶
func (tm *AuthManager) DumpResponse(res *http.Response)
DumpResponse -
func (*AuthManager) GetClientToken ¶
func (tm *AuthManager) GetClientToken(clientID, clientSecret, subDomain string) (clientToken string, err error)
GetClientToken -
func (*AuthManager) RefreshToken ¶
func (tm *AuthManager) RefreshToken() (string, error)
RefreshAuthToken -
type ClientManager ¶
type ClientManager struct {
// contains filtered or unexported fields
}
func (*ClientManager) ChangeSecret ¶
func (manager *ClientManager) ChangeSecret(id, oldSecret, newSecret, zoneId string) (err error)
func (*ClientManager) Create ¶
func (manager *ClientManager) Create(newClient UAAClient, zoneId string) (client UAAClient, err error)
func (*ClientManager) DeleteClient ¶
func (manager *ClientManager) DeleteClient(id, zoneId string) (err error)
func (*ClientManager) FindByClientID ¶
func (manager *ClientManager) FindByClientID(clientID, zoneId string) (client UAAClient, err error)
func (*ClientManager) GetClient ¶
func (manager *ClientManager) GetClient(id, zoneId string) (client *UAAClient, err error)
func (*ClientManager) UpdateClient ¶
func (manager *ClientManager) UpdateClient(updatedClient *UAAClient, zoneId string) (client UAAClient, err error)
type Config ¶
type GroupManager ¶
type GroupManager struct {
// contains filtered or unexported fields
}
func (*GroupManager) CreateGroup ¶
func (*GroupManager) DeleteGroup ¶
func (manager *GroupManager) DeleteGroup(id, zoneId string) error
func (*GroupManager) FindByDisplayName ¶
func (manager *GroupManager) FindByDisplayName(displayName, zoneId string) (group *UAAGroup, err error)
func (*GroupManager) GetGroup ¶
func (manager *GroupManager) GetGroup(id, zoneId string) (group *UAAGroup, err error)
func (*GroupManager) UpdateGroup ¶
func (manager *GroupManager) UpdateGroup(id, displayName, description, zoneId string) (group *UAAGroup, err error)
type IdentityZone ¶
type IdentityZone struct { Id string `json:"id"` IsActive bool `json:"active"` Name string `json:"name,omitempty"` SubDomain string `json:"subdomain,omitempty"` Config *IdentityZoneConfig `json:"config,omitempty"` }
type IdentityZoneBrandingBanner ¶ added in v1.0.2
type IdentityZoneBrandingConfig ¶ added in v1.0.1
type IdentityZoneBrandingConfig struct { Banner *IdentityZoneBrandingBanner `json:"banner,omitempty"` CompanyName string `json:"companyName,omitempty"` CompanyLogo string `json:"productLogo,omitempty"` Favicon string `json:"squareLogo,omitempty"` }
type IdentityZoneClientSecretPolicy ¶
type IdentityZoneClientSecretPolicy struct { MaxLength *int64 `json:"maxLength,omitempty"` MinLength *int64 `json:"minLength,omitempty"` MinUpperCaseCharacter *int64 `json:"requireUpperCaseCharacter,omitempty"` MinLowerCaseCharacter *int64 `json:"requireLowerCaseCharacter,omitempty"` MinDigit *int64 `json:"requireDigit,omitempty"` MinSpecialCharacter *int64 `json:"requireSpecialCharacter,omitempty"` }
type IdentityZoneConfig ¶
type IdentityZoneConfig struct { AccountChooserEnabled bool `json:"accountChooserEnabled"` Branding *IdentityZoneBrandingConfig `json:"branding,omitempty"` ClientSecretPolicy *IdentityZoneClientSecretPolicy `json:"clientSecretPolicy,omitempty"` CorsPolicy *IdentityZoneCorsPolicy `json:"corsPolicy,omitempty"` IdpDiscoveryEnabled bool `json:"idpDiscoveryEnabled"` InputPrompts []*InputPrompt `json:"prompts,omitempty"` IssuerUrl string `json:"issuer,omitempty"` Links *IdentityZoneLinks `json:"links,omitempty"` MfaConfig *MfaConfig `json:"MfaConfig,omitempty"` TokenPolicy *IdentityZoneTokenPolicy `json:"tokenPolicy,omitempty"` Saml *IdentityZoneSamlConfig `json:"samlConfig,omitempty"` UserConfig *UserConfig `json:"userConfig,omitempty"` }
type IdentityZoneCorsConfig ¶
type IdentityZoneCorsConfig struct { AllowedOrigins []string `json:"allowedOrigins,omitempty"` AllowedOriginPatterns []string `json:"allowedOriginPatterns,omitempty"` AllowedUris []string `json:"allowedUris,omitempty"` AllowedUriPatterns []string `json:"allowedUriPatterns,omitempty"` AllowedHeaders []string `json:"allowedHeaders,omitempty"` AllowedMethods []string `json:"allowedMethods,omitempty"` AllowedCredentials bool `json:"allowedCredentials"` MaxAge *int64 `json:"maxAge,omitempty"` }
type IdentityZoneCorsPolicy ¶
type IdentityZoneCorsPolicy struct { DefaultConfiguration *IdentityZoneCorsConfig `json:"defaultConfiguration,omitempty"` XhrConfiguration *IdentityZoneCorsConfig `json:"xhrConfiguration,omitempty"` }
type IdentityZoneLinks ¶
type IdentityZoneLinks struct { HomeRedirect string `json:"homeRedirect,omitempty"` Logout *IdentityZoneLogoutLinks `json:"logout,omitempty"` SelfService *SelfServiceLinks `json:"selfService,omitempty"` }
type IdentityZoneLogoutLinks ¶
type IdentityZoneManager ¶
type IdentityZoneManager struct {
// contains filtered or unexported fields
}
func (*IdentityZoneManager) Create ¶
func (manager *IdentityZoneManager) Create(identityZone *IdentityZone) (*IdentityZone, error)
func (*IdentityZoneManager) Delete ¶
func (manager *IdentityZoneManager) Delete(id string) error
func (*IdentityZoneManager) FindById ¶
func (manager *IdentityZoneManager) FindById(id string) (*IdentityZone, error)
func (*IdentityZoneManager) FindByName ¶
func (manager *IdentityZoneManager) FindByName(name string) (*IdentityZone, error)
func (*IdentityZoneManager) Update ¶
func (manager *IdentityZoneManager) Update(id string, identityZone *IdentityZone) (*IdentityZone, error)
type IdentityZoneSamlConfig ¶
type IdentityZoneSamlConfig struct { ActiveKeyId string `json:"activeKeyId,omitempty"` AssertionTtlSeconds *int64 `json:"assertionTimeToLiveSeconds,omitempty"` Certificate string `json:"certificate,omitempty"` DisableInResponseToCheck bool `json:"disableInResponseToCheck"` EntityId string `json:"entityID,omitempty"` IsAssertionSigned bool `json:"assertionSigned"` IsRequestSigned bool `json:"requestSigned"` Keys map[string]*IdentityZoneSamlKey `json:"keys,omitempty"` WantAssertionSigned bool `json:"wantAssertionSigned"` WantAuthnRequestSigned bool `json:"wantAuthnRequestSigned"` }
type IdentityZoneSamlKey ¶
type IdentityZoneSamlKey struct {
Certificate string `json:"certificate,omitempty"`
}
type IdentityZoneTokenPolicy ¶
type IdentityZoneTokenPolicy struct { AccessTokenTtl *int64 `json:"accessTokenValidity,omitempty"` RefreshTokenTtl *int64 `json:"refreshTokenValidity,omitempty"` IsJwtRevocable bool `json:"jwtRevocable"` IsRefreshTokenUnique bool `json:"refreshTokenUnique"` RefreshTokenFormat string `json:"refreshTokenFormat,omitempty"` ActiveKeyId string `json:"activeKeyId,omitempty"` }
type InputPrompt ¶
type Logger ¶
type Logger struct { UI terminal.UI TracePrinter trace.Printer // contains filtered or unexported fields }
Logger -
func (*Logger) DebugMessage ¶
DebugMessage -
func (*Logger) LogMessage ¶
LogMessage -
type SelfServiceLinks ¶
type Session ¶
type Session struct { Log *Logger // contains filtered or unexported fields }
func NewSession ¶
func (*Session) AuthManager ¶
func (s *Session) AuthManager() *AuthManager
func (*Session) ClientManager ¶
func (s *Session) ClientManager() *ClientManager
func (*Session) GroupManager ¶
func (s *Session) GroupManager() *GroupManager
func (*Session) IdentityZoneManager ¶
func (s *Session) IdentityZoneManager() *IdentityZoneManager
func (*Session) UserManager ¶
func (s *Session) UserManager() *UserManager
type UAAClient ¶
type UAAClient struct { ClientID string `json:"client_id,omitempty"` ClientSecret string `json:"client_secret,omitempty"` AuthorizedGrantTypes []string `json:"authorized_grant_types,omitempty"` RedirectURI []string `json:"redirect_uri,omitempty"` Scope []string `json:"scope,omitempty"` ResourceIds []string `json:"resource_ids,omitempty"` Authorities []string `json:"authorities,omitempty"` AutoApprove []string `json:"autoapprove,omitempty"` AccessTokenValidity int `json:"access_token_validity,omitempty"` RefreshTokenValidity int `json:"refresh_token_validity,omitempty"` AllowedProviders []string `json:"allowedproviders,omitempty"` Name string `json:"name,omitempty"` TokenSalt string `json:"token_salt,omitempty"` CreatedWith string `json:"createdwith,omitempty"` ApprovalsDeleted bool `json:"approvals_deleted,omitempty"` RequiredUserGroups []string `json:"required_user_groups,omitempty"` LastModified int64 `json:"lastModified,omitempty"` }
func (*UAAClient) HasDefaultAuthorites ¶
func (*UAAClient) HasDefaultResourceIds ¶
func (*UAAClient) HasDefaultScope ¶
type UAAClientResourceList ¶
type UAAClientResourceList struct {
Resources []UAAClient `json:"resources"`
}
UAAClientResourceList -
type UAAGroupResourceList ¶
type UAAGroupResourceList struct {
Resources []UAAGroup `json:"resources"`
}
type UAAUser ¶
type UAAUser struct { Id string `json:"id,omitempty"` Username string `json:"userName,omitempty"` Password string `json:"password,omitempty"` Origin string `json:"origin,omitempty"` Name UAAUserName `json:"name,omitempty"` Emails []UAAUserEmail `json:"emails,omitempty"` Groups []UAAUserGroup `json:"groups,omitempty"` ZoneId string `json:"zoneId,omitempty"` }
type UAAUserEmail ¶
type UAAUserEmail struct {
Value string `json:"value"`
}
type UAAUserGroup ¶
type UAAUserName ¶
type UAAUserResourceList ¶
type UAAUserResourceList struct {
Resources []UAAUser `json:"resources"`
}
type UaaApi ¶
type UaaApi struct {
// contains filtered or unexported fields
}
func (*UaaApi) WithZoneId ¶
type UserConfig ¶
type UserConfig struct {
DefaultGroups []string `json:"defaultGroups,omitempty"`
}
type UserManager ¶
type UserManager struct {
// contains filtered or unexported fields
}
func (*UserManager) ChangePassword ¶
func (um *UserManager) ChangePassword(id, oldPassword, newPassword, zoneId string) (err error)
func (*UserManager) CreateUser ¶
func (um *UserManager) CreateUser(username, password, origin, givenName, familyName, email, zoneId string) (user *UAAUser, err error)
func (*UserManager) DeleteUser ¶
func (um *UserManager) DeleteUser(id, zoneId string) error
func (*UserManager) FindByUsername ¶
func (um *UserManager) FindByUsername(username, zoneId string) (user UAAUser, err error)
func (*UserManager) GetUser ¶
func (um *UserManager) GetUser(id, zoneId string) (user *UAAUser, err error)
func (*UserManager) IsDefaultGroup ¶
func (um *UserManager) IsDefaultGroup(zoneId, group string) (ok bool, err error)
func (*UserManager) UpdateRoles ¶
func (um *UserManager) UpdateRoles(id string, scopesToDelete, scopesToAdd []string, origin, zoneId string) (err error)
func (*UserManager) UpdateUser ¶
func (um *UserManager) UpdateUser(id, username, givenName, familyName, email, zoneId string) (user *UAAUser, err error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.