Documentation
¶
Index ¶
- Constants
- Variables
- type AdvanceAuthMidResponse
- type AdvanceAuthMidResult
- type AdvanceAuthResponse
- type AdvanceAuthResult
- type BaseIdentityAPIResponse
- type Challenge
- type DirectorySearchArgs
- type DirectoryServiceMetadata
- type DirectoryServiceQueryRequest
- type DirectoryServiceQueryResponse
- type DirectoryServiceQuerySpecificRoleRequest
- type DirectoryServiceRow
- type GetDirectoryServicesResponse
- type GetDirectoryServicesResult
- type GetTenantSuffixResult
- type GroupResult
- type GroupRow
- type GroupsResult
- type IdpAuthStatusResponse
- type IdpAuthStatusResult
- type Mechanism
- type PodFqdnResult
- type QueryResult
- type RoleAdminRight
- type RoleResult
- type RoleRow
- type RolesResult
- type StartAuthResponse
- type StartAuthResult
- type TenantEndpointResponse
- type TenantFqdnResponse
- type UserResult
- type UserRow
- type UsersResult
Constants ¶
const ( AD = "AdProxy" Identity = "CDS" FDS = "FDS" )
Possible directory types
Variables ¶
var ( AllDirectoryTypes = []string{ AD, Identity, FDS, } )
AllDirectoryTypes is a list of all supported directory types.
Functions ¶
This section is empty.
Types ¶
type AdvanceAuthMidResponse ¶
type AdvanceAuthMidResponse struct {
BaseIdentityAPIResponse
Result AdvanceAuthMidResult `json:"Result"`
}
AdvanceAuthMidResponse is a struct that represents the response from the Identity API for advanced authentication polling / not finished.
type AdvanceAuthMidResult ¶
type AdvanceAuthMidResult struct {
Summary string `json:"Summary" validate:"required,min=2"`
GeneratedAuthValue string `json:"GeneratedAuthValue"`
}
AdvanceAuthMidResult is a struct that represents the result of an advanced authentication polling / not finished request.
type AdvanceAuthResponse ¶
type AdvanceAuthResponse struct {
BaseIdentityAPIResponse
Result AdvanceAuthResult `json:"Result"`
}
AdvanceAuthResponse is a struct that represents the response from the Identity API for advanced authentication successful.
type AdvanceAuthResult ¶
type AdvanceAuthResult struct {
DisplayName string `json:"DisplayName" validate:"omitempty,min=2"`
Auth string `json:"Auth" validate:"required,min=2"`
Summary string `json:"Summary" validate:"required,min=2"`
Token string `json:"Token" validate:"omitempty,min=2"`
RefreshToken string `json:"RefreshToken" validate:"omitempty,min=2"`
TokenLifetime int `json:"TokenLifetime"`
CustomerID string `json:"CustomerID"`
UserID string `json:"UserId"`
PodFqdn string `json:"PodFqdn"`
}
AdvanceAuthResult is a struct that represents the result of an advanced authentication successful request.
type BaseIdentityAPIResponse ¶
type BaseIdentityAPIResponse struct {
Success bool `json:"Success" validate:"required"`
Exception string `json:"Exception"`
ErrorCode string `json:"ErrorCode"`
Message string `json:"Message"`
ErrorID string `json:"ErrorID"`
}
BaseIdentityAPIResponse is a struct that represents the base response from the Identity API.
type Challenge ¶
type Challenge struct {
Mechanisms []Mechanism `json:"Mechanisms" validate:"required,dive,required"`
}
Challenge is a struct that represents a challenge in the authentication process.
type DirectorySearchArgs ¶
type DirectorySearchArgs struct {
PageNumber int `json:"PageNumber,omitempty" mapstructure:"PageNumber,omitempty"`
PageSize int `json:"PageSize,omitempty" mapstructure:"PageSize,omitempty"`
Limit int `json:"Limit,omitempty" mapstructure:"Limit,omitempty"`
SortBy string `json:"SortBy,omitempty" mapstructure:"SortBy,omitempty"`
Caching int `json:"Caching,omitempty" mapstructure:"Caching,omitempty"`
Dir string `json:"Direction,omitempty" mapstructure:"Direction,omitempty"`
Ascending bool `json:"Ascending,omitempty" mapstructure:"Ascending,omitempty"`
}
DirectorySearchArgs represents search arguments for directory queries.
type DirectoryServiceMetadata ¶
type DirectoryServiceMetadata struct {
Service string `json:"Service" mapstructure:"Service"`
DirectoryServiceUUID string `json:"directoryServiceUuid" mapstructure:"directoryServiceUuid"`
}
DirectoryServiceMetadata represents metadata for a directory service.
type DirectoryServiceQueryRequest ¶
type DirectoryServiceQueryRequest struct {
DirectoryServices []string `json:"directoryServices" mapstructure:"directoryServices"`
Group string `json:"group,omitempty" mapstructure:"group,omitempty"`
Roles string `json:"roles,omitempty" mapstructure:"roles,omitempty"`
User string `json:"user,omitempty" mapstructure:"user,omitempty"`
Args DirectorySearchArgs `json:"Args" mapstructure:"Args"`
}
DirectoryServiceQueryRequest represents a query request for directory services.
func NewDirectoryServiceQueryRequest ¶
func NewDirectoryServiceQueryRequest(searchString string) *DirectoryServiceQueryRequest
NewDirectoryServiceQueryRequest initializes a DirectoryServiceQueryRequest with optional search string.
type DirectoryServiceQueryResponse ¶
type DirectoryServiceQueryResponse struct {
Result QueryResult `json:"Result" mapstructure:"Result"`
}
DirectoryServiceQueryResponse represents the response for a directory service query.
type DirectoryServiceQuerySpecificRoleRequest ¶
type DirectoryServiceQuerySpecificRoleRequest struct {
DirectoryServices []string `json:"directoryServices" mapstructure:"directoryServices"`
Group string `json:"group,omitempty" mapstructure:"group,omitempty"`
Roles string `json:"roles,omitempty" mapstructure:"roles,omitempty"`
User string `json:"user,omitempty" mapstructure:"user,omitempty"`
Args DirectorySearchArgs `json:"Args" mapstructure:"Args"`
}
DirectoryServiceQuerySpecificRoleRequest represents a query request for a specific role.
func NewDirectoryServiceQuerySpecificRoleRequest ¶
func NewDirectoryServiceQuerySpecificRoleRequest(roleName string) *DirectoryServiceQuerySpecificRoleRequest
NewDirectoryServiceQuerySpecificRoleRequest initializes a DirectoryServiceQuerySpecificRoleRequest with a specific role name.
type DirectoryServiceRow ¶
type DirectoryServiceRow struct {
Row DirectoryServiceMetadata `json:"Row" mapstructure:"Row"`
}
DirectoryServiceRow represents a row containing directory service metadata.
type GetDirectoryServicesResponse ¶
type GetDirectoryServicesResponse struct {
Result GetDirectoryServicesResult `json:"Result" mapstructure:"Result"`
}
GetDirectoryServicesResponse represents the response for a directory services query.
type GetDirectoryServicesResult ¶
type GetDirectoryServicesResult struct {
Results []DirectoryServiceRow `json:"Results" mapstructure:"Results" validate:"min=1"`
}
GetDirectoryServicesResult represents the result of a directory services query.
type GetTenantSuffixResult ¶
type GetTenantSuffixResult struct {
BaseIdentityAPIResponse
Result map[string]interface{} `json:"Result"`
}
GetTenantSuffixResult is a struct that represents the response from the Identity API for getting tenant suffix.
type GroupResult ¶
type GroupResult struct {
Row GroupRow `json:"Row" mapstructure:"Row"`
}
GroupResult represents a result containing a group row.
type GroupRow ¶
type GroupRow struct {
DisplayName string `json:"DisplayName,omitempty" mapstructure:"DisplayName"`
ServiceInstanceLocalized string `json:"ServiceInstanceLocalized" mapstructure:"ServiceInstanceLocalized"`
DirectoryServiceType string `json:"ServiceType" mapstructure:"ServiceType"`
SystemName string `json:"SystemName,omitempty" mapstructure:"SystemName"`
InternalID string `json:"InternalName,omitempty" mapstructure:"InternalName"`
}
GroupRow represents a row containing group information.
type GroupsResult ¶
type GroupsResult struct {
Results []GroupResult `json:"Results" mapstructure:"Results"`
FullCount int `json:"FullCount,omitempty" mapstructure:"FullCount"`
}
GroupsResult represents the results of a group query.
type IdpAuthStatusResponse ¶
type IdpAuthStatusResponse struct {
BaseIdentityAPIResponse
Result IdpAuthStatusResult `json:"Result"`
}
IdpAuthStatusResponse is a struct that represents the response from the Identity API for IdP authentication status.
type IdpAuthStatusResult ¶
type IdpAuthStatusResult struct {
State string `json:"State" validate:"required"`
TokenLifetime int `json:"TokenLifetime"`
Token string `json:"Token"`
RefreshToken string `json:"RefreshToken"`
}
IdpAuthStatusResult is a struct that represents the result of an IdP authentication status request.
type Mechanism ¶
type Mechanism struct {
AnswerType string `json:"AnswerType" validate:"required,min=2"`
Name string `json:"Name" validate:"required,min=2"`
PromptMechChosen string `json:"PromptMechChosen" validate:"required,min=2"`
PromptSelectMech string `json:"PromptSelectMech" validate:"omitempty,min=2"`
MechanismID string `json:"MechanismId" validate:"required,min=2"`
}
Mechanism is a struct that represents a mechanism in the authentication process as part of a challenge.
type PodFqdnResult ¶
type PodFqdnResult struct {
PodFqdn string `json:"PodFqdn" validate:"required,min=2"`
}
PodFqdnResult is a struct that represents the result of a Pod FQDN request.
func (*PodFqdnResult) GetTenantID ¶
func (p *PodFqdnResult) GetTenantID() string
GetTenantID extracts the tenant ID from the Pod FQDN.
type QueryResult ¶
type QueryResult struct {
Groups *GroupsResult `json:"Group,omitempty" mapstructure:"Group"`
Roles *RolesResult `json:"Roles,omitempty" mapstructure:"Roles"`
Users *UsersResult `json:"User,omitempty" mapstructure:"User"`
}
QueryResult represents the combined results of group, role, and user queries.
type RoleAdminRight ¶
type RoleAdminRight struct {
Path string `json:"Path" mapstructure:"Path"`
ServiceName string `json:"ServiceName,omitempty" mapstructure:"ServiceName"`
}
RoleAdminRight represents administrative rights for a role.
type RoleResult ¶
type RoleResult struct {
Row RoleRow `json:"Row" mapstructure:"Row"`
}
RoleResult represents a result containing a role row.
type RoleRow ¶
type RoleRow struct {
Name string `json:"Name,omitempty" mapstructure:"Name"`
ID string `json:"_ID" mapstructure:"_ID"`
AdminRights []RoleAdminRight `json:"AdministrativeRights,omitempty" mapstructure:"AdministrativeRights"`
IsHidden bool `json:"IsHidden,omitempty" mapstructure:"IsHidden"`
Description string `json:"Description,omitempty" mapstructure:"Description"`
}
RoleRow represents a row containing role information.
type RolesResult ¶
type RolesResult struct {
Results []RoleResult `json:"Results" mapstructure:"Results"`
FullCount int `json:"FullCount,omitempty" mapstructure:"FullCount"`
}
RolesResult represents the results of a role query.
type StartAuthResponse ¶
type StartAuthResponse struct {
BaseIdentityAPIResponse
Result StartAuthResult `json:"Result"`
}
StartAuthResponse is a struct that represents the response from the Identity API for starting authentication.
type StartAuthResult ¶
type StartAuthResult struct {
Challenges []Challenge `json:"Challenges" validate:"omitempty,dive,required"`
SessionID string `json:"SessionId" validate:"omitempty,min=2"`
IdpRedirectURL string `json:"IdpRedirectUrl"`
IdpLoginSessionID string `json:"IdpLoginSessionId"`
IdpRedirectShortURL string `json:"IdpRedirectShortUrl"`
IdpShortURLID string `json:"IdpShortUrlId"`
TenantID string `json:"TenantId"`
}
StartAuthResult is a struct that represents the result of a start authentication request.
type TenantEndpointResponse ¶
type TenantEndpointResponse struct {
Endpoint string `json:"endpoint"`
}
TenantEndpointResponse is a struct that represents the response from the Identity API for tenant endpoint.
type TenantFqdnResponse ¶
type TenantFqdnResponse struct {
BaseIdentityAPIResponse
Result PodFqdnResult `json:"Result"`
}
TenantFqdnResponse is a struct that represents the response from the Identity API for tenant FQDN.
type UserResult ¶
type UserResult struct {
Row UserRow `json:"Row" mapstructure:"Row"`
}
UserResult represents a result containing a user row.
type UserRow ¶
type UserRow struct {
DisplayName string `json:"DisplayName,omitempty" mapstructure:"DisplayName"`
ServiceInstanceLocalized string `json:"ServiceInstanceLocalized" mapstructure:"ServiceInstanceLocalized"`
DistinguishedName string `json:"DistinguishedName" mapstructure:"DistinguishedName"`
SystemName string `json:"SystemName,omitempty" mapstructure:"SystemName"`
DirectoryServiceType string `json:"ServiceType" mapstructure:"ServiceType"`
Email string `json:"EMail,omitempty" mapstructure:"EMail"`
InternalID string `json:"InternalName,omitempty" mapstructure:"InternalName"`
Description string `json:"Description,omitempty" mapstructure:"Description"`
}
UserRow represents a row containing user information.
type UsersResult ¶
type UsersResult struct {
Results []UserResult `json:"Results" mapstructure:"Results"`
FullCount int `json:"FullCount,omitempty" mapstructure:"FullCount"`
}
UsersResult represents the results of a user query.