Documentation
¶
Index ¶
- type AuthMethod
- type AuthMethodCreateResult
- type AuthMethodDeleteResult
- type AuthMethodListResult
- func (n AuthMethodListResult) GetEstItemCount() uint
- func (n AuthMethodListResult) GetItems() []*AuthMethod
- func (n AuthMethodListResult) GetListToken() string
- func (n AuthMethodListResult) GetRemovedIds() []string
- func (n AuthMethodListResult) GetResponse() *api.Response
- func (n AuthMethodListResult) GetResponseType() string
- type AuthMethodReadResult
- type AuthMethodUpdateResult
- type AuthenticateResult
- func (a AuthenticateResult) GetAuthToken() (*authtokens.AuthToken, error)
- func (a AuthenticateResult) GetRawAttributes() json.RawMessage
- func (a AuthenticateResult) GetResponse() *api.Response
- func (a *AuthenticateResult) MarshalJSON() ([]byte, error)
- func (a *AuthenticateResult) UnmarshalJSON(inBytes []byte) error
- type Client
- func (c *Client) ApiClient() *api.Client
- func (c *Client) Authenticate(ctx context.Context, authMethodId, command string, attributes map[string]any, ...) (*AuthenticateResult, error)
- func (c *Client) ChangeState(ctx context.Context, authMethodId string, version uint32, state string, ...) (*AuthMethodUpdateResult, error)
- func (c *Client) Create(ctx context.Context, resourceType string, scopeId string, opt ...Option) (*AuthMethodCreateResult, error)
- func (c *Client) Delete(ctx context.Context, id string, opt ...Option) (*AuthMethodDeleteResult, error)
- func (c *Client) List(ctx context.Context, scopeId string, opt ...Option) (*AuthMethodListResult, error)
- func (c *Client) ListNextPage(ctx context.Context, currentPage *AuthMethodListResult, opt ...Option) (*AuthMethodListResult, error)
- func (c *Client) Read(ctx context.Context, id string, opt ...Option) (*AuthMethodReadResult, error)
- func (c *Client) Update(ctx context.Context, id string, version uint32, opt ...Option) (*AuthMethodUpdateResult, error)
- type LdapAuthMethodAttributes
- type OidcAuthMethodAttributes
- type OidcAuthMethodAuthenticateStartResponse
- type Option
- func DefaultAttributes() Option
- func DefaultDescription() Option
- func DefaultLdapAuthMethodAccountAttributeMaps() Option
- func DefaultLdapAuthMethodAnonGroupSearch() Option
- func DefaultLdapAuthMethodBindDn() Option
- func DefaultLdapAuthMethodBindPassword() Option
- func DefaultLdapAuthMethodCertificates() Option
- func DefaultLdapAuthMethodClientCertificate() Option
- func DefaultLdapAuthMethodClientCertificateKey() Option
- func DefaultLdapAuthMethodDereferenceAliases() Option
- func DefaultLdapAuthMethodDiscoverDn() Option
- func DefaultLdapAuthMethodEnableGroups() Option
- func DefaultLdapAuthMethodGroupAttr() Option
- func DefaultLdapAuthMethodGroupDn() Option
- func DefaultLdapAuthMethodGroupFilter() Option
- func DefaultLdapAuthMethodInsecureTls() Option
- func DefaultLdapAuthMethodMaximumPageSize() Option
- func DefaultLdapAuthMethodStartTls() Option
- func DefaultLdapAuthMethodState() Option
- func DefaultLdapAuthMethodUpnDomain() Option
- func DefaultLdapAuthMethodUrls() Option
- func DefaultLdapAuthMethodUseTokenGroups() Option
- func DefaultLdapAuthMethodUserAttr() Option
- func DefaultLdapAuthMethodUserDn() Option
- func DefaultLdapAuthMethodUserFilter() Option
- func DefaultName() Option
- func DefaultOidcAuthMethodAccountClaimMaps() Option
- func DefaultOidcAuthMethodAllowInsecureIssuer() Option
- func DefaultOidcAuthMethodAllowedAudiences() Option
- func DefaultOidcAuthMethodApiUrlPrefix() Option
- func DefaultOidcAuthMethodClaimsScopes() Option
- func DefaultOidcAuthMethodClientId() Option
- func DefaultOidcAuthMethodClientSecret() Option
- func DefaultOidcAuthMethodDisableDiscoveredConfigValidation() Option
- func DefaultOidcAuthMethodDryRun() Option
- func DefaultOidcAuthMethodIdpCaCerts() Option
- func DefaultOidcAuthMethodIssuer() Option
- func DefaultOidcAuthMethodMaxAge() Option
- func DefaultOidcAuthMethodPrompts() Option
- func DefaultOidcAuthMethodProviderType() Option
- func DefaultOidcAuthMethodSigningAlgorithms() Option
- func DefaultPasswordAuthMethodMinLoginNameLength() Option
- func DefaultPasswordAuthMethodMinPasswordLength() Option
- func WithAttributes(inAttributes map[string]interface{}) Option
- func WithAutomaticVersioning(enable bool) Option
- func WithClientDirectedPagination(with bool) Option
- func WithDescription(inDescription string) Option
- func WithFilter(filter string) Option
- func WithLdapAuthMethodAccountAttributeMaps(inAccountAttributeMaps []string) Option
- func WithLdapAuthMethodAnonGroupSearch(inAnonGroupSearch bool) Option
- func WithLdapAuthMethodBindDn(inBindDn string) Option
- func WithLdapAuthMethodBindPassword(inBindPassword string) Option
- func WithLdapAuthMethodCertificates(inCertificates []string) Option
- func WithLdapAuthMethodClientCertificate(inClientCertificate string) Option
- func WithLdapAuthMethodClientCertificateKey(inClientCertificateKey string) Option
- func WithLdapAuthMethodDereferenceAliases(inDereferenceAliases string) Option
- func WithLdapAuthMethodDiscoverDn(inDiscoverDn bool) Option
- func WithLdapAuthMethodEnableGroups(inEnableGroups bool) Option
- func WithLdapAuthMethodGroupAttr(inGroupAttr string) Option
- func WithLdapAuthMethodGroupDn(inGroupDn string) Option
- func WithLdapAuthMethodGroupFilter(inGroupFilter string) Option
- func WithLdapAuthMethodInsecureTls(inInsecureTls bool) Option
- func WithLdapAuthMethodMaximumPageSize(inMaximumPageSize uint32) Option
- func WithLdapAuthMethodStartTls(inStartTls bool) Option
- func WithLdapAuthMethodState(inState string) Option
- func WithLdapAuthMethodUpnDomain(inUpnDomain string) Option
- func WithLdapAuthMethodUrls(inUrls []string) Option
- func WithLdapAuthMethodUseTokenGroups(inUseTokenGroups bool) Option
- func WithLdapAuthMethodUserAttr(inUserAttr string) Option
- func WithLdapAuthMethodUserDn(inUserDn string) Option
- func WithLdapAuthMethodUserFilter(inUserFilter string) Option
- func WithListToken(listToken string) Option
- func WithName(inName string) Option
- func WithOidcAuthMethodAccountClaimMaps(inAccountClaimMaps []string) Option
- func WithOidcAuthMethodAllowInsecureIssuer(inAllowInsecureIssuer bool) Option
- func WithOidcAuthMethodAllowedAudiences(inAllowedAudiences []string) Option
- func WithOidcAuthMethodApiUrlPrefix(inApiUrlPrefix string) Option
- func WithOidcAuthMethodClaimsScopes(inClaimsScopes []string) Option
- func WithOidcAuthMethodClientId(inClientId string) Option
- func WithOidcAuthMethodClientSecret(inClientSecret string) Option
- func WithOidcAuthMethodDisableDiscoveredConfigValidation(inDisableDiscoveredConfigValidation bool) Option
- func WithOidcAuthMethodDryRun(inDryRun bool) Option
- func WithOidcAuthMethodIdpCaCerts(inIdpCaCerts []string) Option
- func WithOidcAuthMethodIssuer(inIssuer string) Option
- func WithOidcAuthMethodMaxAge(inMaxAge uint32) Option
- func WithOidcAuthMethodPrompts(inPrompts []string) Option
- func WithOidcAuthMethodProviderType(inProviderType string) Option
- func WithOidcAuthMethodSigningAlgorithms(inSigningAlgorithms []string) Option
- func WithPageSize(with uint32) Option
- func WithPasswordAuthMethodMinLoginNameLength(inMinLoginNameLength uint32) Option
- func WithPasswordAuthMethodMinPasswordLength(inMinPasswordLength uint32) Option
- func WithRecursive(recurse bool) Option
- func WithResourcePathOverride(path string) Option
- func WithSkipCurlOutput(skip bool) Option
- type PasswordAuthMethodAttributes
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthMethod ¶
type AuthMethod struct {
Id string `json:"id,omitempty"`
ScopeId string `json:"scope_id,omitempty"`
Scope *scopes.ScopeInfo `json:"scope,omitempty"`
Name string `json:"name,omitempty"`
Description string `json:"description,omitempty"`
CreatedTime time.Time `json:"created_time,omitempty"`
UpdatedTime time.Time `json:"updated_time,omitempty"`
Version uint32 `json:"version,omitempty"`
Type string `json:"type,omitempty"`
Attributes map[string]interface{} `json:"attributes,omitempty"`
IsPrimary bool `json:"is_primary,omitempty"`
AuthorizedActions []string `json:"authorized_actions,omitempty"`
AuthorizedCollectionActions map[string][]string `json:"authorized_collection_actions,omitempty"`
}
func (*AuthMethod) GetLdapAuthMethodAttributes ¶
func (pt *AuthMethod) GetLdapAuthMethodAttributes() (*LdapAuthMethodAttributes, error)
func (*AuthMethod) GetOidcAuthMethodAttributes ¶
func (pt *AuthMethod) GetOidcAuthMethodAttributes() (*OidcAuthMethodAttributes, error)
func (*AuthMethod) GetPasswordAuthMethodAttributes ¶
func (pt *AuthMethod) GetPasswordAuthMethodAttributes() (*PasswordAuthMethodAttributes, error)
type AuthMethodCreateResult ¶
type AuthMethodCreateResult = AuthMethodReadResult
type AuthMethodDeleteResult ¶
func (AuthMethodDeleteResult) GetItem ¶
func (n AuthMethodDeleteResult) GetItem() any
GetItem will always be nil for AuthMethodDeleteResult
func (AuthMethodDeleteResult) GetResponse ¶
func (n AuthMethodDeleteResult) GetResponse() *api.Response
type AuthMethodListResult ¶
type AuthMethodListResult struct {
Items []*AuthMethod `json:"items,omitempty"`
EstItemCount uint `json:"est_item_count,omitempty"`
RemovedIds []string `json:"removed_ids,omitempty"`
ListToken string `json:"list_token,omitempty"`
ResponseType string `json:"response_type,omitempty"`
Response *api.Response
// contains filtered or unexported fields
}
func (AuthMethodListResult) GetEstItemCount ¶
func (n AuthMethodListResult) GetEstItemCount() uint
func (AuthMethodListResult) GetItems ¶
func (n AuthMethodListResult) GetItems() []*AuthMethod
func (AuthMethodListResult) GetListToken ¶
func (n AuthMethodListResult) GetListToken() string
func (AuthMethodListResult) GetRemovedIds ¶
func (n AuthMethodListResult) GetRemovedIds() []string
func (AuthMethodListResult) GetResponse ¶
func (n AuthMethodListResult) GetResponse() *api.Response
func (AuthMethodListResult) GetResponseType ¶
func (n AuthMethodListResult) GetResponseType() string
type AuthMethodReadResult ¶
type AuthMethodReadResult struct {
Item *AuthMethod
Response *api.Response
}
func (AuthMethodReadResult) GetItem ¶
func (n AuthMethodReadResult) GetItem() *AuthMethod
func (AuthMethodReadResult) GetResponse ¶
func (n AuthMethodReadResult) GetResponse() *api.Response
type AuthMethodUpdateResult ¶
type AuthMethodUpdateResult = AuthMethodReadResult
type AuthenticateResult ¶
type AuthenticateResult struct {
Command string `json:"-"`
Attributes map[string]any `json:"-"`
// contains filtered or unexported fields
}
func (AuthenticateResult) GetAuthToken ¶
func (a AuthenticateResult) GetAuthToken() (*authtokens.AuthToken, error)
GetAuthToken converts this AuthenticateResult into an AuthToken struct
func (AuthenticateResult) GetRawAttributes ¶
func (a AuthenticateResult) GetRawAttributes() json.RawMessage
func (AuthenticateResult) GetResponse ¶
func (a AuthenticateResult) GetResponse() *api.Response
func (*AuthenticateResult) MarshalJSON ¶
func (a *AuthenticateResult) MarshalJSON() ([]byte, error)
func (*AuthenticateResult) UnmarshalJSON ¶
func (a *AuthenticateResult) UnmarshalJSON(inBytes []byte) error
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a client for this collection
func NewClient ¶
Creates a new client for this collection. The submitted API client is cloned; modifications to it after generating this client will not have effect. If you need to make changes to the underlying API client, use ApiClient() to access it.
func (*Client) Authenticate ¶
func (c *Client) Authenticate(ctx context.Context, authMethodId, command string, attributes map[string]any, opt ...Option) (*AuthenticateResult, error)
Authenticate is a generic authenticate API call that returns a generic result. See the documentation for the attributes required for any given auth method.
Only some auth methods support multiple commands. If the documentation does not specify what command to use when and with which attriubutes, use "login".
func (*Client) ChangeState ¶
func (*Client) ListNextPage ¶
func (c *Client) ListNextPage(ctx context.Context, currentPage *AuthMethodListResult, opt ...Option) (*AuthMethodListResult, error)
type LdapAuthMethodAttributes ¶
type LdapAuthMethodAttributes struct {
State string `json:"state,omitempty"`
StartTls bool `json:"start_tls,omitempty"`
InsecureTls bool `json:"insecure_tls,omitempty"`
DiscoverDn bool `json:"discover_dn,omitempty"`
AnonGroupSearch bool `json:"anon_group_search,omitempty"`
UpnDomain string `json:"upn_domain,omitempty"`
Urls []string `json:"urls,omitempty"`
UserDn string `json:"user_dn,omitempty"`
UserAttr string `json:"user_attr,omitempty"`
UserFilter string `json:"user_filter,omitempty"`
EnableGroups bool `json:"enable_groups,omitempty"`
GroupDn string `json:"group_dn,omitempty"`
GroupAttr string `json:"group_attr,omitempty"`
GroupFilter string `json:"group_filter,omitempty"`
Certificates []string `json:"certificates,omitempty"`
ClientCertificate string `json:"client_certificate,omitempty"`
ClientCertificateKey string `json:"client_certificate_key,omitempty"`
ClientCertificateKeyHmac string `json:"client_certificate_key_hmac,omitempty"`
BindDn string `json:"bind_dn,omitempty"`
BindPassword string `json:"bind_password,omitempty"`
BindPasswordHmac string `json:"bind_password_hmac,omitempty"`
UseTokenGroups bool `json:"use_token_groups,omitempty"`
AccountAttributeMaps []string `json:"account_attribute_maps,omitempty"`
MaximumPageSize uint32 `json:"maximum_page_size,omitempty"`
DereferenceAliases string `json:"dereference_aliases,omitempty"`
}
func AttributesMapToLdapAuthMethodAttributes ¶
func AttributesMapToLdapAuthMethodAttributes(in map[string]any) (*LdapAuthMethodAttributes, error)
type OidcAuthMethodAttributes ¶
type OidcAuthMethodAttributes struct {
State string `json:"state,omitempty"`
Issuer string `json:"issuer,omitempty"`
ClientId string `json:"client_id,omitempty"`
ClientSecret string `json:"client_secret,omitempty"`
ClientSecretHmac string `json:"client_secret_hmac,omitempty"`
MaxAge uint32 `json:"max_age,omitempty"`
SigningAlgorithms []string `json:"signing_algorithms,omitempty"`
ApiUrlPrefix string `json:"api_url_prefix,omitempty"`
CallbackUrl string `json:"callback_url,omitempty"`
IdpCaCerts []string `json:"idp_ca_certs,omitempty"`
AllowedAudiences []string `json:"allowed_audiences,omitempty"`
ClaimsScopes []string `json:"claims_scopes,omitempty"`
AccountClaimMaps []string `json:"account_claim_maps,omitempty"`
DisableDiscoveredConfigValidation bool `json:"disable_discovered_config_validation,omitempty"`
DryRun bool `json:"dry_run,omitempty"`
Prompts []string `json:"prompts,omitempty"`
ProviderType string `json:"provider_type,omitempty"`
AllowInsecureIssuer bool `json:"allow_insecure_issuer,omitempty"`
}
func AttributesMapToOidcAuthMethodAttributes ¶
func AttributesMapToOidcAuthMethodAttributes(in map[string]any) (*OidcAuthMethodAttributes, error)
type Option ¶
type Option func(*options)
Option is a func that sets optional attributes for a call. This does not need to be used directly, but instead option arguments are built from the functions in this package. WithX options set a value to that given in the argument; DefaultX options indicate that the value should be set to its default. When an API call is made options are processed in the order they appear in the function call, so for a given argument X, a succession of WithX or DefaultX calls will result in the last call taking effect.
func DefaultAttributes ¶
func DefaultAttributes() Option
func DefaultDescription ¶
func DefaultDescription() Option
func DefaultLdapAuthMethodAccountAttributeMaps ¶
func DefaultLdapAuthMethodAccountAttributeMaps() Option
func DefaultLdapAuthMethodAnonGroupSearch ¶
func DefaultLdapAuthMethodAnonGroupSearch() Option
func DefaultLdapAuthMethodBindDn ¶
func DefaultLdapAuthMethodBindDn() Option
func DefaultLdapAuthMethodBindPassword ¶
func DefaultLdapAuthMethodBindPassword() Option
func DefaultLdapAuthMethodCertificates ¶
func DefaultLdapAuthMethodCertificates() Option
func DefaultLdapAuthMethodClientCertificate ¶
func DefaultLdapAuthMethodClientCertificate() Option
func DefaultLdapAuthMethodClientCertificateKey ¶
func DefaultLdapAuthMethodClientCertificateKey() Option
func DefaultLdapAuthMethodDereferenceAliases ¶
func DefaultLdapAuthMethodDereferenceAliases() Option
func DefaultLdapAuthMethodDiscoverDn ¶
func DefaultLdapAuthMethodDiscoverDn() Option
func DefaultLdapAuthMethodEnableGroups ¶
func DefaultLdapAuthMethodEnableGroups() Option
func DefaultLdapAuthMethodGroupAttr ¶
func DefaultLdapAuthMethodGroupAttr() Option
func DefaultLdapAuthMethodGroupDn ¶
func DefaultLdapAuthMethodGroupDn() Option
func DefaultLdapAuthMethodGroupFilter ¶
func DefaultLdapAuthMethodGroupFilter() Option
func DefaultLdapAuthMethodInsecureTls ¶
func DefaultLdapAuthMethodInsecureTls() Option
func DefaultLdapAuthMethodMaximumPageSize ¶
func DefaultLdapAuthMethodMaximumPageSize() Option
func DefaultLdapAuthMethodStartTls ¶
func DefaultLdapAuthMethodStartTls() Option
func DefaultLdapAuthMethodState ¶
func DefaultLdapAuthMethodState() Option
func DefaultLdapAuthMethodUpnDomain ¶
func DefaultLdapAuthMethodUpnDomain() Option
func DefaultLdapAuthMethodUrls ¶
func DefaultLdapAuthMethodUrls() Option
func DefaultLdapAuthMethodUseTokenGroups ¶
func DefaultLdapAuthMethodUseTokenGroups() Option
func DefaultLdapAuthMethodUserAttr ¶
func DefaultLdapAuthMethodUserAttr() Option
func DefaultLdapAuthMethodUserDn ¶
func DefaultLdapAuthMethodUserDn() Option
func DefaultLdapAuthMethodUserFilter ¶
func DefaultLdapAuthMethodUserFilter() Option
func DefaultName ¶
func DefaultName() Option
func DefaultOidcAuthMethodAccountClaimMaps ¶
func DefaultOidcAuthMethodAccountClaimMaps() Option
func DefaultOidcAuthMethodAllowInsecureIssuer ¶ added in v0.1.2
func DefaultOidcAuthMethodAllowInsecureIssuer() Option
func DefaultOidcAuthMethodAllowedAudiences ¶
func DefaultOidcAuthMethodAllowedAudiences() Option
func DefaultOidcAuthMethodApiUrlPrefix ¶
func DefaultOidcAuthMethodApiUrlPrefix() Option
func DefaultOidcAuthMethodClaimsScopes ¶
func DefaultOidcAuthMethodClaimsScopes() Option
func DefaultOidcAuthMethodClientId ¶
func DefaultOidcAuthMethodClientId() Option
func DefaultOidcAuthMethodClientSecret ¶
func DefaultOidcAuthMethodClientSecret() Option
func DefaultOidcAuthMethodDisableDiscoveredConfigValidation ¶
func DefaultOidcAuthMethodDisableDiscoveredConfigValidation() Option
func DefaultOidcAuthMethodDryRun ¶
func DefaultOidcAuthMethodDryRun() Option
func DefaultOidcAuthMethodIdpCaCerts ¶
func DefaultOidcAuthMethodIdpCaCerts() Option
func DefaultOidcAuthMethodIssuer ¶
func DefaultOidcAuthMethodIssuer() Option
func DefaultOidcAuthMethodMaxAge ¶
func DefaultOidcAuthMethodMaxAge() Option
func DefaultOidcAuthMethodPrompts ¶
func DefaultOidcAuthMethodPrompts() Option
func DefaultOidcAuthMethodProviderType ¶
func DefaultOidcAuthMethodProviderType() Option
func DefaultOidcAuthMethodSigningAlgorithms ¶
func DefaultOidcAuthMethodSigningAlgorithms() Option
func DefaultPasswordAuthMethodMinLoginNameLength ¶
func DefaultPasswordAuthMethodMinLoginNameLength() Option
func DefaultPasswordAuthMethodMinPasswordLength ¶
func DefaultPasswordAuthMethodMinPasswordLength() Option
func WithAttributes ¶
func WithAutomaticVersioning ¶
If set, and if the version is zero during an update, the API will perform a fetch to get the current version of the resource and populate it during the update call. This is convenient but opens up the possibility for subtle order-of-modification issues, so use carefully.
func WithClientDirectedPagination ¶
WithClientDirectedPagination tells the List function to return only the first page, if more pages are available
func WithDescription ¶
func WithFilter ¶
WithFilter tells the API to filter the items returned using the provided filter term. The filter should be in a format supported by hashicorp/go-bexpr.
func WithLdapAuthMethodState ¶
func WithLdapAuthMethodUrls ¶
func WithListToken ¶
WithListToken tells the API to use the provided list token for listing operations on this resource.
func WithOidcAuthMethodAllowInsecureIssuer ¶ added in v0.1.2
func WithPageSize ¶
WithPageSize controls the size of pages used during List
func WithRecursive ¶
WithRecursive tells the API to use recursion for listing operations on this resource
func WithResourcePathOverride ¶
WithResourcePathOverride tells the API to use the provided resource path
func WithSkipCurlOutput ¶
WithSkipCurlOutput tells the API to not use the current call for cURL output. Useful for when we need to look up versions.
type PasswordAuthMethodAttributes ¶
type PasswordAuthMethodAttributes struct {
MinLoginNameLength uint32 `json:"min_login_name_length,omitempty"`
MinPasswordLength uint32 `json:"min_password_length,omitempty"`
}
func AttributesMapToPasswordAuthMethodAttributes ¶
func AttributesMapToPasswordAuthMethodAttributes(in map[string]any) (*PasswordAuthMethodAttributes, error)