gocloak

package
v0.0.0-...-af4d92e Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package gocloak is a golang keycloak adaptor.

Index

Constants

This section is empty.

Variables

View Source
var (
	ENFORCING  = PolicyEnforcementModeP("ENFORCING")
	PERMISSIVE = PolicyEnforcementModeP("PERMISSIVE")
	DISABLED   = PolicyEnforcementModeP("DISABLED")
)

PolicyEnforcementMode values

View Source
var (
	POSITIVE = LogicP("POSITIVE")
	NEGATIVE = LogicP("NEGATIVE")
)

Logic values

View Source
var (
	AFFIRMATIVE = DecisionStrategyP("AFFIRMATIVE")
	UNANIMOUS   = DecisionStrategyP("UNANIMOUS")
	CONSENSUS   = DecisionStrategyP("CONSENSUS")
)

DecisionStrategy values

Functions

func BoolP

func BoolP(value bool) *bool

BoolP returns a pointer of a boolean variable

func Float32P

func Float32P(value float32) *float32

Float32P returns a pointer of a float32 variable

func Float64P

func Float64P(value float64) *float64

Float64P returns a pointer of a float64 variable

func GetQueryParams

func GetQueryParams(s interface{}) (map[string]string, error)

GetQueryParams converts the struct to map[string]string The fields tags must have `json:"<name>,string,omitempty"` format for all types, except strings The string fields must have: `json:"<name>,omitempty"`. The `json:"<name>,string,omitempty"` tag for string field will add additional double quotes. "string" tag allows to convert the non-string fields of a structure to map[string]string. "omitempty" allows to skip the fields with default values.

func Int32P

func Int32P(value int32) *int32

Int32P returns a pointer of an int32 variable

func Int64P

func Int64P(value int64) *int64

Int64P returns a pointer of an int64 variable

func IntP

func IntP(value int) *int

IntP returns a pointer of an integer variable

func NilOrEmpty

func NilOrEmpty(value *string) bool

NilOrEmpty returns true if string is empty or has a nil value

func NilOrEmptyArray

func NilOrEmptyArray(value *[]string) bool

NilOrEmptyArray returns true if string is empty or has a nil value

func NilOrEmptySlice

func NilOrEmptySlice(value *[]string) bool

NilOrEmptySlice returns true if list is empty or has a nil value

func PBool

func PBool(value *bool) bool

PBool returns a boolean value from a pointer

func PFloat32

func PFloat32(value *float32) float32

PFloat32 returns an flaot32 value from a pointer

func PFloat64

func PFloat64(value *float64) float64

PFloat64 returns an flaot64 value from a pointer

func PInt

func PInt(value *int) int

PInt returns an integer value from a pointer

func PInt32

func PInt32(value *int32) int32

PInt32 returns an int32 value from a pointer

func PInt64

func PInt64(value *int64) int64

PInt64 returns an int64 value from a pointer

func PString

func PString(value *string) string

PString returns a string value from a pointer

func PStringSlice

func PStringSlice(value *[]string) []string

PStringSlice converts a pointer to []string or returns ampty slice if nill value

func SetAuthAdminRealms

func SetAuthAdminRealms(url string) func(g *GoCloak)

SetAuthAdminRealms sets the auth admin realm

func SetAuthRealms

func SetAuthRealms(url string) func(g *GoCloak)

SetAuthRealms sets the auth realm

func SetCertCacheInvalidationTime

func SetCertCacheInvalidationTime(duration time.Duration) func(g *GoCloak)

SetCertCacheInvalidationTime sets the logout

func SetLegacyWildFlySupport

func SetLegacyWildFlySupport() func(g *GoCloak)

SetLegacyWildFlySupport maintain legacy WildFly support.

func SetLogoutEndpoint

func SetLogoutEndpoint(url string) func(g *GoCloak)

SetLogoutEndpoint sets the logout

func SetOpenIDConnectEndpoint

func SetOpenIDConnectEndpoint(url string) func(g *GoCloak)

SetOpenIDConnectEndpoint sets the logout

func SetRevokeEndpoint

func SetRevokeEndpoint(url string) func(g *GoCloak)

SetRevokeEndpoint sets the revoke endpoint

func SetTokenEndpoint

func SetTokenEndpoint(url string) func(g *GoCloak)

SetTokenEndpoint sets the token endpoint

func StringP

func StringP(value string) *string

StringP returns a pointer of a string variable

func UserAttributeContains

func UserAttributeContains(attributes map[string][]string, attribute, value string) bool

UserAttributeContains checks if the given attribute value is set

func WithTracer

func WithTracer(ctx context.Context, tracer opentracing.Tracer) context.Context

WithTracer generates a context that has a tracer attached

Types

type APIErrType

type APIErrType string

APIErrType is a field containing more specific API error types that may be checked by the receiver.

const (
	// APIErrTypeUnknown is for API errors that are not strongly
	// typed.
	APIErrTypeUnknown APIErrType = "unknown"

	// APIErrTypeInvalidGrant corresponds with Keycloak's
	// OAuthErrorException due to "invalid_grant".
	APIErrTypeInvalidGrant = "oauth: invalid grant"
)

func ParseAPIErrType

func ParseAPIErrType(err error) APIErrType

ParseAPIErrType is a convenience method for returning strongly typed API errors.

type APIError

type APIError struct {
	Code    int        `json:"code"`
	Message string     `json:"message"`
	Type    APIErrType `json:"type"`
}

APIError holds message and statusCode for api errors

func (APIError) Error

func (apiError APIError) Error() string

Error stringifies the APIError

type Access

type Access struct {
	ManageGroupMembership *bool `json:"manageGroupMembership,omitempty"`
	View                  *bool `json:"view,omitempty"`
	MapRoles              *bool `json:"mapRoles,omitempty"`
	Impersonate           *bool `json:"impersonate,omitempty"`
	Manage                *bool `json:"manage,omitempty"`
}

Access represents access

func (*Access) String

func (v *Access) String() string

type AccessRepresentation

type AccessRepresentation struct {
	ManageGroupMembership *bool `json:"manageGroupMembership,omitempty"`
	View                  *bool `json:"view,omitempty"`
	MapRoles              *bool `json:"mapRoles,omitempty"`
	Impersonate           *bool `json:"impersonate,omitempty"`
	Manage                *bool `json:"manage,omitempty"`
}

AccessRepresentation represents the access parameters returned in the permission ticket description

func (*AccessRepresentation) String

func (v *AccessRepresentation) String() string

type ActiveKeys

type ActiveKeys struct {
	HS256 *string `json:"HS256,omitempty"`
	RS256 *string `json:"RS256,omitempty"`
	AES   *string `json:"AES,omitempty"`
}

ActiveKeys holds the active keys

func (*ActiveKeys) String

func (v *ActiveKeys) String() string

type AdapterConfiguration

type AdapterConfiguration struct {
	Realm            *string     `json:"realm"`
	AuthServerURL    *string     `json:"auth-server-url"`
	SSLRequired      *string     `json:"ssl-required"`
	Resource         *string     `json:"resource"`
	Credentials      interface{} `json:"credentials"`
	ConfidentialPort *int        `json:"confidential-port"`
}

AdapterConfiguration represents adapter configuration of a client

type AggregatedPolicyRepresentation

type AggregatedPolicyRepresentation struct {
	Policies *[]string `json:"policies,omitempty" diff:"policies"`
}

AggregatedPolicyRepresentation represents aggregated policies +kubebuilder:object:generate=true

func (*AggregatedPolicyRepresentation) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AggregatedPolicyRepresentation.

func (*AggregatedPolicyRepresentation) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*AggregatedPolicyRepresentation) String

type Attributes

type Attributes struct {
	LDAPENTRYDN *[]string `json:"LDAP_ENTRY_DN,omitempty"`
	LDAPID      *[]string `json:"LDAP_ID,omitempty"`
}

Attributes holds Attributes

func (*Attributes) String

func (v *Attributes) String() string

type AuthenticationExecutionRepresentation

type AuthenticationExecutionRepresentation struct {
	Authenticator       *string `json:"authenticator,omitempty"`
	AuthenticatorConfig *string `json:"authenticatorConfig,omitempty"`
	AuthenticatorFlow   *bool   `json:"authenticatorFlow,omitempty"`
	AutheticatorFlow    *bool   `json:"autheticatorFlow,omitempty"`
	FlowAlias           *string `json:"flowAlias,omitempty"`
	Priority            *int    `json:"priority,omitempty"`
	Requirement         *string `json:"requirement,omitempty"`
	UserSetupAllowed    *bool   `json:"userSetupAllowed,omitempty"`
}

AuthenticationExecutionRepresentation represents the authentication execution of an AuthenticationFlowRepresentation

type AuthenticationFlowRepresentation

type AuthenticationFlowRepresentation struct {
	Alias                    *string                                  `json:"alias,omitempty"`
	AuthenticationExecutions *[]AuthenticationExecutionRepresentation `json:"authenticationExecutions,omitempty"`
	BuiltIn                  *bool                                    `json:"builtIn,omitempty"`
	Description              *string                                  `json:"description,omitempty"`
	ID                       *string                                  `json:"id,omitempty"`
	ProviderID               *string                                  `json:"providerId,omitempty"`
	TopLevel                 *bool                                    `json:"topLevel,omitempty"`
}

AuthenticationFlowRepresentation represents an authentication flow of a realm

type AuthorizationParameters

type AuthorizationParameters struct {
	ResponseType *string `json:"code,omitempty"`
	ClientID     *string `json:"client_id,omitempty"`
	Scope        *string `json:"scope,omitempty"`
	RedirectURI  *string `json:"redirect_uri,omitempty"`
	State        *string `json:"state,omitempty"`
	Nonce        *string `json:"nonce,omitempty"`
	IDTokenHint  *string `json:"id_token_hint,omitempty"`
}

AuthorizationParameters represents the options to obtain get an authorization

func (*AuthorizationParameters) FormData

func (p *AuthorizationParameters) FormData() map[string]string

FormData returns a map of options to be used in SetFormData function

type AuthorizationResponse

type AuthorizationResponse struct {
}

AuthorizationResponse represents the response to an authorization request.

type BruteForceStatus

type BruteForceStatus struct {
	NumFailures   *int    `json:"numFailures,omitempty"`
	Disabled      *bool   `json:"disabled,omitempty"`
	LastIPFailure *string `json:"lastIPFailure,omitempty"`
	LastFailure   *int    `json:"lastFailure,omitempty"`
}

BruteForceStatus is a representation of realm user regarding brute force attack

func (*BruteForceStatus) String

func (v *BruteForceStatus) String() string

type BuiltinProtocolMappers

type BuiltinProtocolMappers struct {
	SAML          []ProtocolMapper `json:"saml,omitempty"`
	OpenIDConnect []ProtocolMapper `json:"openid-connect,omitempty"`
}

BuiltinProtocolMappers holds the currently available built-in blueprints of ProtocolMapper-s grouped by protocol

type CertResponse

type CertResponse struct {
	Keys *[]CertResponseKey `json:"keys,omitempty"`
}

CertResponse is returned by the certs endpoint

func (*CertResponse) String

func (v *CertResponse) String() string

type CertResponseKey

type CertResponseKey struct {
	Kid     *string   `json:"kid,omitempty"`
	Kty     *string   `json:"kty,omitempty"`
	Alg     *string   `json:"alg,omitempty"`
	Use     *string   `json:"use,omitempty"`
	N       *string   `json:"n,omitempty"`
	E       *string   `json:"e,omitempty"`
	X       *string   `json:"x,omitempty"`
	Y       *string   `json:"y,omitempty"`
	Crv     *string   `json:"crv,omitempty"`
	KeyOps  *[]string `json:"key_ops,omitempty"`
	X5u     *string   `json:"x5u,omitempty"`
	X5c     *[]string `json:"x5c,omitempty"`
	X5t     *string   `json:"x5t,omitempty"`
	X5tS256 *string   `json:"x5t#S256,omitempty"`
}

CertResponseKey is returned by the certs endpoint. JSON Web Key structure is described here: https://self-issued.info/docs/draft-ietf-jose-json-web-key.html#JWKContents

func (*CertResponseKey) String

func (v *CertResponseKey) String() string

Stringer implementations for all struct types

type Client

type Client struct {
	// Access options.
	// +optional
	Access *map[string]bool `json:"access,omitempty" diff:"access"`
	// Application Admin URL.
	// +kubebuilder:default=""
	AdminURL *string `json:"adminUrl,omitempty" diff:"adminUrl"`
	// Client Attributes.
	// +optional
	Attributes *map[string]string `json:"attributes,omitempty" diff:"-"`
	// Authentication Flow Binding Overrides.
	// +optional
	AuthenticationFlowBindingOverrides *map[string]string `json:"authenticationFlowBindingOverrides,omitempty" diff:"authenticationFlowBindingOverrides"`
	// True if fine-grained authorization support is enabled for this client.
	// +optional
	AuthorizationServicesEnabled *bool `json:"authorizationServicesEnabled,omitempty" diff:"authorizationServicesEnabled"`
	// Authorization settings for this resource server.
	// +optional
	AuthorizationSettings *ResourceServerRepresentation `json:"authorizationSettings,omitempty" diff:"authorizationSettings"`
	// // +kubebuilder:default=""
	BaseURL *string `json:"baseUrl,omitempty" diff:"baseUrl"`
	// +kubebuilder:default=false
	BearerOnly *bool `json:"bearerOnly,omitempty" diff:"bearerOnly"`
	// +kubebuilder:default=client-secret
	ClientAuthenticatorType *string `json:"clientAuthenticatorType,omitempty" diff:"clientAuthenticatorType"`
	// +optional
	ClientID *string `json:"clientId,omitempty" diff:"clientId"`
	// +kubebuilder:default=false
	ConsentRequired *bool `json:"consentRequired,omitempty" diff:"consentRequired"`
	// +kubebuilder:default={"acr", "email", "profile", "roles", "web-origins"}
	DefaultClientScopes *[]string `json:"defaultClientScopes,omitempty" diff:"defaultClientScopes"`
	// +kubebuilder:default=""
	Description *string `json:"description,omitempty" diff:"description"`
	// +kubebuilder:default=false
	DirectAccessGrantsEnabled *bool `json:"directAccessGrantsEnabled,omitempty" diff:"directAccessGrantsEnabled"`
	// +kubebuilder:default=true
	Enabled *bool `json:"enabled,omitempty" diff:"enabled"`
	// +kubebuilder:default=false
	FrontChannelLogout *bool `json:"frontchannelLogout,omitempty" diff:"frontchannelLogout"`
	// +kubebuilder:default=true
	FullScopeAllowed *bool `json:"fullScopeAllowed,omitempty" diff:"fullScopeAllowed"`
	// +optional
	ID *string `json:"id,omitempty" diff:"-"`
	// +kubebuilder:default=false
	ImplicitFlowEnabled *bool `json:"implicitFlowEnabled,omitempty" diff:"implicitFlowEnabled"`
	// +required
	Name *string `json:"name,omitempty" diff:"name"`
	// +kubebuilder:default=-1
	NodeReRegistrationTimeout *int32 `json:"nodeReRegistrationTimeout,omitempty" diff:"nodeReRegistrationTimeout"`
	// +kubebuilder:default=0
	NotBefore *int32 `json:"notBefore,omitempty" diff:"notBefore"`
	// +kubebuilder:default={"address", "phone", "offline_access", "microprofile-jwt"}
	OptionalClientScopes *[]string `json:"optionalClientScopes,omitempty" diff:"optionalClientScopes"`
	Origin               *string   `json:"origin,omitempty" diff:"origin"`
	// +kubebuilder:default="openid-connect"
	Protocol        *string           `json:"protocol,omitempty" diff:"protocol"`
	ProtocolMappers *[]ProtocolMapper `json:"protocolMappers,omitempty" diff:"protocolMappers"`
	// +kubebuilder:default=false
	PublicClient *bool `json:"publicClient,omitempty" diff:"publicClient"`
	// +optional
	RedirectURIs            *[]string       `json:"redirectUris,omitempty" diff:"redirectUris"`
	RegisteredNodes         *map[string]int `json:"registeredNodes,omitempty" diff:"registeredNodes"`
	RegistrationAccessToken *string         `json:"registrationAccessToken,omitempty" diff:"registrationAccessToken"`
	// +kubebuilder:default=""
	RootURL *string `json:"rootUrl,omitempty" diff:"rootUrl"`
	// +optional
	Secret *string `json:"secret,omitempty" diff:"-"`
	// +kubebuilder:default=false
	ServiceAccountsEnabled *bool `json:"serviceAccountsEnabled,omitempty" diff:"serviceAccountsEnabled"`
	// +kubebuilder:default=true
	StandardFlowEnabled *bool `json:"standardFlowEnabled,omitempty" diff:"standardFlowEnabled"`
	// +kubebuilder:default=false
	SurrogateAuthRequired *bool `json:"surrogateAuthRequired,omitempty" diff:"surrogateAuthRequired"`
	// +optional
	WebOrigins *[]string `json:"webOrigins,omitempty" diff:"webOrigins"`
}

Client is a ClientRepresentation +kubebuilder:object:generate=true

func (*Client) DeepCopy

func (in *Client) DeepCopy() *Client

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Client.

func (*Client) DeepCopyInto

func (in *Client) DeepCopyInto(out *Client)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Client) String

func (v *Client) String() string

type ClientMappingsRepresentation

type ClientMappingsRepresentation struct {
	ID       *string `json:"id,omitempty"`
	Client   *string `json:"client,omitempty"`
	Mappings *[]Role `json:"mappings,omitempty"`
}

ClientMappingsRepresentation is a client role mappings

func (*ClientMappingsRepresentation) String

type ClientPolicyRepresentation

type ClientPolicyRepresentation struct {
	Clients *[]string `json:"clients,omitempty" diff:"clients"`
}

ClientPolicyRepresentation represents client based policies +kubebuilder:object:generate=true

func (*ClientPolicyRepresentation) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClientPolicyRepresentation.

func (*ClientPolicyRepresentation) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ClientPolicyRepresentation) String

func (v *ClientPolicyRepresentation) String() string

type ClientScope

type ClientScope struct {
	// +optional
	ID *string `json:"id,omitempty" diff:"-"`
	// +required
	Name *string `json:"name,omitempty" diff:"name"`
	// +kubebuilder:default=""
	Description *string `json:"description,omitempty" diff:"description"`
	// +kubebuilder:validation:Enum=openid-connect;saml
	// +kubebuilder:default="openid-connect"
	Protocol              *string                `json:"protocol,omitempty" diff:"protocol"`
	ClientScopeAttributes *ClientScopeAttributes `json:"attributes,omitempty" diff:"attributes"`
	ProtocolMappers       *[]ProtocolMapper      `json:"protocolMappers,omitempty" diff:"-"`
}

ClientScope is a ClientScope +kubebuilder:object:generate=true

func (*ClientScope) DeepCopy

func (in *ClientScope) DeepCopy() *ClientScope

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClientScope.

func (*ClientScope) DeepCopyInto

func (in *ClientScope) DeepCopyInto(out *ClientScope)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ClientScope) String

func (v *ClientScope) String() string

type ClientScopeAttributes

type ClientScopeAttributes struct {
	ConsentScreenText      *string `json:"consent.screen.text,omitempty" diff:"consent.screen.text"`
	DisplayOnConsentScreen *string `json:"display.on.consent.screen,omitempty" diff:"display.on.consent.screen"`
	IncludeInTokenScope    *string `json:"include.in.token.scope,omitempty" diff:"include.in.token.scope"`
}

ClientScopeAttributes are attributes of client scopes +kubebuilder:object:generate=true

func (*ClientScopeAttributes) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClientScopeAttributes.

func (*ClientScopeAttributes) DeepCopyInto

func (in *ClientScopeAttributes) DeepCopyInto(out *ClientScopeAttributes)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ClientScopeAttributes) String

func (v *ClientScopeAttributes) String() string

type Component

type Component struct {
	ID              *string              `json:"id,omitempty"`
	Name            *string              `json:"name,omitempty"`
	ProviderID      *string              `json:"providerId,omitempty"`
	ProviderType    *string              `json:"providerType,omitempty"`
	ParentID        *string              `json:"parentId,omitempty"`
	ComponentConfig *map[string][]string `json:"config,omitempty"`
	SubType         *string              `json:"subType,omitempty"`
}

Component is a component

func (*Component) String

func (v *Component) String() string

type CompositesRepresentation

type CompositesRepresentation struct {
	Client *map[string][]string `json:"client,omitempty"`
	Realm  *[]string            `json:"realm,omitempty"`
}

CompositesRepresentation represents the composite roles of a role +kubebuilder:object:generate=true

func (*CompositesRepresentation) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CompositesRepresentation.

func (*CompositesRepresentation) DeepCopyInto

func (in *CompositesRepresentation) DeepCopyInto(out *CompositesRepresentation)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*CompositesRepresentation) String

func (v *CompositesRepresentation) String() string

type CreateAuthenticationExecutionFlowRepresentation

type CreateAuthenticationExecutionFlowRepresentation struct {
	Alias       *string `json:"alias,omitempty"`
	Description *string `json:"description,omitempty"`
	Provider    *string `json:"provider,omitempty"`
	Type        *string `json:"type,omitempty"`
}

CreateAuthenticationExecutionFlowRepresentation contains the provider to be used for a new authentication representation

type CreateAuthenticationExecutionRepresentation

type CreateAuthenticationExecutionRepresentation struct {
	Provider *string `json:"provider,omitempty"`
}

CreateAuthenticationExecutionRepresentation contains the provider to be used for a new authentication representation

type CreatePermissionTicketParams

type CreatePermissionTicketParams struct {
	ResourceID     *string              `json:"resource_id,omitempty"`
	ResourceScopes *[]string            `json:"resource_scopes,omitempty"`
	Claims         *map[string][]string `json:"claims,omitempty"`
}

CreatePermissionTicketParams represents the optional parameters for getting a permission ticket

func (*CreatePermissionTicketParams) String

type CredentialRepresentation

type CredentialRepresentation struct {
	// Common part
	CreatedDate *int64  `json:"createdDate,omitempty"`
	Temporary   *bool   `json:"temporary,omitempty"`
	Type        *string `json:"type,omitempty"`
	Value       *string `json:"value,omitempty"`

	// <= v7
	Algorithm         *string             `json:"algorithm,omitempty"`
	Config            *MultiValuedHashMap `json:"config,omitempty"`
	Counter           *int32              `json:"counter,omitempty"`
	Device            *string             `json:"device,omitempty"`
	Digits            *int32              `json:"digits,omitempty"`
	HashIterations    *int32              `json:"hashIterations,omitempty"`
	HashedSaltedValue *string             `json:"hashedSaltedValue,omitempty"`
	Period            *int32              `json:"period,omitempty"`
	Salt              *string             `json:"salt,omitempty"`

	// >= v8
	CredentialData *string `json:"credentialData,omitempty"`
	ID             *string `json:"id,omitempty"`
	Priority       *int32  `json:"priority,omitempty"`
	SecretData     *string `json:"secretData,omitempty"`
	UserLabel      *string `json:"userLabel,omitempty"`
}

CredentialRepresentation is a representations of the credentials v7: https://www.keycloak.org/docs-api/7.0/rest-api/index.html#_credentialrepresentation v8: https://www.keycloak.org/docs-api/8.0/rest-api/index.html#_credentialrepresentation

func (*CredentialRepresentation) String

func (v *CredentialRepresentation) String() string

type DecisionStrategy

type DecisionStrategy string

DecisionStrategy is an enum type for DecisionStrategy of PolicyRepresentation

func DecisionStrategyP

func DecisionStrategyP(value DecisionStrategy) *DecisionStrategy

DecisionStrategyP returns a pointer for a DecisionStrategy value

type EnforcedString

type EnforcedString string

EnforcedString can be used when the expected value is string but Keycloak in some cases gives you mixed types

func (*EnforcedString) MarshalJSON

func (s *EnforcedString) MarshalJSON() ([]byte, error)

MarshalJSON return json marshal

func (*EnforcedString) UnmarshalJSON

func (s *EnforcedString) UnmarshalJSON(data []byte) error

UnmarshalJSON modify data as string before json unmarshal

type EventRepresentation

type EventRepresentation struct {
	Time      int64             `json:"time,omitempty"`
	Type      *string           `json:"type,omitempty"`
	RealmID   *string           `json:"realmId,omitempty"`
	ClientID  *string           `json:"clientId,omitempty"`
	UserID    *string           `json:"userId,omitempty"`
	SessionID *string           `json:"sessionId,omitempty"`
	IPAddress *string           `json:"ipAddress,omitempty"`
	Details   map[string]string `json:"details,omitempty"`
}

EventRepresentation is a representation of a Event

type ExecuteActionsEmail

type ExecuteActionsEmail struct {
	UserID      *string   `json:"-"`
	ClientID    *string   `json:"client_id,omitempty"`
	Lifespan    *int      `json:"lifespan,string,omitempty"`
	RedirectURI *string   `json:"redirect_uri,omitempty"`
	Actions     *[]string `json:"-"`
}

ExecuteActionsEmail represents parameters for executing action emails

func (*ExecuteActionsEmail) String

func (v *ExecuteActionsEmail) String() string

type FederatedIdentityRepresentation

type FederatedIdentityRepresentation struct {
	IdentityProvider *string `json:"identityProvider,omitempty"`
	UserID           *string `json:"userId,omitempty"`
	UserName         *string `json:"userName,omitempty"`
}

FederatedIdentityRepresentation represents an user federated identity

func (*FederatedIdentityRepresentation) String

type GetClientUserSessionsParams

type GetClientUserSessionsParams struct {
	First *int `json:"first,string,omitempty"`
	Max   *int `json:"max,string,omitempty"`
}

GetClientUserSessionsParams represents the optional parameters for getting user sessions associated with the client

func (*GetClientUserSessionsParams) String

func (v *GetClientUserSessionsParams) String() string

type GetClientsParams

type GetClientsParams struct {
	ClientID             *string `json:"clientId,omitempty"`
	ViewableOnly         *bool   `json:"viewableOnly,string,omitempty"`
	First                *int    `json:"first,string,omitempty"`
	Max                  *int    `json:"max,string,omitempty"`
	Search               *bool   `json:"search,string,omitempty"`
	SearchableAttributes *string `json:"q,omitempty"`
}

GetClientsParams represents the query parameters

func (*GetClientsParams) String

func (v *GetClientsParams) String() string

type GetComponentsParams

type GetComponentsParams struct {
	Name         *string `json:"name,omitempty"`
	ProviderType *string `json:"provider,omitempty"`
	ParentID     *string `json:"parent,omitempty"`
}

GetComponentsParams represents the optional parameters for getting components

func (*GetComponentsParams) String

func (v *GetComponentsParams) String() string

type GetEventsParams

type GetEventsParams struct {
	Client    *string  `json:"client,omitempty"`
	DateFrom  *string  `json:"dateFrom,omitempty"`
	DateTo    *string  `json:"dateTo,omitempty"`
	First     *int32   `json:"first,string,omitempty"`
	IPAddress *string  `json:"ipAddress,omitempty"`
	Max       *int32   `json:"max,string,omitempty"`
	Type      []string `json:"type,omitempty"`
	UserID    *string  `json:"user,omitempty"`
}

GetEventsParams represents the optional parameters for getting events

type GetGroupsParams

type GetGroupsParams struct {
	BriefRepresentation *bool   `json:"briefRepresentation,string,omitempty"`
	Exact               *bool   `json:"exact,string,omitempty"`
	First               *int    `json:"first,string,omitempty"`
	Full                *bool   `json:"full,string,omitempty"`
	Max                 *int    `json:"max,string,omitempty"`
	Q                   *string `json:"q,omitempty"`
	Search              *string `json:"search,omitempty"`
}

GetGroupsParams represents the optional parameters for getting groups

func (GetGroupsParams) MarshalJSON

func (obj GetGroupsParams) MarshalJSON() ([]byte, error)

MarshalJSON is a custom json marshaling function to automatically set the Full and BriefRepresentation properties for backward compatibility

func (*GetGroupsParams) String

func (obj *GetGroupsParams) String() string

type GetPermissionParams

type GetPermissionParams struct {
	First    *int    `json:"first,string,omitempty"`
	Max      *int    `json:"max,string,omitempty"`
	Name     *string `json:"name,omitempty"`
	Resource *string `json:"resource,omitempty"`
	Scope    *string `json:"scope,omitempty"`
	Type     *string `json:"type,omitempty"`
}

GetPermissionParams represents the optional parameters for getting permissions

func (*GetPermissionParams) String

func (v *GetPermissionParams) String() string

type GetPolicyParams

type GetPolicyParams struct {
	First      *int    `json:"first,string,omitempty"`
	Max        *int    `json:"max,string,omitempty"`
	Name       *string `json:"name,omitempty"`
	Permission *bool   `json:"permission,string,omitempty"`
	Type       *string `json:"type,omitempty"`
}

GetPolicyParams represents the optional parameters for getting policies TODO: more policy params?

func (*GetPolicyParams) String

func (v *GetPolicyParams) String() string

type GetResourceParams

type GetResourceParams struct {
	Deep        *bool   `json:"deep,string,omitempty"`
	First       *int    `json:"first,string,omitempty"`
	Max         *int    `json:"max,string,omitempty"`
	Name        *string `json:"name,omitempty"`
	Owner       *string `json:"owner,omitempty"`
	Type        *string `json:"type,omitempty"`
	URI         *string `json:"uri,omitempty"`
	Scope       *string `json:"scope,omitempty"`
	MatchingURI *bool   `json:"matchingUri,string,omitempty"`
	ExactName   *bool   `json:"exactName,string,omitempty"`
}

GetResourceParams represents the optional parameters for getting resources

func (*GetResourceParams) String

func (v *GetResourceParams) String() string

type GetResourcePoliciesParams

type GetResourcePoliciesParams struct {
	ResourceID *string `json:"resource,omitempty"`
	Name       *string `json:"name,omitempty"`
	Scope      *string `json:"scope,omitempty"`
	First      *int    `json:"first,string,omitempty"`
	Max        *int    `json:"max,string,omitempty"`
}

GetResourcePoliciesParams is a representation of the query params for getting policies

func (*GetResourcePoliciesParams) String

func (v *GetResourcePoliciesParams) String() string

type GetRoleParams

type GetRoleParams struct {
	First               *int    `json:"first,string,omitempty"`
	Max                 *int    `json:"max,string,omitempty"`
	Search              *string `json:"search,omitempty"`
	BriefRepresentation *bool   `json:"briefRepresentation,string,omitempty"`
}

GetRoleParams represents the optional parameters for getting roles

func (*GetRoleParams) String

func (v *GetRoleParams) String() string

type GetScopeParams

type GetScopeParams struct {
	Deep  *bool   `json:"deep,string,omitempty"`
	First *int    `json:"first,string,omitempty"`
	Max   *int    `json:"max,string,omitempty"`
	Name  *string `json:"name,omitempty"`
}

GetScopeParams represents the optional parameters for getting scopes

func (*GetScopeParams) String

func (v *GetScopeParams) String() string

type GetUserPermissionParams

type GetUserPermissionParams struct {
	ScopeID     *string `json:"scopeId,omitempty"`
	ResourceID  *string `json:"resourceId,omitempty"`
	Owner       *string `json:"owner,omitempty"`
	Requester   *string `json:"requester,omitempty"`
	Granted     *bool   `json:"granted,omitempty"`
	ReturnNames *string `json:"returnNames,omitempty"`
	First       *int    `json:"first,string,omitempty"`
	Max         *int    `json:"max,string,omitempty"`
}

GetUserPermissionParams represents the optional parameters for getting user permissions

func (*GetUserPermissionParams) String

func (v *GetUserPermissionParams) String() string

type GetUsersByRoleParams

type GetUsersByRoleParams struct {
	First *int `json:"first,string,omitempty"`
	Max   *int `json:"max,string,omitempty"`
}

GetUsersByRoleParams represents the optional parameters for getting users by role

func (*GetUsersByRoleParams) String

func (v *GetUsersByRoleParams) String() string

type GetUsersParams

type GetUsersParams struct {
	BriefRepresentation *bool   `json:"briefRepresentation,string,omitempty"`
	Email               *string `json:"email,omitempty"`
	EmailVerified       *bool   `json:"emailVerified,string,omitempty"`
	Enabled             *bool   `json:"enabled,string,omitempty"`
	Exact               *bool   `json:"exact,string,omitempty"`
	First               *int    `json:"first,string,omitempty"`
	FirstName           *string `json:"firstName,omitempty"`
	IDPAlias            *string `json:"idpAlias,omitempty"`
	IDPUserID           *string `json:"idpUserId,omitempty"`
	LastName            *string `json:"lastName,omitempty"`
	Max                 *int    `json:"max,string,omitempty"`
	Q                   *string `json:"q,omitempty"`
	Search              *string `json:"search,omitempty"`
	Username            *string `json:"username,omitempty"`
}

GetUsersParams represents the optional parameters for getting users

func (*GetUsersParams) String

func (v *GetUsersParams) String() string

type GoCloak

type GoCloak struct {
	Config struct {
		CertsInvalidateTime time.Duration
		// contains filtered or unexported fields
	}
	// contains filtered or unexported fields
}

GoCloak provides functionalities to talk to Keycloak.

func NewClient

func NewClient(basePath string, options ...func(*GoCloak)) *GoCloak

NewClient creates a new Client

func (*GoCloak) AddClientRoleComposite

func (g *GoCloak) AddClientRoleComposite(ctx context.Context, token, realm, roleID string, roles []Role) error

AddClientRoleComposite adds roles as composite

func (*GoCloak) AddClientRoleToGroup deprecated

func (g *GoCloak) AddClientRoleToGroup(ctx context.Context, token, realm, idOfClient, groupID string, roles []Role) error

AddClientRoleToGroup adds a client role to the group

Deprecated: replaced by AddClientRolesToGroup

func (*GoCloak) AddClientRoleToUser deprecated

func (g *GoCloak) AddClientRoleToUser(ctx context.Context, token, realm, idOfClient, userID string, roles []Role) error

AddClientRoleToUser adds client-level role mappings

Deprecated: replaced by AddClientRolesToUser

func (*GoCloak) AddClientRolesToGroup

func (g *GoCloak) AddClientRolesToGroup(ctx context.Context, token, realm, idOfClient, groupID string, roles []Role) error

AddClientRolesToGroup adds a client role to the group

func (*GoCloak) AddClientRolesToUser

func (g *GoCloak) AddClientRolesToUser(ctx context.Context, token, realm, idOfClient, userID string, roles []Role) error

AddClientRolesToUser adds client-level role mappings

func (*GoCloak) AddDefaultGroup

func (g *GoCloak) AddDefaultGroup(ctx context.Context, token, realm, groupID string) error

AddDefaultGroup adds group to the list of default groups

func (*GoCloak) AddDefaultScopeToClient

func (g *GoCloak) AddDefaultScopeToClient(ctx context.Context, token, realm, idOfClient, scopeID string) error

AddDefaultScopeToClient adds a client scope to the list of client's default scopes

func (*GoCloak) AddOptionalScopeToClient

func (g *GoCloak) AddOptionalScopeToClient(ctx context.Context, token, realm, idOfClient, scopeID string) error

AddOptionalScopeToClient adds a client scope to the list of client's optional scopes

func (*GoCloak) AddRealmRoleComposite

func (g *GoCloak) AddRealmRoleComposite(ctx context.Context, token, realm, roleName string, roles []Role) error

AddRealmRoleComposite adds a role to the composite.

func (*GoCloak) AddRealmRoleToGroup

func (g *GoCloak) AddRealmRoleToGroup(ctx context.Context, token, realm, groupID string, roles []Role) error

AddRealmRoleToGroup adds realm-level role mappings

func (*GoCloak) AddRealmRoleToUser

func (g *GoCloak) AddRealmRoleToUser(ctx context.Context, token, realm, userID string, roles []Role) error

AddRealmRoleToUser adds realm-level role mappings

func (*GoCloak) AddUserToGroup

func (g *GoCloak) AddUserToGroup(ctx context.Context, token, realm, userID, groupID string) error

AddUserToGroup puts given user to given group

func (*GoCloak) ClearKeysCache

func (g *GoCloak) ClearKeysCache(ctx context.Context, token, realm string) error

ClearKeysCache clears realm cache

func (*GoCloak) ClearRealmCache

func (g *GoCloak) ClearRealmCache(ctx context.Context, token, realm string) error

ClearRealmCache clears realm cache

func (*GoCloak) ClearUserCache

func (g *GoCloak) ClearUserCache(ctx context.Context, token, realm string) error

ClearUserCache clears realm cache

func (*GoCloak) CreateAuthenticationExecution

func (g *GoCloak) CreateAuthenticationExecution(ctx context.Context, token, realm, flow string, execution CreateAuthenticationExecutionRepresentation) error

CreateAuthenticationExecution creates a new execution for the given flow name in the given realm

func (*GoCloak) CreateAuthenticationExecutionFlow

func (g *GoCloak) CreateAuthenticationExecutionFlow(ctx context.Context, token, realm, flow string, executionFlow CreateAuthenticationExecutionFlowRepresentation) error

CreateAuthenticationExecutionFlow creates a new execution for the given flow name in the given realm

func (*GoCloak) CreateAuthenticationFlow

func (g *GoCloak) CreateAuthenticationFlow(ctx context.Context, token, realm string, flow AuthenticationFlowRepresentation) error

CreateAuthenticationFlow creates a new Authentication flow in a realm

func (*GoCloak) CreateChildGroup

func (g *GoCloak) CreateChildGroup(ctx context.Context, token, realm, groupID string, group Group) (string, error)

CreateChildGroup creates a new child group

func (*GoCloak) CreateClient

func (g *GoCloak) CreateClient(ctx context.Context, accessToken, realm string, newClient Client) (string, error)

CreateClient creates the given g.

func (*GoCloak) CreateClientProtocolMapper

func (g *GoCloak) CreateClientProtocolMapper(ctx context.Context, token, realm, idOfClient string, mapper ProtocolMapper) (string, error)

CreateClientProtocolMapper creates a protocol mapper in client scope

func (*GoCloak) CreateClientRepresentation

func (g *GoCloak) CreateClientRepresentation(ctx context.Context, token, realm string, newClient Client) (*Client, error)

CreateClientRepresentation creates a new client representation

func (*GoCloak) CreateClientRole

func (g *GoCloak) CreateClientRole(ctx context.Context, token, realm, idOfClient string, role Role) (string, error)

CreateClientRole creates a new role for a client

func (*GoCloak) CreateClientScope

func (g *GoCloak) CreateClientScope(ctx context.Context, token, realm string, scope ClientScope) (string, error)

CreateClientScope creates a new client scope

func (*GoCloak) CreateClientScopeMappingsClientRoles

func (g *GoCloak) CreateClientScopeMappingsClientRoles(ctx context.Context, token, realm, idOfClient, idOfSelectedClient string, roles []Role) error

CreateClientScopeMappingsClientRoles creates client-level roles from the client’s scope

func (*GoCloak) CreateClientScopeMappingsRealmRoles

func (g *GoCloak) CreateClientScopeMappingsRealmRoles(ctx context.Context, token, realm, idOfClient string, roles []Role) error

CreateClientScopeMappingsRealmRoles create realm-level roles to the client’s scope

func (*GoCloak) CreateClientScopeProtocolMapper

func (g *GoCloak) CreateClientScopeProtocolMapper(ctx context.Context, token, realm, scopeID string, protocolMapper ProtocolMapper) (string, error)

CreateClientScopeProtocolMapper creates a new protocolMapper under the given client scope

func (*GoCloak) CreateClientScopesScopeMappingsClientRoles

func (g *GoCloak) CreateClientScopesScopeMappingsClientRoles(
	ctx context.Context, token, realm, idOfClientScope, idOfClient string, roles []Role,
) error

CreateClientScopesScopeMappingsClientRoles attaches a client role to a client scope (not client's scope)

func (*GoCloak) CreateClientScopesScopeMappingsRealmRoles

func (g *GoCloak) CreateClientScopesScopeMappingsRealmRoles(ctx context.Context, token, realm, clientScopeID string, roles []Role) error

CreateClientScopesScopeMappingsRealmRoles creates realm-level roles to the client scope

func (*GoCloak) CreateComponent

func (g *GoCloak) CreateComponent(ctx context.Context, token, realm string, component Component) (string, error)

CreateComponent creates the given component.

func (*GoCloak) CreateGroup

func (g *GoCloak) CreateGroup(ctx context.Context, token, realm string, group Group) (string, error)

CreateGroup creates a new group.

func (*GoCloak) CreateIdentityProvider

func (g *GoCloak) CreateIdentityProvider(ctx context.Context, token string, realm string, providerRep IdentityProviderRepresentation) (string, error)

CreateIdentityProvider creates an identity provider in a realm

func (*GoCloak) CreateIdentityProviderMapper

func (g *GoCloak) CreateIdentityProviderMapper(ctx context.Context, token, realm, alias string, mapper IdentityProviderMapper) (string, error)

CreateIdentityProviderMapper creates an instance of an identity provider mapper associated with the given alias

func (*GoCloak) CreatePermission

func (g *GoCloak) CreatePermission(ctx context.Context, token, realm, idOfClient string, permission PermissionRepresentation) (*PermissionRepresentation, error)

CreatePermission creates a permission associated with the client

func (*GoCloak) CreatePermissionTicket

func (g *GoCloak) CreatePermissionTicket(ctx context.Context, token, realm string, permissions []CreatePermissionTicketParams) (*PermissionTicketResponseRepresentation, error)

CreatePermissionTicket creates a permission ticket, using access token from client

func (*GoCloak) CreatePolicy

func (g *GoCloak) CreatePolicy(ctx context.Context, token, realm, idOfClient string, policy PolicyRepresentation) (*PolicyRepresentation, error)

CreatePolicy creates a policy associated with the client

func (*GoCloak) CreateRealm

func (g *GoCloak) CreateRealm(ctx context.Context, token string, realm RealmRepresentation) (string, error)

CreateRealm creates a realm

func (*GoCloak) CreateRealmRole

func (g *GoCloak) CreateRealmRole(ctx context.Context, token string, realm string, role Role) (string, error)

CreateRealmRole creates a role in a realm

func (*GoCloak) CreateResource

func (g *GoCloak) CreateResource(ctx context.Context, token, realm string, idOfClient string, resource ResourceRepresentation) (*ResourceRepresentation, error)

CreateResource creates a resource associated with the client, using access token from admin

func (*GoCloak) CreateResourceClient

func (g *GoCloak) CreateResourceClient(ctx context.Context, token, realm string, resource ResourceRepresentation) (*ResourceRepresentation, error)

CreateResourceClient creates a resource associated with the client, using access token from client

func (*GoCloak) CreateResourcePolicy

func (g *GoCloak) CreateResourcePolicy(ctx context.Context, token, realm, resourceID string, policy ResourcePolicyRepresentation) (*ResourcePolicyRepresentation, error)

CreateResourcePolicy associates a permission with a specific resource, using token obtained by Resource Owner Password Credentials Grant or Token exchange

func (*GoCloak) CreateScope

func (g *GoCloak) CreateScope(ctx context.Context, token, realm, idOfClient string, scope ScopeRepresentation) (*ScopeRepresentation, error)

CreateScope creates a scope associated with the client

func (*GoCloak) CreateUser

func (g *GoCloak) CreateUser(ctx context.Context, token, realm string, user User) (string, error)

CreateUser creates the given user in the given realm and returns it's userID Note: Keycloak has not documented what members of the User object are actually being accepted, when creating a user. Things like RealmRoles must be attached using followup calls to the respective functions.

func (*GoCloak) CreateUserFederatedIdentity

func (g *GoCloak) CreateUserFederatedIdentity(ctx context.Context, token, realm, userID, providerID string, federatedIdentityRep FederatedIdentityRepresentation) error

CreateUserFederatedIdentity creates an user federated identity

func (*GoCloak) DecodeAccessToken

func (g *GoCloak) DecodeAccessToken(ctx context.Context, accessToken, realm string) (*jwt.Token, *jwt.MapClaims, error)

DecodeAccessToken decodes the accessToken

func (*GoCloak) DecodeAccessTokenCustomClaims

func (g *GoCloak) DecodeAccessTokenCustomClaims(ctx context.Context, accessToken, realm string, claims jwt.Claims) (*jwt.Token, error)

DecodeAccessTokenCustomClaims decodes the accessToken and writes claims into the given claims

func (*GoCloak) DeleteAuthenticationExecution

func (g *GoCloak) DeleteAuthenticationExecution(ctx context.Context, token, realm, executionID string) error

DeleteAuthenticationExecution delete a single execution with the given ID

func (*GoCloak) DeleteAuthenticationFlow

func (g *GoCloak) DeleteAuthenticationFlow(ctx context.Context, token, realm, flowID string) error

DeleteAuthenticationFlow deletes a flow in a realm with the given ID

func (*GoCloak) DeleteClient

func (g *GoCloak) DeleteClient(ctx context.Context, token, realm, idOfClient string) error

DeleteClient deletes a given client

func (*GoCloak) DeleteClientProtocolMapper

func (g *GoCloak) DeleteClientProtocolMapper(ctx context.Context, token, realm, idOfClient, mapperID string) error

DeleteClientProtocolMapper deletes a protocol mapper in client scope

func (*GoCloak) DeleteClientRepresentation

func (g *GoCloak) DeleteClientRepresentation(ctx context.Context, accessToken, realm, clientID string) error

DeleteClientRepresentation deletes a given client representation.

func (*GoCloak) DeleteClientRole

func (g *GoCloak) DeleteClientRole(ctx context.Context, token, realm, idOfClient, roleName string) error

DeleteClientRole deletes a given role.

func (*GoCloak) DeleteClientRoleComposite

func (g *GoCloak) DeleteClientRoleComposite(ctx context.Context, token, realm, roleID string, roles []Role) error

DeleteClientRoleComposite deletes composites from a role

func (*GoCloak) DeleteClientRoleFromGroup

func (g *GoCloak) DeleteClientRoleFromGroup(ctx context.Context, token, realm, idOfClient, groupID string, roles []Role) error

DeleteClientRoleFromGroup removes a client role from from the group

func (*GoCloak) DeleteClientRoleFromUser deprecated

func (g *GoCloak) DeleteClientRoleFromUser(ctx context.Context, token, realm, idOfClient, userID string, roles []Role) error

DeleteClientRoleFromUser adds client-level role mappings

Deprecated: replaced by DeleteClientRolesFrom

func (*GoCloak) DeleteClientRolesFromUser

func (g *GoCloak) DeleteClientRolesFromUser(ctx context.Context, token, realm, idOfClient, userID string, roles []Role) error

DeleteClientRolesFromUser adds client-level role mappings

func (*GoCloak) DeleteClientScope

func (g *GoCloak) DeleteClientScope(ctx context.Context, token, realm, scopeID string) error

DeleteClientScope deletes the scope with the given id.

func (*GoCloak) DeleteClientScopeMappingsClientRoles

func (g *GoCloak) DeleteClientScopeMappingsClientRoles(ctx context.Context, token, realm, idOfClient, idOfSelectedClient string, roles []Role) error

DeleteClientScopeMappingsClientRoles deletes client-level roles from the client’s scope

func (*GoCloak) DeleteClientScopeMappingsRealmRoles

func (g *GoCloak) DeleteClientScopeMappingsRealmRoles(ctx context.Context, token, realm, idOfClient string, roles []Role) error

DeleteClientScopeMappingsRealmRoles deletes realm-level roles from the client’s scope

func (*GoCloak) DeleteClientScopeProtocolMapper

func (g *GoCloak) DeleteClientScopeProtocolMapper(ctx context.Context, token, realm, scopeID, protocolMapperID string) error

DeleteClientScopeProtocolMapper deletes the given protocol mapper from the client scope

func (*GoCloak) DeleteClientScopesScopeMappingsClientRoles

func (g *GoCloak) DeleteClientScopesScopeMappingsClientRoles(ctx context.Context, token, realm, idOfClientScope, idOfClient string, roles []Role) error

DeleteClientScopesScopeMappingsClientRoles removes attachment of client roles from a client scope (not client's scope).

func (*GoCloak) DeleteClientScopesScopeMappingsRealmRoles

func (g *GoCloak) DeleteClientScopesScopeMappingsRealmRoles(ctx context.Context, token, realm, clientScopeID string, roles []Role) error

DeleteClientScopesScopeMappingsRealmRoles deletes realm-level roles from the client-scope

func (*GoCloak) DeleteComponent

func (g *GoCloak) DeleteComponent(ctx context.Context, token, realm, componentID string) error

DeleteComponent deletes the component with the given id.

func (*GoCloak) DeleteCredentials

func (g *GoCloak) DeleteCredentials(ctx context.Context, token, realm, userID, credentialID string) error

DeleteCredentials deletes the given credential for a given user

func (*GoCloak) DeleteGroup

func (g *GoCloak) DeleteGroup(ctx context.Context, token, realm, groupID string) error

DeleteGroup deletes the group with the given groupID.

func (*GoCloak) DeleteIdentityProvider

func (g *GoCloak) DeleteIdentityProvider(ctx context.Context, token, realm, alias string) error

DeleteIdentityProvider deletes the identity provider in a realm

func (*GoCloak) DeleteIdentityProviderMapper

func (g *GoCloak) DeleteIdentityProviderMapper(ctx context.Context, token, realm, alias, mapperID string) error

DeleteIdentityProviderMapper deletes an instance of an identity provider mapper associated with the given alias and mapper ID

func (*GoCloak) DeletePermission

func (g *GoCloak) DeletePermission(ctx context.Context, token, realm, idOfClient, permissionID string) error

DeletePermission deletes a policy associated with the client

func (*GoCloak) DeletePolicy

func (g *GoCloak) DeletePolicy(ctx context.Context, token, realm, idOfClient, policyID string) error

DeletePolicy deletes a policy associated with the client

func (*GoCloak) DeleteRealm

func (g *GoCloak) DeleteRealm(ctx context.Context, token, realm string) error

DeleteRealm removes a realm

func (*GoCloak) DeleteRealmRole

func (g *GoCloak) DeleteRealmRole(ctx context.Context, token, realm, roleName string) error

DeleteRealmRole deletes a role in a realm by role's name

func (*GoCloak) DeleteRealmRoleComposite

func (g *GoCloak) DeleteRealmRoleComposite(ctx context.Context, token, realm, roleName string, roles []Role) error

DeleteRealmRoleComposite deletes a role from the composite.

func (*GoCloak) DeleteRealmRoleFromGroup

func (g *GoCloak) DeleteRealmRoleFromGroup(ctx context.Context, token, realm, groupID string, roles []Role) error

DeleteRealmRoleFromGroup deletes realm-level role mappings

func (*GoCloak) DeleteRealmRoleFromUser

func (g *GoCloak) DeleteRealmRoleFromUser(ctx context.Context, token, realm, userID string, roles []Role) error

DeleteRealmRoleFromUser deletes realm-level role mappings

func (*GoCloak) DeleteRequiredAction

func (g *GoCloak) DeleteRequiredAction(ctx context.Context, token string, realm string, alias string) error

DeleteRequiredAction updates a required action for a given realm

func (*GoCloak) DeleteResource

func (g *GoCloak) DeleteResource(ctx context.Context, token, realm, idOfClient, resourceID string) error

DeleteResource deletes a resource associated with the client (using an admin token)

func (*GoCloak) DeleteResourceClient

func (g *GoCloak) DeleteResourceClient(ctx context.Context, token, realm, resourceID string) error

DeleteResourceClient deletes a resource associated with the client (using a client token)

func (*GoCloak) DeleteResourcePolicy

func (g *GoCloak) DeleteResourcePolicy(ctx context.Context, token, realm, permissionID string) error

DeleteResourcePolicy deletes a permission for a specific resource, using token obtained by Resource Owner Password Credentials Grant or Token exchange

func (*GoCloak) DeleteScope

func (g *GoCloak) DeleteScope(ctx context.Context, token, realm, idOfClient, scopeID string) error

DeleteScope deletes a scope associated with the client

func (*GoCloak) DeleteUser

func (g *GoCloak) DeleteUser(ctx context.Context, token, realm, userID string) error

DeleteUser delete a given user

func (*GoCloak) DeleteUserFederatedIdentity

func (g *GoCloak) DeleteUserFederatedIdentity(ctx context.Context, token, realm, userID, providerID string) error

DeleteUserFederatedIdentity deletes an user federated identity

func (*GoCloak) DeleteUserFromGroup

func (g *GoCloak) DeleteUserFromGroup(ctx context.Context, token, realm, userID, groupID string) error

DeleteUserFromGroup deletes given user from given group

func (*GoCloak) DeleteUserPermission

func (g *GoCloak) DeleteUserPermission(ctx context.Context, token, realm, ticketID string) error

DeleteUserPermission revokes permissions according query parameters

func (*GoCloak) DisableAllCredentialsByType

func (g *GoCloak) DisableAllCredentialsByType(ctx context.Context, token, realm, userID string, types []string) error

DisableAllCredentialsByType disables all credentials for a user of a specific type

func (*GoCloak) ExecuteActionsEmail

func (g *GoCloak) ExecuteActionsEmail(ctx context.Context, token, realm string, params ExecuteActionsEmail) error

ExecuteActionsEmail executes an actions email

func (*GoCloak) ExportIDPPublicBrokerConfig

func (g *GoCloak) ExportIDPPublicBrokerConfig(ctx context.Context, token, realm, alias string) (*string, error)

ExportIDPPublicBrokerConfig exports the broker config for a given alias

func (*GoCloak) FetchClientSecret

func (gc *GoCloak) FetchClientSecret(ctx context.Context, token, realm, idOfClient string) (string, error)

func (*GoCloak) FindClient

func (gc *GoCloak) FindClient(ctx context.Context, token, realm, clientID string) (*Client, error)

func (*GoCloak) FindClientProtocolMapper

func (gc *GoCloak) FindClientProtocolMapper(ctx context.Context, token, realm string, c *Client, name string) (*ProtocolMapper, error)

func (*GoCloak) FindClientRole

func (gc *GoCloak) FindClientRole(ctx context.Context, token string, realm, idOfClient, roleName string) (*Role, error)

func (*GoCloak) FindClientScope

func (gc *GoCloak) FindClientScope(ctx context.Context, token, realm, name string) (*ClientScope, error)

func (*GoCloak) FindClientScopeProtocolMapper

func (gc *GoCloak) FindClientScopeProtocolMapper(ctx context.Context, token, realm, scopeID, name string) (*ProtocolMapper, error)

func (*GoCloak) FindComponent

func (gc *GoCloak) FindComponent(ctx context.Context, token, realm, providerType, providerId, name, parentId string) (*Component, error)

func (*GoCloak) GetAdapterConfiguration

func (g *GoCloak) GetAdapterConfiguration(ctx context.Context, accessToken, realm, clientID string) (*AdapterConfiguration, error)

GetAdapterConfiguration returns a adapter configuration

func (*GoCloak) GetAuthenticationExecutions

func (g *GoCloak) GetAuthenticationExecutions(ctx context.Context, token, realm, flow string) ([]*ModifyAuthenticationExecutionRepresentation, error)

GetAuthenticationExecutions retrieves all executions of a given flow

func (*GoCloak) GetAuthenticationFlow

func (g *GoCloak) GetAuthenticationFlow(ctx context.Context, token, realm string, authenticationFlowID string) (*AuthenticationFlowRepresentation, error)

GetAuthenticationFlow get an authentication flow with the given ID

func (*GoCloak) GetAuthenticationFlows

func (g *GoCloak) GetAuthenticationFlows(ctx context.Context, token, realm string) ([]*AuthenticationFlowRepresentation, error)

GetAuthenticationFlows get all authentication flows from a realm

func (*GoCloak) GetAuthorizationPolicyAssociatedPolicies

func (g *GoCloak) GetAuthorizationPolicyAssociatedPolicies(ctx context.Context, token, realm, idOfClient, policyID string) ([]*PolicyRepresentation, error)

GetAuthorizationPolicyAssociatedPolicies returns a client's associated policies of specific policy with the given policy id, using access token from admin

func (*GoCloak) GetAuthorizationPolicyResources

func (g *GoCloak) GetAuthorizationPolicyResources(ctx context.Context, token, realm, idOfClient, policyID string) ([]*PolicyResourceRepresentation, error)

GetAuthorizationPolicyResources returns a client's resources of specific policy with the given policy id, using access token from admin

func (*GoCloak) GetAuthorizationPolicyScopes

func (g *GoCloak) GetAuthorizationPolicyScopes(ctx context.Context, token, realm, idOfClient, policyID string) ([]*PolicyScopeRepresentation, error)

GetAuthorizationPolicyScopes returns a client's scopes of specific policy with the given policy id, using access token from admin

func (*GoCloak) GetAvailableClientRolesByGroupID

func (g *GoCloak) GetAvailableClientRolesByGroupID(ctx context.Context, token, realm, idOfClient, groupID string) ([]*Role, error)

GetAvailableClientRolesByGroupID returns all available roles to the given group

func (*GoCloak) GetAvailableClientRolesByUserID

func (g *GoCloak) GetAvailableClientRolesByUserID(ctx context.Context, token, realm, idOfClient, userID string) ([]*Role, error)

GetAvailableClientRolesByUserID returns all available client roles to the given user

func (*GoCloak) GetAvailableRealmRolesByGroupID

func (g *GoCloak) GetAvailableRealmRolesByGroupID(ctx context.Context, token, realm, groupID string) ([]*Role, error)

GetAvailableRealmRolesByGroupID returns all available realm roles to the given group

func (*GoCloak) GetAvailableRealmRolesByUserID

func (g *GoCloak) GetAvailableRealmRolesByUserID(ctx context.Context, token, realm, userID string) ([]*Role, error)

GetAvailableRealmRolesByUserID returns all available realm roles to the given user

func (*GoCloak) GetCerts

func (g *GoCloak) GetCerts(ctx context.Context, realm string) (*CertResponse, error)

GetCerts fetches certificates for the given realm from the public /open-id-connect/certs endpoint

func (*GoCloak) GetClient

func (g *GoCloak) GetClient(ctx context.Context, token, realm, idOfClient string) (*Client, error)

GetClient returns a client

func (*GoCloak) GetClientManagementPermissions

func (g *GoCloak) GetClientManagementPermissions(ctx context.Context, token, realm string, idOfClient string) (*ManagementPermissionRepresentation, error)

GetClientManagementPermissions returns whether client Authorization permissions have been initialized or not and a reference to the managed permissions

func (*GoCloak) GetClientOfflineSessions

func (g *GoCloak) GetClientOfflineSessions(ctx context.Context, token, realm, idOfClient string, params ...GetClientUserSessionsParams) ([]*UserSessionRepresentation, error)

GetClientOfflineSessions returns offline sessions associated with the client

func (*GoCloak) GetClientRepresentation

func (g *GoCloak) GetClientRepresentation(ctx context.Context, accessToken, realm, clientID string) (*Client, error)

GetClientRepresentation returns a client representation

func (*GoCloak) GetClientRole

func (g *GoCloak) GetClientRole(ctx context.Context, token, realm, idOfClient, roleName string) (*Role, error)

GetClientRole get a role for the given client in a realm by role name

func (*GoCloak) GetClientRoleByID

func (g *GoCloak) GetClientRoleByID(ctx context.Context, token, realm, roleID string) (*Role, error)

GetClientRoleByID gets role for the given client in realm using role ID

func (*GoCloak) GetClientRoles

func (g *GoCloak) GetClientRoles(ctx context.Context, token, realm, idOfClient string, params GetRoleParams) ([]*Role, error)

GetClientRoles get all roles for the given client in realm

func (*GoCloak) GetClientRolesByGroupID

func (g *GoCloak) GetClientRolesByGroupID(ctx context.Context, token, realm, idOfClient, groupID string) ([]*Role, error)

GetClientRolesByGroupID returns all client roles assigned to the given group

func (*GoCloak) GetClientRolesByUserID

func (g *GoCloak) GetClientRolesByUserID(ctx context.Context, token, realm, idOfClient, userID string) ([]*Role, error)

GetClientRolesByUserID returns all client roles assigned to the given user

func (*GoCloak) GetClientScope

func (g *GoCloak) GetClientScope(ctx context.Context, token, realm, scopeID string) (*ClientScope, error)

GetClientScope returns a clientscope

func (*GoCloak) GetClientScopeMappings

func (g *GoCloak) GetClientScopeMappings(ctx context.Context, token, realm, idOfClient string) (*MappingsRepresentation, error)

GetClientScopeMappings returns all scope mappings for the client

func (*GoCloak) GetClientScopeMappingsClientRoles

func (g *GoCloak) GetClientScopeMappingsClientRoles(ctx context.Context, token, realm, idOfClient, idOfSelectedClient string) ([]*Role, error)

GetClientScopeMappingsClientRoles returns roles associated with a client’s scope

func (*GoCloak) GetClientScopeMappingsClientRolesAvailable

func (g *GoCloak) GetClientScopeMappingsClientRolesAvailable(ctx context.Context, token, realm, idOfClient, idOfSelectedClient string) ([]*Role, error)

GetClientScopeMappingsClientRolesAvailable returns available roles associated with a client’s scope

func (*GoCloak) GetClientScopeMappingsRealmRoles

func (g *GoCloak) GetClientScopeMappingsRealmRoles(ctx context.Context, token, realm, idOfClient string) ([]*Role, error)

GetClientScopeMappingsRealmRoles returns realm-level roles associated with the client’s scope

func (*GoCloak) GetClientScopeMappingsRealmRolesAvailable

func (g *GoCloak) GetClientScopeMappingsRealmRolesAvailable(ctx context.Context, token, realm, idOfClient string) ([]*Role, error)

GetClientScopeMappingsRealmRolesAvailable returns realm-level roles that are available to attach to this client’s scope

func (*GoCloak) GetClientScopeProtocolMapper

func (g *GoCloak) GetClientScopeProtocolMapper(ctx context.Context, token, realm, scopeID, protocolMapperID string) (*ProtocolMapper, error)

GetClientScopeProtocolMapper returns a protocol mapper of a client scope

func (*GoCloak) GetClientScopeProtocolMappers

func (g *GoCloak) GetClientScopeProtocolMappers(ctx context.Context, token, realm, scopeID string) ([]*ProtocolMapper, error)

GetClientScopeProtocolMappers returns all protocol mappers of a client scope

func (*GoCloak) GetClientScopes

func (g *GoCloak) GetClientScopes(ctx context.Context, token, realm string) ([]*ClientScope, error)

GetClientScopes returns all client scopes

func (*GoCloak) GetClientScopesScopeMappingsClientRoles

func (g *GoCloak) GetClientScopesScopeMappingsClientRoles(ctx context.Context, token, realm, idOfClientScope, idOfClient string) ([]*Role, error)

GetClientScopesScopeMappingsClientRoles returns attached client roles for a specific client, for a client scope (not client's scope).

func (*GoCloak) GetClientScopesScopeMappingsClientRolesAvailable

func (g *GoCloak) GetClientScopesScopeMappingsClientRolesAvailable(ctx context.Context, token, realm, idOfClientScope, idOfClient string) ([]*Role, error)

GetClientScopesScopeMappingsClientRolesAvailable returns available (i.e. not attached via CreateClientScopesScopeMappingsClientRoles) client roles for a specific client, for a client scope (not client's scope).

func (*GoCloak) GetClientScopesScopeMappingsRealmRoles

func (g *GoCloak) GetClientScopesScopeMappingsRealmRoles(ctx context.Context, token, realm, clientScopeID string) ([]*Role, error)

GetClientScopesScopeMappingsRealmRoles returns roles associated with a client-scope

func (*GoCloak) GetClientScopesScopeMappingsRealmRolesAvailable

func (g *GoCloak) GetClientScopesScopeMappingsRealmRolesAvailable(ctx context.Context, token, realm, clientScopeID string) ([]*Role, error)

GetClientScopesScopeMappingsRealmRolesAvailable returns realm-level roles that are available to attach to this client scope

func (*GoCloak) GetClientSecret

func (g *GoCloak) GetClientSecret(ctx context.Context, token, realm, idOfClient string) (*CredentialRepresentation, error)

GetClientSecret returns a client's secret

func (*GoCloak) GetClientServiceAccount

func (g *GoCloak) GetClientServiceAccount(ctx context.Context, token, realm, idOfClient string) (*User, error)

GetClientServiceAccount retrieves the service account "user" for a client if enabled

func (*GoCloak) GetClientUserSessions

func (g *GoCloak) GetClientUserSessions(ctx context.Context, token, realm, idOfClient string, params ...GetClientUserSessionsParams) ([]*UserSessionRepresentation, error)

GetClientUserSessions returns user sessions associated with the client

func (*GoCloak) GetClients

func (g *GoCloak) GetClients(ctx context.Context, token, realm string, params GetClientsParams) ([]*Client, error)

GetClients gets all clients in realm

func (*GoCloak) GetClientsDefaultScopes

func (g *GoCloak) GetClientsDefaultScopes(ctx context.Context, token, realm, idOfClient string) ([]*ClientScope, error)

GetClientsDefaultScopes returns a list of the client's default scopes

func (*GoCloak) GetClientsOptionalScopes

func (g *GoCloak) GetClientsOptionalScopes(ctx context.Context, token, realm, idOfClient string) ([]*ClientScope, error)

GetClientsOptionalScopes returns a list of the client's optional scopes

func (*GoCloak) GetComponent

func (g *GoCloak) GetComponent(ctx context.Context, token, realm string, componentID string) (*Component, error)

GetComponent get exactly one component by ID

func (*GoCloak) GetComponents

func (g *GoCloak) GetComponents(ctx context.Context, token, realm string) ([]*Component, error)

GetComponents get all components in realm

func (*GoCloak) GetComponentsWithParams

func (g *GoCloak) GetComponentsWithParams(ctx context.Context, token, realm string, params GetComponentsParams) ([]*Component, error)

GetComponentsWithParams get all components in realm with query params

func (*GoCloak) GetCompositeClientRolesByGroupID

func (g *GoCloak) GetCompositeClientRolesByGroupID(ctx context.Context, token, realm, idOfClient, groupID string) ([]*Role, error)

GetCompositeClientRolesByGroupID returns all client roles and composite roles assigned to the given group

func (*GoCloak) GetCompositeClientRolesByRoleID

func (g *GoCloak) GetCompositeClientRolesByRoleID(ctx context.Context, token, realm, idOfClient, roleID string) ([]*Role, error)

GetCompositeClientRolesByRoleID returns all client composite roles associated with the given client role

func (*GoCloak) GetCompositeClientRolesByUserID

func (g *GoCloak) GetCompositeClientRolesByUserID(ctx context.Context, token, realm, idOfClient, userID string) ([]*Role, error)

GetCompositeClientRolesByUserID returns all client roles and composite roles assigned to the given user

func (*GoCloak) GetCompositeRealmRoles

func (g *GoCloak) GetCompositeRealmRoles(ctx context.Context, token, realm, roleName string) ([]*Role, error)

GetCompositeRealmRoles returns all realm composite roles associated with the given realm role

func (*GoCloak) GetCompositeRealmRolesByGroupID

func (g *GoCloak) GetCompositeRealmRolesByGroupID(ctx context.Context, token, realm, groupID string) ([]*Role, error)

GetCompositeRealmRolesByGroupID returns all realm roles and composite roles assigned to the given group

func (*GoCloak) GetCompositeRealmRolesByRoleID

func (g *GoCloak) GetCompositeRealmRolesByRoleID(ctx context.Context, token, realm, roleID string) ([]*Role, error)

GetCompositeRealmRolesByRoleID returns all realm composite roles associated with the given client role

func (*GoCloak) GetCompositeRealmRolesByUserID

func (g *GoCloak) GetCompositeRealmRolesByUserID(ctx context.Context, token, realm, userID string) ([]*Role, error)

GetCompositeRealmRolesByUserID returns all realm roles and composite roles assigned to the given user

func (*GoCloak) GetCompositeRolesByRoleID

func (g *GoCloak) GetCompositeRolesByRoleID(ctx context.Context, token, realm, roleID string) ([]*Role, error)

GetCompositeRolesByRoleID returns all realm composite roles associated with the given client role

func (*GoCloak) GetConfiguredUserStorageCredentialTypes

func (g *GoCloak) GetConfiguredUserStorageCredentialTypes(ctx context.Context, token, realm, userID string) ([]string, error)

GetConfiguredUserStorageCredentialTypes returns credential types, which are provided by the user storage where user is stored

func (*GoCloak) GetCredentialRegistrators

func (g *GoCloak) GetCredentialRegistrators(ctx context.Context, token, realm string) ([]string, error)

GetCredentialRegistrators returns credentials registrators

func (*GoCloak) GetCredentials

func (g *GoCloak) GetCredentials(ctx context.Context, token, realm, userID string) ([]*CredentialRepresentation, error)

GetCredentials returns credentials available for a given user

func (*GoCloak) GetDefaultDefaultClientScopes

func (g *GoCloak) GetDefaultDefaultClientScopes(ctx context.Context, token, realm string) ([]*ClientScope, error)

GetDefaultDefaultClientScopes returns a list of default realm default scopes

func (*GoCloak) GetDefaultGroups

func (g *GoCloak) GetDefaultGroups(ctx context.Context, token, realm string) ([]*Group, error)

GetDefaultGroups returns a list of default groups

func (*GoCloak) GetDefaultOptionalClientScopes

func (g *GoCloak) GetDefaultOptionalClientScopes(ctx context.Context, token, realm string) ([]*ClientScope, error)

GetDefaultOptionalClientScopes returns a list of default realm optional scopes

func (*GoCloak) GetDependentPermissions

func (g *GoCloak) GetDependentPermissions(ctx context.Context, token, realm, idOfClient, policyID string) ([]*PermissionRepresentation, error)

GetDependentPermissions returns a client's permission with the given policy id

func (*GoCloak) GetEvents

func (g *GoCloak) GetEvents(ctx context.Context, token string, realm string, params GetEventsParams) ([]*EventRepresentation, error)

GetEvents returns events

func (*GoCloak) GetGroup

func (g *GoCloak) GetGroup(ctx context.Context, token, realm, groupID string) (*Group, error)

GetGroup get group with id in realm

func (*GoCloak) GetGroupByPath

func (g *GoCloak) GetGroupByPath(ctx context.Context, token, realm, groupPath string) (*Group, error)

GetGroupByPath get group with path in realm

func (*GoCloak) GetGroupManagementPermissions

func (g *GoCloak) GetGroupManagementPermissions(ctx context.Context, token, realm string, idOfGroup string) (*ManagementPermissionRepresentation, error)

GetGroupManagementPermissions returns whether group Authorization permissions have been initialized or not and a reference to the managed permissions

func (*GoCloak) GetGroupMembers

func (g *GoCloak) GetGroupMembers(ctx context.Context, token, realm, groupID string, params GetGroupsParams) ([]*User, error)

GetGroupMembers get a list of users of group with id in realm

func (*GoCloak) GetGroups

func (g *GoCloak) GetGroups(ctx context.Context, token, realm string, params GetGroupsParams) ([]*Group, error)

GetGroups get all groups in realm

func (*GoCloak) GetGroupsByClientRole

func (g *GoCloak) GetGroupsByClientRole(ctx context.Context, token, realm string, roleName string, clientID string) ([]*Group, error)

GetGroupsByClientRole gets groups with specified roles assigned of given client within a realm

func (*GoCloak) GetGroupsByRole

func (g *GoCloak) GetGroupsByRole(ctx context.Context, token, realm string, roleName string) ([]*Group, error)

GetGroupsByRole gets groups assigned with a specific role of a realm

func (*GoCloak) GetGroupsCount

func (g *GoCloak) GetGroupsCount(ctx context.Context, token, realm string, params GetGroupsParams) (int, error)

GetGroupsCount gets the groups count in the realm

func (*GoCloak) GetIdentityProvider

func (g *GoCloak) GetIdentityProvider(ctx context.Context, token, realm, alias string) (*IdentityProviderRepresentation, error)

GetIdentityProvider gets the identity provider in a realm

func (*GoCloak) GetIdentityProviderMapper

func (g *GoCloak) GetIdentityProviderMapper(ctx context.Context, token string, realm string, alias string, mapperID string) (*IdentityProviderMapper, error)

GetIdentityProviderMapper gets the mapper by id for the given identity provider alias in a realm

func (*GoCloak) GetIdentityProviderMapperByID

func (g *GoCloak) GetIdentityProviderMapperByID(ctx context.Context, token, realm, alias, mapperID string) (*IdentityProviderMapper, error)

GetIdentityProviderMapperByID gets the mapper of an identity provider

func (*GoCloak) GetIdentityProviderMappers

func (g *GoCloak) GetIdentityProviderMappers(ctx context.Context, token, realm, alias string) ([]*IdentityProviderMapper, error)

GetIdentityProviderMappers returns list of mappers associated with an identity provider

func (*GoCloak) GetIdentityProviders

func (g *GoCloak) GetIdentityProviders(ctx context.Context, token, realm string) ([]*IdentityProviderRepresentation, error)

GetIdentityProviders returns list of identity providers in a realm

func (*GoCloak) GetIssuer

func (g *GoCloak) GetIssuer(ctx context.Context, realm string) (*IssuerResponse, error)

GetIssuer gets the issuer of the given realm

func (*GoCloak) GetKeyStoreConfig

func (g *GoCloak) GetKeyStoreConfig(ctx context.Context, token, realm string) (*KeyStoreConfig, error)

GetKeyStoreConfig get keystoreconfig of the realm

func (*GoCloak) GetPermission

func (g *GoCloak) GetPermission(ctx context.Context, token, realm, idOfClient, permissionID string) (*PermissionRepresentation, error)

GetPermission returns a client's permission with the given id

func (*GoCloak) GetPermissionResources

func (g *GoCloak) GetPermissionResources(ctx context.Context, token, realm, idOfClient, permissionID string) ([]*PermissionResource, error)

GetPermissionResources returns a client's resource attached for the given permission id

func (*GoCloak) GetPermissionScope

func (g *GoCloak) GetPermissionScope(ctx context.Context, token, realm, idOfClient string, idOfScope string) (*PolicyRepresentation, error)

GetPermissionScope gets the permission scope associated with the client

func (*GoCloak) GetPermissionScopes

func (g *GoCloak) GetPermissionScopes(ctx context.Context, token, realm, idOfClient, permissionID string) ([]*PermissionScope, error)

GetPermissionScopes returns a client's scopes configured for the given permission id

func (*GoCloak) GetPermissions

func (g *GoCloak) GetPermissions(ctx context.Context, token, realm, idOfClient string, params GetPermissionParams) ([]*PermissionRepresentation, error)

GetPermissions returns permissions associated with the client

func (*GoCloak) GetPolicies

func (g *GoCloak) GetPolicies(ctx context.Context, token, realm, idOfClient string, params GetPolicyParams) ([]*PolicyRepresentation, error)

GetPolicies returns policies associated with the client

func (*GoCloak) GetPolicy

func (g *GoCloak) GetPolicy(ctx context.Context, token, realm, idOfClient, policyID string) (*PolicyRepresentation, error)

GetPolicy returns a client's policy with the given id

func (*GoCloak) GetRawUserInfo

func (g *GoCloak) GetRawUserInfo(ctx context.Context, accessToken, realm string) (map[string]interface{}, error)

GetRawUserInfo calls the UserInfo endpoint and returns a raw json object

func (*GoCloak) GetRealm

func (g *GoCloak) GetRealm(ctx context.Context, token, realm string) (*RealmRepresentation, error)

GetRealm returns top-level representation of the realm

func (*GoCloak) GetRealmRole

func (g *GoCloak) GetRealmRole(ctx context.Context, token, realm, roleName string) (*Role, error)

GetRealmRole returns a role from a realm by role's name

func (*GoCloak) GetRealmRoleByID

func (g *GoCloak) GetRealmRoleByID(ctx context.Context, token, realm, roleID string) (*Role, error)

GetRealmRoleByID returns a role from a realm by role's ID

func (*GoCloak) GetRealmRoles

func (g *GoCloak) GetRealmRoles(ctx context.Context, token, realm string, params GetRoleParams) ([]*Role, error)

GetRealmRoles get all roles of the given realm.

func (*GoCloak) GetRealmRolesByGroupID

func (g *GoCloak) GetRealmRolesByGroupID(ctx context.Context, token, realm, groupID string) ([]*Role, error)

GetRealmRolesByGroupID returns all roles assigned to the given group

func (*GoCloak) GetRealmRolesByUserID

func (g *GoCloak) GetRealmRolesByUserID(ctx context.Context, token, realm, userID string) ([]*Role, error)

GetRealmRolesByUserID returns all roles assigned to the given user

func (*GoCloak) GetRealms

func (g *GoCloak) GetRealms(ctx context.Context, token string) ([]*RealmRepresentation, error)

GetRealms returns top-level representation of all realms

func (*GoCloak) GetRequest

func (g *GoCloak) GetRequest(ctx context.Context) *resty.Request

GetRequest returns a request for calling endpoints.

func (*GoCloak) GetRequestWithBasicAuth

func (g *GoCloak) GetRequestWithBasicAuth(ctx context.Context, clientID, clientSecret string) *resty.Request

GetRequestWithBasicAuth returns a form data base request configured with basic auth.

func (*GoCloak) GetRequestWithBearerAuth

func (g *GoCloak) GetRequestWithBearerAuth(ctx context.Context, token string) *resty.Request

GetRequestWithBearerAuth returns a JSON base request configured with an auth token.

func (*GoCloak) GetRequestWithBearerAuthNoCache

func (g *GoCloak) GetRequestWithBearerAuthNoCache(ctx context.Context, token string) *resty.Request

GetRequestWithBearerAuthNoCache returns a JSON base request configured with an auth token and no-cache header.

func (*GoCloak) GetRequestWithBearerAuthXMLHeader

func (g *GoCloak) GetRequestWithBearerAuthXMLHeader(ctx context.Context, token string) *resty.Request

GetRequestWithBearerAuthXMLHeader returns an XML base request configured with an auth token.

func (*GoCloak) GetRequestingPartyPermissionDecision

func (g *GoCloak) GetRequestingPartyPermissionDecision(ctx context.Context, token, realm string, options RequestingPartyTokenOptions) (*RequestingPartyPermissionDecision, error)

GetRequestingPartyPermissionDecision returns a requesting party permission decision granted by the server

func (*GoCloak) GetRequestingPartyPermissions

func (g *GoCloak) GetRequestingPartyPermissions(ctx context.Context, token, realm string, options RequestingPartyTokenOptions) (*[]RequestingPartyPermission, error)

GetRequestingPartyPermissions returns a requesting party permissions granted by the server

func (*GoCloak) GetRequestingPartyToken

func (g *GoCloak) GetRequestingPartyToken(ctx context.Context, token, realm string, options RequestingPartyTokenOptions) (*JWT, error)

GetRequestingPartyToken returns a requesting party token with permissions granted by the server

func (*GoCloak) GetRequiredAction

func (g *GoCloak) GetRequiredAction(ctx context.Context, token string, realm string, alias string) (*RequiredActionProviderRepresentation, error)

GetRequiredAction gets a required action for a given realm

func (*GoCloak) GetRequiredActions

func (g *GoCloak) GetRequiredActions(ctx context.Context, token string, realm string) ([]*RequiredActionProviderRepresentation, error)

GetRequiredActions gets a list of required actions for a given realm

func (*GoCloak) GetResource

func (g *GoCloak) GetResource(ctx context.Context, token, realm, idOfClient, resourceID string) (*ResourceRepresentation, error)

GetResource returns a client's resource with the given id, using access token from admin

func (*GoCloak) GetResourceClient

func (g *GoCloak) GetResourceClient(ctx context.Context, token, realm, resourceID string) (*ResourceRepresentation, error)

GetResourceClient returns a client's resource with the given id, using access token from client

func (*GoCloak) GetResourcePolicies

func (g *GoCloak) GetResourcePolicies(ctx context.Context, token, realm string, params GetResourcePoliciesParams) ([]*ResourcePolicyRepresentation, error)

GetResourcePolicies returns resources associated with the client, using token obtained by Resource Owner Password Credentials Grant or Token exchange

func (*GoCloak) GetResourcePolicy

func (g *GoCloak) GetResourcePolicy(ctx context.Context, token, realm, permissionID string) (*ResourcePolicyRepresentation, error)

GetResourcePolicy updates a permission for a specific resource, using token obtained by Resource Owner Password Credentials Grant or Token exchange

func (*GoCloak) GetResourceServer

func (g *GoCloak) GetResourceServer(ctx context.Context, token, realm, idOfClient string) (*ResourceServerRepresentation, error)

GetResourceServer returns resource server settings. The access token must have the realm view_clients role on its service account to be allowed to call this endpoint.

func (*GoCloak) GetResources

func (g *GoCloak) GetResources(ctx context.Context, token, realm, idOfClient string, params GetResourceParams) ([]*ResourceRepresentation, error)

GetResources returns resources associated with the client, using access token from admin

func (*GoCloak) GetResourcesClient

func (g *GoCloak) GetResourcesClient(ctx context.Context, token, realm string, params GetResourceParams) ([]*ResourceRepresentation, error)

GetResourcesClient returns resources associated with the client, using access token from client

func (*GoCloak) GetRoleMappingByGroupID

func (g *GoCloak) GetRoleMappingByGroupID(ctx context.Context, token, realm, groupID string) (*MappingsRepresentation, error)

GetRoleMappingByGroupID gets the role mappings by group

func (*GoCloak) GetRoleMappingByUserID

func (g *GoCloak) GetRoleMappingByUserID(ctx context.Context, token, realm, userID string) (*MappingsRepresentation, error)

GetRoleMappingByUserID gets the role mappings by user

func (*GoCloak) GetScope

func (g *GoCloak) GetScope(ctx context.Context, token, realm, idOfClient, scopeID string) (*ScopeRepresentation, error)

GetScope returns a client's scope with the given id

func (*GoCloak) GetScopes

func (g *GoCloak) GetScopes(ctx context.Context, token, realm, idOfClient string, params GetScopeParams) ([]*ScopeRepresentation, error)

GetScopes returns scopes associated with the client

func (*GoCloak) GetServerInfo

func (g *GoCloak) GetServerInfo(ctx context.Context, accessToken string) (*ServerInfoRepresentation, error)

GetServerInfo fetches the server info.

func (*GoCloak) GetToken

func (g *GoCloak) GetToken(ctx context.Context, realm string, options TokenOptions) (*JWT, error)

GetToken uses TokenOptions to fetch a token.

func (*GoCloak) GetUserBruteForceDetectionStatus

func (g *GoCloak) GetUserBruteForceDetectionStatus(ctx context.Context, accessToken, realm, userID string) (*BruteForceStatus, error)

GetUserBruteForceDetectionStatus fetches a user status regarding brute force protection

func (*GoCloak) GetUserByID

func (g *GoCloak) GetUserByID(ctx context.Context, accessToken, realm, userID string) (*User, error)

GetUserByID fetches a user from the given realm with the given userID

func (*GoCloak) GetUserCount

func (g *GoCloak) GetUserCount(ctx context.Context, token string, realm string, params GetUsersParams) (int, error)

GetUserCount gets the user count in the realm

func (*GoCloak) GetUserFederatedIdentities

func (g *GoCloak) GetUserFederatedIdentities(ctx context.Context, token, realm, userID string) ([]*FederatedIdentityRepresentation, error)

GetUserFederatedIdentities gets all user federated identities

func (*GoCloak) GetUserGroups

func (g *GoCloak) GetUserGroups(ctx context.Context, token, realm, userID string, params GetGroupsParams) ([]*Group, error)

GetUserGroups get all groups for user

func (*GoCloak) GetUserInfo

func (g *GoCloak) GetUserInfo(ctx context.Context, accessToken, realm string) (*UserInfo, error)

GetUserInfo calls the UserInfo endpoint

func (*GoCloak) GetUserOfflineSessionsForClient

func (g *GoCloak) GetUserOfflineSessionsForClient(ctx context.Context, token, realm, userID, idOfClient string) ([]*UserSessionRepresentation, error)

GetUserOfflineSessionsForClient returns offline sessions associated with the user and client

func (*GoCloak) GetUserPermissions

func (g *GoCloak) GetUserPermissions(ctx context.Context, token, realm string, params GetUserPermissionParams) ([]*PermissionGrantResponseRepresentation, error)

GetUserPermissions gets granted permissions according query parameters

func (*GoCloak) GetUserSessions

func (g *GoCloak) GetUserSessions(ctx context.Context, token, realm, userID string) ([]*UserSessionRepresentation, error)

GetUserSessions returns user sessions associated with the user

func (*GoCloak) GetUsers

func (g *GoCloak) GetUsers(ctx context.Context, token, realm string, params GetUsersParams) ([]*User, error)

GetUsers get all users in realm

func (*GoCloak) GetUsersByClientRoleName

func (g *GoCloak) GetUsersByClientRoleName(ctx context.Context, token, realm, idOfClient, roleName string, params GetUsersByRoleParams) ([]*User, error)

GetUsersByClientRoleName returns all users have a given client role

func (*GoCloak) GetUsersByRoleName

func (g *GoCloak) GetUsersByRoleName(ctx context.Context, token, realm, roleName string, params GetUsersByRoleParams) ([]*User, error)

GetUsersByRoleName returns all users have a given role

func (*GoCloak) GrantUserPermission

func (g *GoCloak) GrantUserPermission(ctx context.Context, token, realm string, permission PermissionGrantParams) (*PermissionGrantResponseRepresentation, error)

GrantUserPermission lets resource owner grant permission for specific resource ID to specific user ID

func (*GoCloak) ImportIdentityProviderConfig

func (g *GoCloak) ImportIdentityProviderConfig(ctx context.Context, token, realm, fromURL, providerID string) (map[string]string, error)

ImportIdentityProviderConfig parses and returns the identity provider config at a given URL

func (*GoCloak) ImportIdentityProviderConfigFromFile

func (g *GoCloak) ImportIdentityProviderConfigFromFile(ctx context.Context, token, realm, providerID, fileName string, fileBody io.Reader) (map[string]string, error)

ImportIdentityProviderConfigFromFile parses and returns the identity provider config from a given file

func (*GoCloak) Login

func (g *GoCloak) Login(ctx context.Context, clientID, clientSecret, realm, username, password string) (*JWT, error)

Login performs a login with user credentials and a client

func (*GoCloak) LoginAdmin

func (g *GoCloak) LoginAdmin(ctx context.Context, username, password, realm string) (*JWT, error)

LoginAdmin performs a login with Admin client

func (*GoCloak) LoginClient

func (g *GoCloak) LoginClient(ctx context.Context, clientID, clientSecret, realm string, scopes ...string) (*JWT, error)

LoginClient performs a login with client credentials

func (*GoCloak) LoginClientSignedJWT

func (g *GoCloak) LoginClientSignedJWT(
	ctx context.Context,
	clientID,
	realm string,
	key interface{},
	signedMethod jwt.SigningMethod,
	expiresAt *jwt.NumericDate,
) (*JWT, error)

LoginClientSignedJWT performs a login with client credentials and signed jwt claims

func (*GoCloak) LoginClientTokenExchange

func (g *GoCloak) LoginClientTokenExchange(ctx context.Context, clientID, token, clientSecret, realm, targetClient, userID string) (*JWT, error)

LoginClientTokenExchange will exchange the presented token for a user's token Requires Token-Exchange is enabled: https://www.keycloak.org/docs/latest/securing_apps/index.html#_token-exchange

func (*GoCloak) LoginOtp

func (g *GoCloak) LoginOtp(ctx context.Context, clientID, clientSecret, realm, username, password, totp string) (*JWT, error)

LoginOtp performs a login with user credentials and otp token

func (*GoCloak) Logout

func (g *GoCloak) Logout(ctx context.Context, clientID, clientSecret, realm, refreshToken string) error

Logout logs out users with refresh token

func (*GoCloak) LogoutAllSessions

func (g *GoCloak) LogoutAllSessions(ctx context.Context, accessToken, realm, userID string) error

LogoutAllSessions logs out all sessions of a user given an id.

func (*GoCloak) LogoutPublicClient

func (g *GoCloak) LogoutPublicClient(ctx context.Context, clientID, realm, accessToken, refreshToken string) error

LogoutPublicClient performs a logout using a public client and the accessToken.

func (*GoCloak) LogoutUserSession

func (g *GoCloak) LogoutUserSession(ctx context.Context, accessToken, realm, session string) error

LogoutUserSession logs out a single sessions of a user given a session id

func (*GoCloak) MoveCredentialBehind

func (g *GoCloak) MoveCredentialBehind(ctx context.Context, token, realm, userID, credentialID, newPreviousCredentialID string) error

MoveCredentialBehind move a credential to a position behind another credential

func (*GoCloak) MoveCredentialToFirst

func (g *GoCloak) MoveCredentialToFirst(ctx context.Context, token, realm, userID, credentialID string) error

MoveCredentialToFirst move a credential to a first position in the credentials list of the user

func (*GoCloak) RefreshToken

func (g *GoCloak) RefreshToken(ctx context.Context, refreshToken, clientID, clientSecret, realm string) (*JWT, error)

RefreshToken refreshes the given token. May return a *APIError with further details about the issue.

func (*GoCloak) RegenerateClientSecret

func (g *GoCloak) RegenerateClientSecret(ctx context.Context, token, realm, idOfClient string) (*CredentialRepresentation, error)

RegenerateClientSecret triggers the creation of the new client secret.

func (*GoCloak) RegisterRequiredAction

func (g *GoCloak) RegisterRequiredAction(ctx context.Context, token string, realm string, requiredAction RequiredActionProviderRepresentation) error

RegisterRequiredAction creates a required action for a given realm

func (*GoCloak) RemoveDefaultGroup

func (g *GoCloak) RemoveDefaultGroup(ctx context.Context, token, realm, groupID string) error

RemoveDefaultGroup removes group from the list of default groups

func (*GoCloak) RemoveDefaultScopeFromClient

func (g *GoCloak) RemoveDefaultScopeFromClient(ctx context.Context, token, realm, idOfClient, scopeID string) error

RemoveDefaultScopeFromClient removes a client scope from the list of client's default scopes

func (*GoCloak) RemoveOptionalScopeFromClient

func (g *GoCloak) RemoveOptionalScopeFromClient(ctx context.Context, token, realm, idOfClient, scopeID string) error

RemoveOptionalScopeFromClient deletes a client scope from the list of client's optional scopes

func (*GoCloak) RestyClient

func (g *GoCloak) RestyClient() *resty.Client

RestyClient returns the internal resty g. This can be used to configure the g.

func (*GoCloak) RetrospectToken

func (g *GoCloak) RetrospectToken(ctx context.Context, accessToken, clientID, clientSecret, realm string) (*IntroSpectTokenResult, error)

RetrospectToken calls the openid-connect introspect endpoint

func (*GoCloak) RevokeToken

func (g *GoCloak) RevokeToken(ctx context.Context, realm, clientID, clientSecret, refreshToken string) error

RevokeToken revokes the passed token. The token can either be an access or refresh token.

func (*GoCloak) RevokeUserConsents

func (g *GoCloak) RevokeUserConsents(ctx context.Context, accessToken, realm, userID, clientID string) error

RevokeUserConsents revokes the given user consent.

func (*GoCloak) SendVerifyEmail

func (g *GoCloak) SendVerifyEmail(ctx context.Context, token, userID, realm string, params ...SendVerificationMailParams) error

SendVerifyEmail sends a verification e-mail to a user.

func (*GoCloak) SetPassword

func (g *GoCloak) SetPassword(ctx context.Context, token, userID, realm, password string, temporary bool) error

SetPassword sets a new password for the user with the given id. Needs elevated privileges

func (*GoCloak) SetRestyClient

func (g *GoCloak) SetRestyClient(restyClient *resty.Client)

SetRestyClient overwrites the internal resty g.

func (*GoCloak) SyncUserFederation

func (gc *GoCloak) SyncUserFederation(ctx context.Context, token, realm, componentId string, action SyncType) (*LDAPSyncResult, error)

func (*GoCloak) TestLDAPAuthentication

func (gc *GoCloak) TestLDAPAuthentication(ctx context.Context, token, realm, componentId string, component map[string][]string) error

func (*GoCloak) TestLDAPConnection

func (gc *GoCloak) TestLDAPConnection(ctx context.Context, token, realm, componentId string, component map[string][]string) error

func (*GoCloak) UpdateAuthenticationExecution

func (g *GoCloak) UpdateAuthenticationExecution(ctx context.Context, token, realm, flow string, execution ModifyAuthenticationExecutionRepresentation) error

UpdateAuthenticationExecution updates an authentication execution for the given flow in the given realm

func (*GoCloak) UpdateAuthenticationFlow

func (g *GoCloak) UpdateAuthenticationFlow(ctx context.Context, token, realm string, flow AuthenticationFlowRepresentation, authenticationFlowID string) (*AuthenticationFlowRepresentation, error)

UpdateAuthenticationFlow a given Authentication Flow

func (*GoCloak) UpdateClient

func (g *GoCloak) UpdateClient(ctx context.Context, token, realm string, updatedClient Client) error

UpdateClient updates the given Client

func (*GoCloak) UpdateClientManagementPermissions

func (g *GoCloak) UpdateClientManagementPermissions(ctx context.Context, accessToken, realm string, idOfClient string, managementPermissions ManagementPermissionRepresentation) (*ManagementPermissionRepresentation, error)

UpdateClientManagementPermissions updates the given client management permissions

func (*GoCloak) UpdateClientProtocolMapper

func (g *GoCloak) UpdateClientProtocolMapper(ctx context.Context, token, realm, idOfClient, mapperID string, mapper ProtocolMapper) error

UpdateClientProtocolMapper updates a protocol mapper in client scope

func (*GoCloak) UpdateClientRepresentation

func (g *GoCloak) UpdateClientRepresentation(ctx context.Context, accessToken, realm string, updatedClient Client) (*Client, error)

UpdateClientRepresentation updates the given client representation

func (*GoCloak) UpdateClientScope

func (g *GoCloak) UpdateClientScope(ctx context.Context, token, realm string, scope ClientScope) error

UpdateClientScope updates the given client scope.

func (*GoCloak) UpdateClientScopeProtocolMapper

func (g *GoCloak) UpdateClientScopeProtocolMapper(ctx context.Context, token, realm, scopeID string, protocolMapper ProtocolMapper) error

UpdateClientScopeProtocolMapper updates the given protocol mapper for a client scope

func (*GoCloak) UpdateComponent

func (g *GoCloak) UpdateComponent(ctx context.Context, token, realm string, component Component) error

UpdateComponent updates the given component

func (*GoCloak) UpdateCredentialUserLabel

func (g *GoCloak) UpdateCredentialUserLabel(ctx context.Context, token, realm, userID, credentialID, userLabel string) error

UpdateCredentialUserLabel updates label for the given credential for the given user

func (*GoCloak) UpdateGroup

func (g *GoCloak) UpdateGroup(ctx context.Context, token, realm string, updatedGroup Group) error

UpdateGroup updates the given group.

func (*GoCloak) UpdateGroupManagementPermissions

func (g *GoCloak) UpdateGroupManagementPermissions(ctx context.Context, accessToken, realm string, idOfGroup string, managementPermissions ManagementPermissionRepresentation) (*ManagementPermissionRepresentation, error)

UpdateGroupManagementPermissions updates the given group management permissions

func (*GoCloak) UpdateIdentityProvider

func (g *GoCloak) UpdateIdentityProvider(ctx context.Context, token, realm, alias string, providerRep IdentityProviderRepresentation) error

UpdateIdentityProvider updates the identity provider in a realm

func (*GoCloak) UpdateIdentityProviderMapper

func (g *GoCloak) UpdateIdentityProviderMapper(ctx context.Context, token, realm, alias string, mapper IdentityProviderMapper) error

UpdateIdentityProviderMapper updates mapper of an identity provider

func (*GoCloak) UpdatePermission

func (g *GoCloak) UpdatePermission(ctx context.Context, token, realm, idOfClient string, permission PermissionRepresentation) error

UpdatePermission updates a permission associated with the client

func (*GoCloak) UpdatePermissionScope

func (g *GoCloak) UpdatePermissionScope(ctx context.Context, token, realm, idOfClient string, idOfScope string, policy PolicyRepresentation) error

UpdatePermissionScope updates a permission scope associated with the client

func (*GoCloak) UpdatePolicy

func (g *GoCloak) UpdatePolicy(ctx context.Context, token, realm, idOfClient string, policy PolicyRepresentation) error

UpdatePolicy updates a policy associated with the client

func (*GoCloak) UpdateRealm

func (g *GoCloak) UpdateRealm(ctx context.Context, token string, realm RealmRepresentation) error

UpdateRealm updates a given realm

func (*GoCloak) UpdateRealmRole

func (g *GoCloak) UpdateRealmRole(ctx context.Context, token, realm, roleName string, role Role) error

UpdateRealmRole updates a role in a realm

func (*GoCloak) UpdateRealmRoleByID

func (g *GoCloak) UpdateRealmRoleByID(ctx context.Context, token, realm, roleID string, role Role) error

UpdateRealmRoleByID updates a role in a realm by role's ID

func (*GoCloak) UpdateRequiredAction

func (g *GoCloak) UpdateRequiredAction(ctx context.Context, token string, realm string, requiredAction RequiredActionProviderRepresentation) error

UpdateRequiredAction updates a required action for a given realm

func (*GoCloak) UpdateResource

func (g *GoCloak) UpdateResource(ctx context.Context, token, realm, idOfClient string, resource ResourceRepresentation) error

UpdateResource updates a resource associated with the client, using access token from admin

func (*GoCloak) UpdateResourceClient

func (g *GoCloak) UpdateResourceClient(ctx context.Context, token, realm string, resource ResourceRepresentation) error

UpdateResourceClient updates a resource associated with the client, using access token from client

func (*GoCloak) UpdateResourcePolicy

func (g *GoCloak) UpdateResourcePolicy(ctx context.Context, token, realm, permissionID string, policy ResourcePolicyRepresentation) error

UpdateResourcePolicy updates a permission for a specific resource, using token obtained by Resource Owner Password Credentials Grant or Token exchange

func (*GoCloak) UpdateRole

func (g *GoCloak) UpdateRole(ctx context.Context, token, realm, idOfClient string, role Role) error

UpdateRole updates the given role.

func (*GoCloak) UpdateScope

func (g *GoCloak) UpdateScope(ctx context.Context, token, realm, idOfClient string, scope ScopeRepresentation) error

UpdateScope updates a scope associated with the client

func (*GoCloak) UpdateUser

func (g *GoCloak) UpdateUser(ctx context.Context, token, realm string, user User) error

UpdateUser updates a given user

func (*GoCloak) UpdateUserPermission

func (g *GoCloak) UpdateUserPermission(ctx context.Context, token, realm string, permission PermissionGrantParams) (*PermissionGrantResponseRepresentation, error)

UpdateUserPermission updates user permissions.

type Group

type Group struct {
	ID          *string              `json:"id,omitempty"`
	Name        *string              `json:"name,omitempty"`
	Path        *string              `json:"path,omitempty"`
	SubGroups   *[]Group             `json:"subGroups,omitempty"`
	Attributes  *map[string][]string `json:"attributes,omitempty"`
	Access      *map[string]bool     `json:"access,omitempty"`
	ClientRoles *map[string][]string `json:"clientRoles,omitempty"`
	RealmRoles  *[]string            `json:"realmRoles,omitempty"`
}

Group is a Group

func (*Group) String

func (v *Group) String() string

type GroupDefinition

type GroupDefinition struct {
	ID             *string `json:"id,omitempty" diff:"-"`
	Path           *string `json:"path,omitempty" diff:"path"`
	ExtendChildren *bool   `json:"extendChildren,omitempty" diff:"extendChildren"`
}

GroupDefinition represents a group in a GroupPolicyRepresentation +kubebuilder:object:generate=true

func (*GroupDefinition) DeepCopy

func (in *GroupDefinition) DeepCopy() *GroupDefinition

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GroupDefinition.

func (*GroupDefinition) DeepCopyInto

func (in *GroupDefinition) DeepCopyInto(out *GroupDefinition)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*GroupDefinition) String

func (v *GroupDefinition) String() string

type GroupPolicyRepresentation

type GroupPolicyRepresentation struct {
	Groups      *[]GroupDefinition `json:"groups,omitempty" diff:"groups"`
	GroupsClaim *string            `json:"groupsClaim,omitempty" diff:"groupsClaim"`
}

GroupPolicyRepresentation represents group based policies +kubebuilder:object:generate=true

func (*GroupPolicyRepresentation) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GroupPolicyRepresentation.

func (*GroupPolicyRepresentation) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*GroupPolicyRepresentation) String

func (v *GroupPolicyRepresentation) String() string

type GroupsCount

type GroupsCount struct {
	Count int `json:"count,omitempty"`
}

GroupsCount represents the groups count response from keycloak

func (*GroupsCount) String

func (v *GroupsCount) String() string

type HTTPErrorResponse

type HTTPErrorResponse struct {
	Error       string `json:"error,omitempty"`
	Message     string `json:"errorMessage,omitempty"`
	Description string `json:"error_description,omitempty"`
}

HTTPErrorResponse is a model of an error response

func (HTTPErrorResponse) NotEmpty

func (e HTTPErrorResponse) NotEmpty() bool

NotEmpty validates that error is not emptyp

func (HTTPErrorResponse) String

func (e HTTPErrorResponse) String() string

String returns a string representation of an error

type IdentityProviderMapper

type IdentityProviderMapper struct {
	ID                     *string            `json:"id,omitempty"`
	Name                   *string            `json:"name,omitempty"`
	IdentityProviderMapper *string            `json:"identityProviderMapper,omitempty"`
	IdentityProviderAlias  *string            `json:"identityProviderAlias,omitempty"`
	Config                 *map[string]string `json:"config"`
}

IdentityProviderMapper represents the body of a call to add a mapper to an identity provider

type IdentityProviderRepresentation

type IdentityProviderRepresentation struct {
	AddReadTokenRoleOnCreate  *bool              `json:"addReadTokenRoleOnCreate,omitempty"`
	Alias                     *string            `json:"alias,omitempty"`
	Config                    *map[string]string `json:"config,omitempty"`
	DisplayName               *string            `json:"displayName,omitempty"`
	Enabled                   *bool              `json:"enabled,omitempty"`
	FirstBrokerLoginFlowAlias *string            `json:"firstBrokerLoginFlowAlias,omitempty"`
	InternalID                *string            `json:"internalId,omitempty"`
	LinkOnly                  *bool              `json:"linkOnly,omitempty"`
	PostBrokerLoginFlowAlias  *string            `json:"postBrokerLoginFlowAlias,omitempty"`
	ProviderID                *string            `json:"providerId,omitempty"`
	StoreToken                *bool              `json:"storeToken,omitempty"`
	TrustEmail                *bool              `json:"trustEmail,omitempty"`
}

IdentityProviderRepresentation represents an identity provider

func (*IdentityProviderRepresentation) String

type IntroSpectTokenResult

type IntroSpectTokenResult struct {
	Permissions *[]ResourcePermission `json:"permissions,omitempty"`
	Exp         *int                  `json:"exp,omitempty"`
	Nbf         *int                  `json:"nbf,omitempty"`
	Iat         *int                  `json:"iat,omitempty"`
	Aud         *StringOrArray        `json:"aud,omitempty"`
	Active      *bool                 `json:"active,omitempty"`
	AuthTime    *int                  `json:"auth_time,omitempty"`
	Jti         *string               `json:"jti,omitempty"`
	Type        *string               `json:"typ,omitempty"`
}

IntroSpectTokenResult is returned when a token was checked

func (*IntroSpectTokenResult) String

func (v *IntroSpectTokenResult) String() string

type IssuerResponse

type IssuerResponse struct {
	Realm           *string `json:"realm,omitempty"`
	PublicKey       *string `json:"public_key,omitempty"`
	TokenService    *string `json:"token-service,omitempty"`
	AccountService  *string `json:"account-service,omitempty"`
	TokensNotBefore *int    `json:"tokens-not-before,omitempty"`
}

IssuerResponse is returned by the issuer endpoint

func (*IssuerResponse) String

func (v *IssuerResponse) String() string

type JSPolicyRepresentation

type JSPolicyRepresentation struct {
	Code *string `json:"code,omitempty" diff:"code"`
}

JSPolicyRepresentation represents js based policies +kubebuilder:object:generate=true

func (*JSPolicyRepresentation) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JSPolicyRepresentation.

func (*JSPolicyRepresentation) DeepCopyInto

func (in *JSPolicyRepresentation) DeepCopyInto(out *JSPolicyRepresentation)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*JSPolicyRepresentation) String

func (v *JSPolicyRepresentation) String() string

type JWT

type JWT struct {
	AccessToken      string `json:"access_token"`
	IDToken          string `json:"id_token"`
	ExpiresIn        int    `json:"expires_in"`
	RefreshExpiresIn int    `json:"refresh_expires_in"`
	RefreshToken     string `json:"refresh_token"`
	TokenType        string `json:"token_type"`
	NotBeforePolicy  int    `json:"not-before-policy"`
	SessionState     string `json:"session_state"`
	Scope            string `json:"scope"`
}

JWT is a JWT

type Key

type Key struct {
	ProviderID       *string `json:"providerId,omitempty"`
	ProviderPriority *int    `json:"providerPriority,omitempty"`
	Kid              *string `json:"kid,omitempty"`
	Status           *string `json:"status,omitempty"`
	Type             *string `json:"type,omitempty"`
	Algorithm        *string `json:"algorithm,omitempty"`
	PublicKey        *string `json:"publicKey,omitempty"`
	Certificate      *string `json:"certificate,omitempty"`
}

Key is a key

func (*Key) String

func (v *Key) String() string

type KeyStoreConfig

type KeyStoreConfig struct {
	ActiveKeys *ActiveKeys `json:"active,omitempty"`
	Key        *[]Key      `json:"keys,omitempty"`
}

KeyStoreConfig holds the keyStoreConfig

func (*KeyStoreConfig) String

func (v *KeyStoreConfig) String() string

type LDAPSyncResult

type LDAPSyncResult struct {
	Ignored bool   `json:"ignored"`
	Added   int    `json:"added"`
	Updated int    `json:"updated"`
	Removed int    `json:"removed"`
	Failed  int    `json:"failed"`
	Status  string `json:"status"`
}

type Logic

type Logic string

Logic is an enum type for policy logic

func LogicP

func LogicP(value Logic) *Logic

LogicP returns a pointer for a Logic value

type ManagementPermissionRepresentation

type ManagementPermissionRepresentation struct {
	Enabled          *bool              `json:"enabled,omitempty"`
	Resource         *string            `json:"resource,omitempty"`
	ScopePermissions *map[string]string `json:"scopePermissions,omitempty"`
}

ManagementPermissionRepresentation is a representation of management permissions v18: https://www.keycloak.org/docs-api/18.0/rest-api/#_managementpermissionreference

type MappingsRepresentation

type MappingsRepresentation struct {
	ClientMappings map[string]*ClientMappingsRepresentation `json:"clientMappings,omitempty"`
	RealmMappings  *[]Role                                  `json:"realmMappings,omitempty"`
}

MappingsRepresentation is a representation of role mappings

func (*MappingsRepresentation) String

func (v *MappingsRepresentation) String() string

type MemoryInfoRepresentation

type MemoryInfoRepresentation struct {
	Free           *int    `json:"free,omitempty"`
	FreeFormated   *string `json:"freeFormated,omitempty"`
	FreePercentage *int    `json:"freePercentage,omitempty"`
	Total          *int    `json:"total,omitempty"`
	TotalFormated  *string `json:"totalFormated,omitempty"`
	Used           *int    `json:"used,omitempty"`
	UsedFormated   *string `json:"usedFormated,omitempty"`
}

MemoryInfoRepresentation represents a memory info

func (*MemoryInfoRepresentation) String

func (v *MemoryInfoRepresentation) String() string

type ModifyAuthenticationExecutionRepresentation

type ModifyAuthenticationExecutionRepresentation struct {
	ID                   *string   `json:"id,omitempty"`
	ProviderID           *string   `json:"providerId,omitempty"`
	AuthenticationConfig *string   `json:"authenticationConfig,omitempty"`
	AuthenticationFlow   *bool     `json:"authenticationFlow,omitempty"`
	Requirement          *string   `json:"requirement,omitempty"`
	FlowID               *string   `json:"flowId"`
	DisplayName          *string   `json:"displayName,omitempty"`
	Alias                *string   `json:"alias,omitempty"`
	RequirementChoices   *[]string `json:"requirementChoices,omitempty"`
	Configurable         *bool     `json:"configurable,omitempty"`
	Level                *int      `json:"level,omitempty"`
	Index                *int      `json:"index,omitempty"`
	Description          *string   `json:"description"`
}

ModifyAuthenticationExecutionRepresentation is the payload for updating an execution representation

type MultiValuedHashMap

type MultiValuedHashMap struct {
	Empty      *bool    `json:"empty,omitempty"`
	LoadFactor *float32 `json:"loadFactor,omitempty"`
	Threshold  *int32   `json:"threshold,omitempty"`
}

MultiValuedHashMap represents something

func (*MultiValuedHashMap) String

func (v *MultiValuedHashMap) String() string

type PasswordPolicy

type PasswordPolicy struct {
	ConfigType        string `json:"configType,omitempty"`
	DefaultValue      string `json:"defaultValue,omitempty"`
	DisplayName       string `json:"displayName,omitempty"`
	ID                string `json:"id,omitempty"`
	MultipleSupported bool   `json:"multipleSupported,omitempty"`
}

PasswordPolicy represents the configuration for a supported password policy

type PermissionGrantParams

type PermissionGrantParams struct {
	ResourceID  *string `json:"resource,omitempty"`
	RequesterID *string `json:"requester,omitempty"`
	Granted     *bool   `json:"granted,omitempty"`
	ScopeName   *string `json:"scopeName,omitempty"`
	TicketID    *string `json:"id,omitempty"`
}

PermissionGrantParams represents the permission which the resource owner is granting to a specific user

func (*PermissionGrantParams) String

func (v *PermissionGrantParams) String() string

type PermissionGrantResponseRepresentation

type PermissionGrantResponseRepresentation struct {
	ID          *string `json:"id,omitempty"`
	Owner       *string `json:"owner,omitempty"`
	ResourceID  *string `json:"resource,omitempty"`
	Scope       *string `json:"scope,omitempty"`
	Granted     *bool   `json:"granted,omitempty"`
	RequesterID *string `json:"requester,omitempty"`
}

PermissionGrantResponseRepresentation represents the reply from Keycloack after granting permission

func (*PermissionGrantResponseRepresentation) String

type PermissionRepresentation

type PermissionRepresentation struct {
	DecisionStrategy *string   `json:"decisionStrategy,omitempty"`
	Description      *string   `json:"description,omitempty"`
	ID               *string   `json:"id,omitempty"`
	Logic            *string   `json:"logic,omitempty"`
	Name             *string   `json:"name,omitempty"`
	Policies         *[]string `json:"policies,omitempty"`
	Resources        *[]string `json:"resources,omitempty"`
	ResourceType     *string   `json:"resourceType,omitempty"`
	Scopes           *[]string `json:"scopes,omitempty"`
	Type             *string   `json:"type,omitempty"`
}

PermissionRepresentation is a representation of a RequestingPartyPermission

func (*PermissionRepresentation) String

func (v *PermissionRepresentation) String() string

type PermissionResource

type PermissionResource struct {
	ResourceID   *string `json:"_id,omitempty"`
	ResourceName *string `json:"name,omitempty"`
}

PermissionResource represents a resources asscoiated with a permission

func (*PermissionResource) String

func (v *PermissionResource) String() string

type PermissionScope

type PermissionScope struct {
	ScopeID   *string `json:"id,omitempty"`
	ScopeName *string `json:"name,omitempty"`
}

PermissionScope represents scopes associated with a permission

func (*PermissionScope) String

func (v *PermissionScope) String() string

type PermissionTicketDescriptionRepresentation

type PermissionTicketDescriptionRepresentation struct {
	ID                     *string               `json:"id,omitempty"`
	CreatedTimeStamp       *int64                `json:"createdTimestamp,omitempty"`
	UserName               *string               `json:"username,omitempty"`
	Enabled                *bool                 `json:"enabled,omitempty"`
	TOTP                   *bool                 `json:"totp,omitempty"`
	EmailVerified          *bool                 `json:"emailVerified,omitempty"`
	FirstName              *string               `json:"firstName,omitempty"`
	LastName               *string               `json:"lastName,omitempty"`
	Email                  *string               `json:"email,omitempty"`
	DisableCredentialTypes *[]string             `json:"disableCredentialTypes,omitempty"`
	RequiredActions        *[]string             `json:"requiredActions,omitempty"`
	NotBefore              *int64                `json:"notBefore,omitempty"`
	Access                 *AccessRepresentation `json:"access,omitempty"`
}

PermissionTicketDescriptionRepresentation represents the parameters returned along with a permission ticket

func (*PermissionTicketDescriptionRepresentation) String

type PermissionTicketPermissionRepresentation

type PermissionTicketPermissionRepresentation struct {
	Scopes *[]string `json:"scopes,omitempty"`
	RSID   *string   `json:"rsid,omitempty"`
}

PermissionTicketPermissionRepresentation represents the individual permissions in a permission ticket

func (*PermissionTicketPermissionRepresentation) String

type PermissionTicketRepresentation

type PermissionTicketRepresentation struct {
	AZP         *string                                     `json:"azp,omitempty"`
	Claims      *map[string][]string                        `json:"claims,omitempty"`
	Permissions *[]PermissionTicketPermissionRepresentation `json:"permissions,omitempty"`
	jwt.RegisteredClaims
}

PermissionTicketRepresentation represents the permission ticket contents

func (*PermissionTicketRepresentation) String

type PermissionTicketResponseRepresentation

type PermissionTicketResponseRepresentation struct {
	Ticket *string `json:"ticket,omitempty"`
}

PermissionTicketResponseRepresentation represents the keycloak response containing the permission ticket

func (*PermissionTicketResponseRepresentation) String

type PolicyEnforcementMode

type PolicyEnforcementMode string

PolicyEnforcementMode is an enum type for PolicyEnforcementMode of ResourceServerRepresentation

func PolicyEnforcementModeP

func PolicyEnforcementModeP(value PolicyEnforcementMode) *PolicyEnforcementMode

PolicyEnforcementModeP returns a pointer for a PolicyEnforcementMode value

type PolicyRepresentation

type PolicyRepresentation struct {
	Config *map[string]string `json:"config,omitempty" diff:"config"`
	// +kubebuilder:validation:Enum=AFFIRMATIVE;UNANIMOUS;CONSENSUS
	DecisionStrategy *string `json:"decisionStrategy,omitempty" diff:"decisionStrategy"`
	Description      *string `json:"description,omitempty" diff:"description"`
	ID               *string `json:"id,omitempty" diff:"-"`
	// +kubebuilder:validation:Enum=POSITIVE;NEGATIVE
	Logic     *string   `json:"logic,omitempty" diff:"logic"`
	Name      *string   `json:"name,omitempty" diff:"name"`
	Owner     *string   `json:"owner,omitempty" diff:"owner"`
	Policies  *[]string `json:"policies,omitempty" diff:"policies"`
	Resources *[]string `json:"resources,omitempty" diff:"resources"`
	Scopes    *[]string `json:"scopes,omitempty" diff:"scopes"`
	Type      *string   `json:"type,omitempty" diff:"type"`
}

PolicyRepresentation is a representation of a Policy +kubebuilder:object:generate=true

func (*PolicyRepresentation) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolicyRepresentation.

func (*PolicyRepresentation) DeepCopyInto

func (in *PolicyRepresentation) DeepCopyInto(out *PolicyRepresentation)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*PolicyRepresentation) String

func (v *PolicyRepresentation) String() string

type PolicyResourceRepresentation

type PolicyResourceRepresentation struct {
	ID   *string `json:"_id,omitempty"`
	Name *string `json:"name,omitempty"`
}

PolicyResourceRepresentation is a representation of a resource of specific policy

type PolicyScopeRepresentation

type PolicyScopeRepresentation struct {
	ID   *string `json:"id,omitempty"`
	Name *string `json:"name,omitempty"`
}

PolicyScopeRepresentation is a representation of a scopes of specific policy

type ProtocolMapper

type ProtocolMapper struct {
	// +optional
	Config *map[string]string `json:"config,omitempty" diff:"config"`
	// +optional
	ID *string `json:"id,omitempty" diff:"-"`
	// +required
	Name *string `json:"name,omitempty" diff:"name"`
	// +required
	Protocol *string `json:"protocol,omitempty" diff:"protocol"`
	// +kubebuilder:validation:Enum=oidc-acr-mapper;oidc-address-mapper;oidc-allowed-origins-mapper;oidc-audience-mapper;oidc-audience-resolve-mapper;oidc-claims-param-token-mapper;oidc-full-name-mapper;oidc-group-membership-mapper;oidc-hardcoded-claim-mapper;oidc-hardcoded-role-mapper;oidc-role-name-mapper;oidc-sha256-pairwise-sub-mapper;oidc-usermodel-attribute-mapper;oidc-usermodel-client-role-mapper;oidc-usermodel-property-mapper;oidc-usermodel-realm-role-mapper;oidc-usersessionmodel-note-mapper
	// +required
	ProtocolMapper *string `json:"protocolMapper,omitempty" diff:"protocolMapper"`
	// +kubebuilder:default=false
	ConsentRequired *bool `json:"consentRequired,omitempty" diff:"consentRequired"`
}

ProtocolMapper representation +kubebuilder:object:generate=true

func (*ProtocolMapper) DeepCopy

func (in *ProtocolMapper) DeepCopy() *ProtocolMapper

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProtocolMapper.

func (*ProtocolMapper) DeepCopyInto

func (in *ProtocolMapper) DeepCopyInto(out *ProtocolMapper)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ProtocolMapper) String

func (v *ProtocolMapper) String() string

type ProtocolMapperType

type ProtocolMapperType struct {
	ID         string                       `json:"id,omitempty"`
	Name       string                       `json:"name,omitempty"`
	Category   string                       `json:"category,omitempty"`
	HelpText   string                       `json:"helpText,omitempty"`
	Priority   int                          `json:"priority,omitempty"`
	Properties []ProtocolMapperTypeProperty `json:"properties,omitempty"`
}

ProtocolMapperType represents a type of protocol mapper

type ProtocolMapperTypeProperty

type ProtocolMapperTypeProperty struct {
	Name         string         `json:"name,omitempty"`
	Label        string         `json:"label,omitempty"`
	HelpText     string         `json:"helpText,omitempty"`
	Type         string         `json:"type,omitempty"`
	Options      []string       `json:"options,omitempty"`
	DefaultValue EnforcedString `json:"defaultValue,omitempty"`
	Secret       bool           `json:"secret,omitempty"`
	ReadOnly     bool           `json:"readOnly,omitempty"`
}

ProtocolMapperTypeProperty represents a property of a ProtocolMapperType

type ProtocolMapperTypes

type ProtocolMapperTypes struct {
	DockerV2      []ProtocolMapperType `json:"docker-v2,omitempty"`
	SAML          []ProtocolMapperType `json:"saml,omitempty"`
	OpenIDConnect []ProtocolMapperType `json:"openid-connect,omitempty"`
}

ProtocolMapperTypes holds the currently available ProtocolMapperType-s grouped by protocol

type RealmRepresentation

type RealmRepresentation struct {
	// +kubebuilder:default=60
	AccessCodeLifespan *int `json:"accessCodeLifespan,omitempty" diff:"accessCodeLifespan"`
	// +kubebuilder:default=1800
	AccessCodeLifespanLogin *int `json:"accessCodeLifespanLogin,omitempty" diff:"accessCodeLifespanLogin"`
	// +kubebuilder:default=300
	AccessCodeLifespanUserAction *int `json:"accessCodeLifespanUserAction,omitempty" diff:"accessCodeLifespanUserAction"`
	// +kubebuilder:default=300
	AccessTokenLifespan *int `json:"accessTokenLifespan,omitempty" diff:"accessTokenLifespan"`
	// +kubebuilder:default=900
	AccessTokenLifespanForImplicitFlow *int `json:"accessTokenLifespanForImplicitFlow,omitempty" diff:"accessTokenLifespanForImplicitFlow"`
	// +optional
	AccountTheme *string `json:"accountTheme,omitempty" diff:"accountTheme"`
	// +kubebuilder:default=43200
	ActionTokenGeneratedByAdminLifespan *int `json:"actionTokenGeneratedByAdminLifespan,omitempty" diff:"actionTokenGeneratedByAdminLifespan"`
	// +kubebuilder:default=300
	ActionTokenGeneratedByUserLifespan *int `json:"actionTokenGeneratedByUserLifespan,omitempty" diff:"actionTokenGeneratedByUserLifespan"`
	// +kubebuilder:default=false
	AdminEventsDetailsEnabled *bool `json:"adminEventsDetailsEnabled,omitempty" diff:"adminEventsDetailsEnabled"`
	// +kubebuilder:default=false
	AdminEventsEnabled *bool `json:"adminEventsEnabled,omitempty" diff:"adminEventsEnabled"`
	// +optional
	AdminTheme *string `json:"adminTheme,omitempty" diff:"adminTheme"`
	// +kubebuilder:default={}
	Attributes *map[string]string `json:"attributes,omitempty" diff:"-"`
	// +kubebuilder:default="browser"
	BrowserFlow *string `json:"browserFlow,omitempty" diff:"browserFlow"`
	// +kubebuilder:default={}
	BrowserSecurityHeaders *map[string]string `json:"browserSecurityHeaders,omitempty" diff:"-"`
	// +kubebuilder:default=false
	BruteForceProtected *bool `json:"bruteForceProtected,omitempty" diff:"bruteForceProtected"`
	// +kubebuilder:default="clients"
	ClientAuthenticationFlow *string `json:"clientAuthenticationFlow,omitempty" diff:"clientAuthenticationFlow"`
	// +optional
	DefaultDefaultClientScopes *[]string `json:"defaultDefaultClientScopes,omitempty" diff:"defaultDefaultClientScopes"`
	// +optional
	DefaultGroups *[]string `json:"defaultGroups,omitempty" diff:"defaultGroups"`
	// +kubebuilder:default=""
	DefaultLocale *string `json:"defaultLocale,omitempty" diff:"defaultLocale"`
	// +optional
	DefaultOptionalClientScopes *[]string `json:"defaultOptionalClientScopes,omitempty" diff:"defaultOptionalClientScopes"`
	// +optional
	DefaultRole *Role `json:"defaultRole,omitempty" diff:"-"`
	// +optional
	DefaultRoles *[]string `json:"defaultRoles,omitempty" diff:"defaultRoles"`
	// +kubebuilder:default=""
	DefaultSignatureAlgorithm *string `json:"defaultSignatureAlgorithm,omitempty" diff:"defaultSignatureAlgorithm"`
	// +kubebuilder:default="direct grant"
	DirectGrantFlow *string `json:"directGrantFlow,omitempty" diff:"directGrantFlow"`
	// +kubebuilder:default=""
	DisplayName *string `json:"displayName,omitempty" diff:"displayName"`
	// +kubebuilder:default=""
	DisplayNameHTML *string `json:"displayNameHtml,omitempty" diff:"displayNameHtml"`
	// +kubebuilder:default="docker auth"
	DockerAuthenticationFlow *string `json:"dockerAuthenticationFlow,omitempty" diff:"dockerAuthenticationFlow"`
	// +kubebuilder:default=false
	DuplicateEmailsAllowed *bool `json:"duplicateEmailsAllowed,omitempty" diff:"duplicateEmailsAllowed"`
	// +kubebuilder:default=false
	EditUsernameAllowed *bool `json:"editUsernameAllowed,omitempty" diff:"editUsernameAllowed"`
	// +optional
	EmailTheme *string `json:"emailTheme,omitempty" diff:"emailTheme"`
	// +kubebuilder:default=true
	Enabled *bool `json:"enabled,omitempty" diff:"enabled"`
	// +kubebuilder:default={}
	EnabledEventTypes *[]string `json:"enabledEventTypes,omitempty" diff:"enabledEventTypes"`
	// +kubebuilder:default=false
	EventsEnabled *bool `json:"eventsEnabled,omitempty" diff:"eventsEnabled"`
	// +optional
	EventsExpiration *int64 `json:"eventsExpiration,omitempty" diff:"eventsExpiration"`
	// +kubebuilder:default={"jboss-logging"}
	EventsListeners *[]string `json:"eventsListeners,omitempty" diff:"eventsListeners"`
	// +kubebuilder:default=30
	FailureFactor *int `json:"failureFactor,omitempty" diff:"failureFactor"`
	// +optional
	ID *string `json:"id,omitempty" diff:"-"`
	// +kubebuilder:default=false
	InternationalizationEnabled *bool `json:"internationalizationEnabled,omitempty" diff:"internationalizationEnabled"`
	// +optional
	KeycloakVersion *string `json:"keycloakVersion,omitempty" diff:"keycloakVersion"`
	// +optional
	LoginTheme *string `json:"loginTheme,omitempty" diff:"loginTheme"`
	// +kubebuilder:default=true
	LoginWithEmailAllowed *bool `json:"loginWithEmailAllowed,omitempty" diff:"loginWithEmailAllowed"`
	// +kubebuilder:default=43200
	MaxDeltaTimeSeconds *int `json:"maxDeltaTimeSeconds,omitempty" diff:"maxDeltaTimeSeconds"`
	// +kubebuilder:default=900
	MaxFailureWaitSeconds *int `json:"maxFailureWaitSeconds,omitempty" diff:"maxFailureWaitSeconds"`
	// +kubebuilder:default=60
	MinimumQuickLoginWaitSeconds *int `json:"minimumQuickLoginWaitSeconds,omitempty" diff:"minimumQuickLoginWaitSeconds"`
	// +kubebuilder:default=0
	NotBefore *int `json:"notBefore,omitempty" diff:"notBefore"`
	// +kubebuilder:default=2582000
	OfflineSessionIdleTimeout *int `json:"offlineSessionIdleTimeout,omitempty" diff:"offlineSessionIdleTimeout"`
	// +kubebuilder:default=5184000
	OfflineSessionMaxLifespan *int `json:"offlineSessionMaxLifespan,omitempty" diff:"offlineSessionMaxLifespan"`
	// +kubebuilder:default=false
	OfflineSessionMaxLifespanEnabled *bool `json:"offlineSessionMaxLifespanEnabled,omitempty" diff:"offlineSessionMaxLifespanEnabled"`
	// +kubebuilder:default="HmacSHA1"
	OtpPolicyAlgorithm *string `json:"otpPolicyAlgorithm,omitempty" diff:"otpPolicyAlgorithm"`
	// +kubebuilder:default=6
	OtpPolicyDigits *int `json:"otpPolicyDigits,omitempty" diff:"otpPolicyDigits"`
	// +kubebuilder:default=0
	OtpPolicyInitialCounter *int `json:"otpPolicyInitialCounter,omitempty" diff:"otpPolicyInitialCounter"`
	// +kubebuilder:default=1
	OtpPolicyLookAheadWindow *int `json:"otpPolicyLookAheadWindow,omitempty" diff:"otpPolicyLookAheadWindow"`
	// +kubebuilder:default=30
	OtpPolicyPeriod *int `json:"otpPolicyPeriod,omitempty" diff:"otpPolicyPeriod"`
	// +kubebuilder:default="totp"
	OtpPolicyType *string `json:"otpPolicyType,omitempty" diff:"otpPolicyType"`
	// +kubebuilder:default={"FreeOTP", "Google Authenticator"}
	OtpSupportedApplications *[]string `json:"otpSupportedApplications,omitempty" diff:"otpSupportedApplications"`
	// +optional
	PasswordPolicy *string `json:"passwordPolicy,omitempty" diff:"passwordPolicy"`
	// +kubebuilder:default=false
	PermanentLockout *bool `json:"permanentLockout,omitempty" diff:"permanentLockout"`
	// +kubebuilder:default=1000
	QuickLoginCheckMilliSeconds *int64 `json:"quickLoginCheckMilliSeconds,omitempty" diff:"quickLoginCheckMilliSeconds"`
	// +required
	Realm *string `json:"realm,omitempty" diff:"realm"`
	// +kubebuilder:default=0
	RefreshTokenMaxReuse *int `json:"refreshTokenMaxReuse,omitempty" diff:"refreshTokenMaxReuse"`
	// +kubebuilder:default=false
	RegistrationAllowed *bool `json:"registrationAllowed,omitempty" diff:"registrationAllowed"`
	// +kubebuilder:default=false
	RegistrationEmailAsUsername *bool `json:"registrationEmailAsUsername,omitempty" diff:"registrationEmailAsUsername"`
	// +kubebuilder:default="registration"
	RegistrationFlow *string `json:"registrationFlow,omitempty" diff:"registrationFlow"`
	// +kubebuilder:default=false
	RememberMe *bool `json:"rememberMe,omitempty" diff:"rememberMe"`
	// +kubebuilder:default="reset credentials"
	ResetCredentialsFlow *string `json:"resetCredentialsFlow,omitempty" diff:"resetCredentialsFlow"`
	// +kubebuilder:default=false
	ResetPasswordAllowed *bool `json:"resetPasswordAllowed,omitempty" diff:"resetPasswordAllowed"`
	// +kubebuilder:default=false
	RevokeRefreshToken *bool `json:"revokeRefreshToken,omitempty" diff:"revokeRefreshToken"`
	// +optional
	SMTPServer *map[string]string `json:"smtpServer,omitempty" diff:"smtpServer"`
	// +kubebuilder:default="external"
	SslRequired *string `json:"sslRequired,omitempty" diff:"sslRequired"`
	// +kubebuilder:default=1800
	SsoSessionIdleTimeout *int `json:"ssoSessionIdleTimeout,omitempty" diff:"ssoSessionIdleTimeout"`
	// +kubebuilder:default=0
	SsoSessionIdleTimeoutRememberMe *int `json:"ssoSessionIdleTimeoutRememberMe,omitempty" diff:"ssoSessionIdleTimeoutRememberMe"`
	// +kubebuilder:default=43200
	SsoSessionMaxLifespan *int `json:"ssoSessionMaxLifespan,omitempty" diff:"ssoSessionMaxLifespan"`
	// +kubebuilder:default=0
	SsoSessionMaxLifespanRememberMe *int `json:"ssoSessionMaxLifespanRememberMe,omitempty" diff:"ssoSessionMaxLifespanRememberMe"`
	// +optional
	SupportedLocales *[]string `json:"supportedLocales,omitempty" diff:"supportedLocales"`
	// +kubebuilder:default=false
	UserManagedAccessAllowed *bool `json:"userManagedAccessAllowed,omitempty" diff:"userManagedAccessAllowed"`
	// +kubebuilder:default=false
	VerifyEmail *bool `json:"verifyEmail,omitempty" diff:"verifyEmail"`
	// +kubebuilder:default=60
	WaitIncrementSeconds *int `json:"waitIncrementSeconds,omitempty" diff:"waitIncrementSeconds"`
	// +optional
	WebAuthnPolicyAcceptableAaguids *[]string `json:"webAuthnPolicyAcceptableAaguids,omitempty" diff:"webAuthnPolicyAcceptableAaguids"`
	// +kubebuilder:default="not specified"
	WebAuthnPolicyAttestationConveyancePreference *string `json:"webAuthnPolicyAttestationConveyancePreference,omitempty" diff:"webAuthnPolicyAttestationConveyancePreference"`
	// +kubebuilder:default="not specified"
	WebAuthnPolicyAuthenticatorAttachment *string `json:"webAuthnPolicyAuthenticatorAttachment,omitempty" diff:"webAuthnPolicyAuthenticatorAttachment"`
	// +kubebuilder:default=false
	WebAuthnPolicyAvoidSameAuthenticatorRegister *bool `json:"webAuthnPolicyAvoidSameAuthenticatorRegister,omitempty" diff:"webAuthnPolicyAvoidSameAuthenticatorRegister"`
	// +kubebuilder:default=0
	WebAuthnPolicyCreateTimeout *int `json:"webAuthnPolicyCreateTimeout,omitempty" diff:"webAuthnPolicyCreateTimeout"`
	// +optional
	WebAuthnPolicyPasswordlessAcceptableAaguids *[]string `json:"webAuthnPolicyPasswordlessAcceptableAaguids,omitempty" diff:"webAuthnPolicyPasswordlessAcceptableAaguids"`
	// +kubebuilder:default="not specified"
	WebAuthnPolicyPasswordlessAttestationConveyancePreference *string `` /* 139-byte string literal not displayed */
	// +kubebuilder:default="not specified"
	WebAuthnPolicyPasswordlessAuthenticatorAttachment *string `json:"webAuthnPolicyPasswordlessAuthenticatorAttachment,omitempty" diff:"webAuthnPolicyPasswordlessAuthenticatorAttachment"`
	// +kubebuilder:default=false
	WebAuthnPolicyPasswordlessAvoidSameAuthenticatorRegister *bool `` /* 137-byte string literal not displayed */
	// +kubebuilder:default=0
	WebAuthnPolicyPasswordlessCreateTimeout *int `json:"webAuthnPolicyPasswordlessCreateTimeout,omitempty" diff:"webAuthnPolicyPasswordlessCreateTimeout"`
	// +kubebuilder:default="not specified"
	WebAuthnPolicyPasswordlessRequireResidentKey *string `json:"webAuthnPolicyPasswordlessRequireResidentKey,omitempty" diff:"webAuthnPolicyPasswordlessRequireResidentKey"`
	// +kubebuilder:default="keycloak"
	WebAuthnPolicyPasswordlessRpEntityName *string `json:"webAuthnPolicyPasswordlessRpEntityName,omitempty" diff:"webAuthnPolicyPasswordlessRpEntityName"`
	// +kubebuilder:default=""
	WebAuthnPolicyPasswordlessRpID *string `json:"webAuthnPolicyPasswordlessRpId,omitempty" diff:"webAuthnPolicyPasswordlessRpId"`
	// +kubebuilder:default={"ES256"}
	WebAuthnPolicyPasswordlessSignatureAlgorithms *[]string `json:"webAuthnPolicyPasswordlessSignatureAlgorithms,omitempty" diff:"webAuthnPolicyPasswordlessSignatureAlgorithms"`
	// +kubebuilder:default="not specified"
	WebAuthnPolicyPasswordlessUserVerificationRequirement *string `` /* 131-byte string literal not displayed */
	// +kubebuilder:default="not specified"
	WebAuthnPolicyRequireResidentKey *string `json:"webAuthnPolicyRequireResidentKey,omitempty" diff:"webAuthnPolicyRequireResidentKey"`
	// +kubebuilder:default="keycloak"
	WebAuthnPolicyRpEntityName *string `json:"webAuthnPolicyRpEntityName,omitempty" diff:"webAuthnPolicyRpEntityName"`
	// +kubebuilder:default=""
	WebAuthnPolicyRpID *string `json:"webAuthnPolicyRpId,omitempty" diff:"webAuthnPolicyRpId"`
	// +kubebuilder:default={"ES256"}
	WebAuthnPolicySignatureAlgorithms *[]string `json:"webAuthnPolicySignatureAlgorithms,omitempty" diff:"webAuthnPolicySignatureAlgorithms"`
	// +kubebuilder:default="not specified"
	WebAuthnPolicyUserVerificationRequirement *string `json:"webAuthnPolicyUserVerificationRequirement,omitempty" diff:"webAuthnPolicyUserVerificationRequirement"`
}

RealmRepresentation represents a realm +kubebuilder:object:generate=true

func (*RealmRepresentation) DeepCopy

func (in *RealmRepresentation) DeepCopy() *RealmRepresentation

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RealmRepresentation.

func (*RealmRepresentation) DeepCopyInto

func (in *RealmRepresentation) DeepCopyInto(out *RealmRepresentation)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*RealmRepresentation) String

func (v *RealmRepresentation) String() string

type RequestingPartyPermission

type RequestingPartyPermission struct {
	Claims       *map[string]string `json:"claims,omitempty"`
	ResourceID   *string            `json:"rsid,omitempty"`
	ResourceName *string            `json:"rsname,omitempty"`
	Scopes       *[]string          `json:"scopes,omitempty"`
}

RequestingPartyPermission is returned by request party token with response type set to "permissions"

func (*RequestingPartyPermission) String

func (v *RequestingPartyPermission) String() string

type RequestingPartyPermissionDecision

type RequestingPartyPermissionDecision struct {
	Result *bool `json:"result,omitempty"`
}

RequestingPartyPermissionDecision is returned by request party token with response type set to "decision"

type RequestingPartyTokenOptions

type RequestingPartyTokenOptions struct {
	GrantType                   *string   `json:"grant_type,omitempty"`
	Ticket                      *string   `json:"ticket,omitempty"`
	ClaimToken                  *string   `json:"claim_token,omitempty"`
	ClaimTokenFormat            *string   `json:"claim_token_format,omitempty"`
	RPT                         *string   `json:"rpt,omitempty"`
	Permissions                 *[]string `json:"-"`
	Audience                    *string   `json:"audience,omitempty"`
	ResponseIncludeResourceName *bool     `json:"response_include_resource_name,string,omitempty"`
	ResponsePermissionsLimit    *uint32   `json:"response_permissions_limit,omitempty"`
	SubmitRequest               *bool     `json:"submit_request,string,omitempty"`
	ResponseMode                *string   `json:"response_mode,omitempty"`
	SubjectToken                *string   `json:"subject_token,omitempty"`
}

RequestingPartyTokenOptions represents the options to obtain a requesting party token

func (*RequestingPartyTokenOptions) FormData

func (t *RequestingPartyTokenOptions) FormData() map[string]string

FormData returns a map of options to be used in SetFormData function

func (*RequestingPartyTokenOptions) String

func (t *RequestingPartyTokenOptions) String() string

type RequiredActionProviderRepresentation

type RequiredActionProviderRepresentation struct {
	Alias         *string            `json:"alias,omitempty"`
	Config        *map[string]string `json:"config,omitempty"`
	DefaultAction *bool              `json:"defaultAction,omitempty"`
	Enabled       *bool              `json:"enabled,omitempty"`
	Name          *string            `json:"name,omitempty"`
	Priority      *int32             `json:"priority,omitempty"`
	ProviderID    *string            `json:"providerId,omitempty"`
}

RequiredActionProviderRepresentation is a representation of required actions v15: https://www.keycloak.org/docs-api/15.0/rest-api/index.html#_requiredactionproviderrepresentation

func (*RequiredActionProviderRepresentation) String

type ResourceOwnerRepresentation

type ResourceOwnerRepresentation struct {
	ID   *string `json:"id,omitempty" diff:"-"`
	Name *string `json:"name,omitempty" diff:"name"`
}

ResourceOwnerRepresentation represents a resource's owner +kubebuilder:object:generate=true

func (*ResourceOwnerRepresentation) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceOwnerRepresentation.

func (*ResourceOwnerRepresentation) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ResourceOwnerRepresentation) String

func (v *ResourceOwnerRepresentation) String() string

type ResourcePermission

type ResourcePermission struct {
	RSID           *string   `json:"rsid,omitempty"`
	ResourceID     *string   `json:"resource_id,omitempty"`
	RSName         *string   `json:"rsname,omitempty"`
	Scopes         *[]string `json:"scopes,omitempty"`
	ResourceScopes *[]string `json:"resource_scopes,omitempty"`
}

ResourcePermission represents a permission granted to a resource

func (*ResourcePermission) String

func (v *ResourcePermission) String() string

type ResourcePolicyRepresentation

type ResourcePolicyRepresentation struct {
	Name             *string   `json:"name,omitempty"`
	Description      *string   `json:"description,omitempty"`
	Scopes           *[]string `json:"scopes,omitempty"`
	Roles            *[]string `json:"roles,omitempty"`
	Groups           *[]string `json:"groups,omitempty"`
	Clients          *[]string `json:"clients,omitempty"`
	ID               *string   `json:"id,omitempty"`
	Logic            *string   `json:"logic,omitempty"`
	DecisionStrategy *string   `json:"decisionStrategy,omitempty"`
	Owner            *string   `json:"owner,omitempty"`
	Type             *string   `json:"type,omitempty"`
	Users            *[]string `json:"users,omitempty"`
}

ResourcePolicyRepresentation is a representation of a Policy applied to a resource

func (*ResourcePolicyRepresentation) String

type ResourceRepresentation

type ResourceRepresentation struct {
	ID                 *string                      `json:"_id,omitempty" diff:"-"`
	Attributes         *map[string][]string         `json:"attributes,omitempty" diff:"-"`
	DisplayName        *string                      `json:"displayName,omitempty" diff:"displayName"`
	IconURI            *string                      `json:"icon_uri,omitempty" diff:"icon_uri"`
	Name               *string                      `json:"name,omitempty" diff:"name"`
	Owner              *ResourceOwnerRepresentation `json:"owner,omitempty" diff:"owner"`
	OwnerManagedAccess *bool                        `json:"ownerManagedAccess,omitempty" diff:"ownerManagedAccess"`
	ResourceScopes     *[]ScopeRepresentation       `json:"resource_scopes,omitempty" diff:"resource_scopes"`
	Type               *string                      `json:"type,omitempty" diff:"type"`
	URIs               *[]string                    `json:"uris,omitempty" diff:"uris"`
}

ResourceRepresentation is a representation of a Resource +kubebuilder:object:generate=true

func (*ResourceRepresentation) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceRepresentation.

func (*ResourceRepresentation) DeepCopyInto

func (in *ResourceRepresentation) DeepCopyInto(out *ResourceRepresentation)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ResourceRepresentation) String

func (v *ResourceRepresentation) String() string

type ResourceServerRepresentation

type ResourceServerRepresentation struct {
	AllowRemoteResourceManagement *bool                   `json:"allowRemoteResourceManagement,omitempty" diff:"allowRemoteResourceManagement"`
	ClientID                      *string                 `json:"clientId,omitempty" diff:"clientId"`
	ID                            *string                 `json:"id,omitempty" diff:"-"`
	Name                          *string                 `json:"name,omitempty" diff:"name"`
	Policies                      *[]PolicyRepresentation `json:"policies,omitempty" diff:"policies"`
	// +kubebuilder:validation:Enum=ENFORCING;PERMISSIVE;DISABLED
	PolicyEnforcementMode *string                   `json:"policyEnforcementMode,omitempty" diff:"policyEnforcementMode"`
	Resources             *[]ResourceRepresentation `json:"resources,omitempty" diff:"resources"`
	Scopes                *[]ScopeRepresentation    `json:"scopes,omitempty" diff:"scopes"`
	// +kubebuilder:validation:Enum=AFFIRMATIVE;UNANIMOUS;CONSENSUS
	DecisionStrategy *string `json:"decisionStrategy,omitempty" diff:"decisionStrategy"`
}

ResourceServerRepresentation represents the resources of a Server +kubebuilder:object:generate=true

func (*ResourceServerRepresentation) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceServerRepresentation.

func (*ResourceServerRepresentation) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ResourceServerRepresentation) String

type Role

type Role struct {
	// +optional
	ID *string `json:"id,omitempty" diff:"-"`
	// +required
	Name *string `json:"name,omitempty" diff:"name"`
	// +optional
	ScopeParamRequired *bool `json:"scopeParamRequired,omitempty" diff:"scopeParamRequired"`
	// +kubebuilder:default=false
	Composite *bool `json:"composite,omitempty" diff:"composite"`
	// +optional
	Composites *CompositesRepresentation `json:"composites,omitempty" diff:"composites"`
	// +optional
	ClientRole *bool `json:"clientRole,omitempty" diff:"clientRole"`
	// +optional
	ContainerID *string `json:"containerId,omitempty" diff:"-"`
	// +kubebuilder:default=""
	Description *string `json:"description,omitempty" diff:"description"`
	// +optional
	Attributes *map[string][]string `json:"attributes,omitempty" diff:"-"`
}

Role is a role +kubebuilder:object:generate=true

func (*Role) DeepCopy

func (in *Role) DeepCopy() *Role

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Role.

func (*Role) DeepCopyInto

func (in *Role) DeepCopyInto(out *Role)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Role) String

func (v *Role) String() string

type RoleDefinition

type RoleDefinition struct {
	ID       *string `json:"id,omitempty" diff:"-"`
	Private  *bool   `json:"private,omitempty" diff:"private"`
	Required *bool   `json:"required,omitempty" diff:"required"`
}

RoleDefinition represents a role in a RolePolicyRepresentation +kubebuilder:object:generate=true

func (*RoleDefinition) DeepCopy

func (in *RoleDefinition) DeepCopy() *RoleDefinition

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RoleDefinition.

func (*RoleDefinition) DeepCopyInto

func (in *RoleDefinition) DeepCopyInto(out *RoleDefinition)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*RoleDefinition) String

func (v *RoleDefinition) String() string

type RolePolicyRepresentation

type RolePolicyRepresentation struct {
	Roles *[]RoleDefinition `json:"roles,omitempty" diff:"roles"`
}

RolePolicyRepresentation represents role based policies +kubebuilder:object:generate=true

func (*RolePolicyRepresentation) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RolePolicyRepresentation.

func (*RolePolicyRepresentation) DeepCopyInto

func (in *RolePolicyRepresentation) DeepCopyInto(out *RolePolicyRepresentation)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*RolePolicyRepresentation) String

func (v *RolePolicyRepresentation) String() string

type RolesRepresentation

type RolesRepresentation struct {
	Client *map[string][]Role `json:"client,omitempty"`
	Realm  *[]Role            `json:"realm,omitempty"`
}

RolesRepresentation represents the roles of a realm

func (*RolesRepresentation) String

func (v *RolesRepresentation) String() string

type ScopeRepresentation

type ScopeRepresentation struct {
	DisplayName *string                 `json:"displayName,omitempty" diff:"displayName"`
	IconURI     *string                 `json:"iconUri,omitempty" diff:"iconUri"`
	ID          *string                 `json:"id,omitempty" diff:"-"`
	Name        *string                 `json:"name,omitempty" diff:"name"`
	Policies    *[]PolicyRepresentation `json:"policies,omitempty" diff:"policies"`
}

ScopeRepresentation is a represents a Scope +kubebuilder:object:generate=true

func (*ScopeRepresentation) DeepCopy

func (in *ScopeRepresentation) DeepCopy() *ScopeRepresentation

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScopeRepresentation.

func (*ScopeRepresentation) DeepCopyInto

func (in *ScopeRepresentation) DeepCopyInto(out *ScopeRepresentation)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ScopeRepresentation) String

func (v *ScopeRepresentation) String() string

type SendVerificationMailParams

type SendVerificationMailParams struct {
	ClientID    *string
	RedirectURI *string
}

SendVerificationMailParams is being used to send verification params

type ServerInfoRepresentation

type ServerInfoRepresentation struct {
	SystemInfo             *SystemInfoRepresentation `json:"systemInfo,omitempty"`
	MemoryInfo             *MemoryInfoRepresentation `json:"memoryInfo,omitempty"`
	PasswordPolicies       []*PasswordPolicy         `json:"passwordPolicies,omitempty"`
	ProtocolMapperTypes    *ProtocolMapperTypes      `json:"protocolMapperTypes,omitempty"`
	BuiltinProtocolMappers *BuiltinProtocolMappers   `json:"builtinProtocolMappers,omitempty"`
	Themes                 *Themes                   `json:"themes,omitempty"`
}

ServerInfoRepresentation represents a server info

func (*ServerInfoRepresentation) String

func (v *ServerInfoRepresentation) String() string

type SetPasswordRequest

type SetPasswordRequest struct {
	Type      *string `json:"type,omitempty"`
	Temporary *bool   `json:"temporary,omitempty"`
	Password  *string `json:"value,omitempty"`
}

SetPasswordRequest sets a new password

func (*SetPasswordRequest) String

func (v *SetPasswordRequest) String() string

type StringOrArray

type StringOrArray []string

StringOrArray represents a value that can either be a string or an array of strings

func (*StringOrArray) MarshalJSON

func (s *StringOrArray) MarshalJSON() ([]byte, error)

MarshalJSON converts the array of strings to a JSON array or JSON string if there is only one item in the array

func (*StringOrArray) UnmarshalJSON

func (s *StringOrArray) UnmarshalJSON(data []byte) error

UnmarshalJSON unmarshals a string or an array object from a JSON array or a JSON string

type SyncType

type SyncType string
const (
	FULL_SYNC     SyncType = "triggerFullSync"
	CHANGED_USERS SyncType = "triggerChangedUsersSync"
)

type SystemInfoRepresentation

type SystemInfoRepresentation struct {
	FileEncoding   *string `json:"fileEncoding,omitempty"`
	JavaHome       *string `json:"javaHome,omitempty"`
	JavaRuntime    *string `json:"javaRuntime,omitempty"`
	JavaVendor     *string `json:"javaVendor,omitempty"`
	JavaVersion    *string `json:"javaVersion,omitempty"`
	JavaVM         *string `json:"javaVm,omitempty"`
	JavaVMVersion  *string `json:"javaVmVersion,omitempty"`
	OSArchitecture *string `json:"osArchitecture,omitempty"`
	OSName         *string `json:"osName,omitempty"`
	OSVersion      *string `json:"osVersion,omitempty"`
	ServerTime     *string `json:"serverTime,omitempty"`
	Uptime         *string `json:"uptime,omitempty"`
	UptimeMillis   *int    `json:"uptimeMillis,omitempty"`
	UserDir        *string `json:"userDir,omitempty"`
	UserLocale     *string `json:"userLocale,omitempty"`
	UserName       *string `json:"userName,omitempty"`
	UserTimezone   *string `json:"userTimezone,omitempty"`
	Version        *string `json:"version,omitempty"`
}

SystemInfoRepresentation represents a system info

func (*SystemInfoRepresentation) String

func (v *SystemInfoRepresentation) String() string

type ThemeRepresentation

type ThemeRepresentation struct {
	Name    string   `json:"name,omitempty"`
	Locales []string `json:"locales,omitempty"`
}

ThemeRepresentation contains the theme name and locales

type Themes

type Themes struct {
	Accounts []ThemeRepresentation `json:"account,omitempty"`
	Admin    []ThemeRepresentation `json:"admin,omitempty"`
	Common   []ThemeRepresentation `json:"common,omitempty"`
	Email    []ThemeRepresentation `json:"email,omitempty"`
	Login    []ThemeRepresentation `json:"login,omitempty"`
	Welcome  []ThemeRepresentation `json:"welcome,omitempty"`
}

Themes contains the available keycloak themes with locales

type TimePolicyRepresentation

type TimePolicyRepresentation struct {
	NotBefore    *string `json:"notBefore,omitempty" diff:"notBefore"`
	NotOnOrAfter *string `json:"notOnOrAfter,omitempty" diff:"notOnOrAfter"`
	DayMonth     *string `json:"dayMonth,omitempty" diff:"dayMonth"`
	DayMonthEnd  *string `json:"dayMonthEnd,omitempty" diff:"dayMonthEnd"`
	Month        *string `json:"month,omitempty" diff:"month"`
	MonthEnd     *string `json:"monthEnd,omitempty" diff:"monthEnd"`
	Year         *string `json:"year,omitempty" diff:"year"`
	YearEnd      *string `json:"yearEnd,omitempty" diff:"yearEnd"`
	Hour         *string `json:"hour,omitempty" diff:"hour"`
	HourEnd      *string `json:"hourEnd,omitempty" diff:"hourEnd"`
	Minute       *string `json:"minute,omitempty" diff:"minute"`
	MinuteEnd    *string `json:"minuteEnd,omitempty" diff:"minuteEnd"`
}

TimePolicyRepresentation represents time based policies +kubebuilder:object:generate=true

func (*TimePolicyRepresentation) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TimePolicyRepresentation.

func (*TimePolicyRepresentation) DeepCopyInto

func (in *TimePolicyRepresentation) DeepCopyInto(out *TimePolicyRepresentation)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*TimePolicyRepresentation) String

func (v *TimePolicyRepresentation) String() string

type TokenOptions

type TokenOptions struct {
	ClientID            *string   `json:"client_id,omitempty"`
	ClientSecret        *string   `json:"-"`
	GrantType           *string   `json:"grant_type,omitempty"`
	RefreshToken        *string   `json:"refresh_token,omitempty"`
	Scopes              *[]string `json:"-"`
	Scope               *string   `json:"scope,omitempty"`
	ResponseTypes       *[]string `json:"-"`
	ResponseType        *string   `json:"response_type,omitempty"`
	Permission          *string   `json:"permission,omitempty"`
	Username            *string   `json:"username,omitempty"`
	Password            *string   `json:"password,omitempty"`
	Totp                *string   `json:"totp,omitempty"`
	Code                *string   `json:"code,omitempty"`
	RedirectURI         *string   `json:"redirect_uri,omitempty"`
	ClientAssertionType *string   `json:"client_assertion_type,omitempty"`
	ClientAssertion     *string   `json:"client_assertion,omitempty"`
	SubjectToken        *string   `json:"subject_token,omitempty"`
	RequestedSubject    *string   `json:"requested_subject,omitempty"`
	Audience            *string   `json:"audience,omitempty"`
	RequestedTokenType  *string   `json:"requested_token_type,omitempty"`
}

TokenOptions represents the options to obtain a token

func (*TokenOptions) FormData

func (t *TokenOptions) FormData() map[string]string

FormData returns a map of options to be used in SetFormData function

func (*TokenOptions) String

func (t *TokenOptions) String() string

type User

type User struct {
	ID                         *string                     `json:"id,omitempty"`
	CreatedTimestamp           *int64                      `json:"createdTimestamp,omitempty"`
	Username                   *string                     `json:"username,omitempty"`
	Enabled                    *bool                       `json:"enabled,omitempty"`
	Totp                       *bool                       `json:"totp,omitempty"`
	EmailVerified              *bool                       `json:"emailVerified,omitempty"`
	FirstName                  *string                     `json:"firstName,omitempty"`
	LastName                   *string                     `json:"lastName,omitempty"`
	Email                      *string                     `json:"email,omitempty"`
	FederationLink             *string                     `json:"federationLink,omitempty"`
	Attributes                 *map[string][]string        `json:"attributes,omitempty"`
	DisableableCredentialTypes *[]interface{}              `json:"disableableCredentialTypes,omitempty"`
	RequiredActions            *[]string                   `json:"requiredActions,omitempty"`
	Access                     *map[string]bool            `json:"access,omitempty"`
	ClientRoles                *map[string][]string        `json:"clientRoles,omitempty"`
	RealmRoles                 *[]string                   `json:"realmRoles,omitempty"`
	Groups                     *[]string                   `json:"groups,omitempty"`
	ServiceAccountClientID     *string                     `json:"serviceAccountClientId,omitempty"`
	Credentials                *[]CredentialRepresentation `json:"credentials,omitempty"`
}

User represents the Keycloak User Structure

func (*User) String

func (v *User) String() string

type UserGroup

type UserGroup struct {
	ID   *string `json:"id,omitempty"`
	Name *string `json:"name,omitempty"`
	Path *string `json:"path,omitempty"`
}

UserGroup is a UserGroup

func (*UserGroup) String

func (v *UserGroup) String() string

type UserInfo

type UserInfo struct {
	Sub                 *string          `json:"sub,omitempty"`
	Name                *string          `json:"name,omitempty"`
	GivenName           *string          `json:"given_name,omitempty"`
	FamilyName          *string          `json:"family_name,omitempty"`
	MiddleName          *string          `json:"middle_name,omitempty"`
	Nickname            *string          `json:"nickname,omitempty"`
	PreferredUsername   *string          `json:"preferred_username,omitempty"`
	Profile             *string          `json:"profile,omitempty"`
	Picture             *string          `json:"picture,omitempty"`
	Website             *string          `json:"website,omitempty"`
	Email               *string          `json:"email,omitempty"`
	EmailVerified       *bool            `json:"email_verified,omitempty"`
	Gender              *string          `json:"gender,omitempty"`
	ZoneInfo            *string          `json:"zoneinfo,omitempty"`
	Locale              *string          `json:"locale,omitempty"`
	PhoneNumber         *string          `json:"phone_number,omitempty"`
	PhoneNumberVerified *bool            `json:"phone_number_verified,omitempty"`
	Address             *UserInfoAddress `json:"address,omitempty"`
	UpdatedAt           *int             `json:"updated_at,omitempty"`
}

UserInfo is returned by the userinfo endpoint https://openid.net/specs/openid-connect-core-1_0.html#StandardClaims

func (*UserInfo) String

func (v *UserInfo) String() string

type UserInfoAddress

type UserInfoAddress struct {
	Formatted     *string `json:"formatted,omitempty"`
	StreetAddress *string `json:"street_address,omitempty"`
	Locality      *string `json:"locality,omitempty"`
	Region        *string `json:"region,omitempty"`
	PostalCode    *string `json:"postal_code,omitempty"`
	Country       *string `json:"country,omitempty"`
}

UserInfoAddress is representation of the address sub-filed of UserInfo https://openid.net/specs/openid-connect-core-1_0.html#AddressClaim

func (*UserInfoAddress) String

func (v *UserInfoAddress) String() string

type UserPolicyRepresentation

type UserPolicyRepresentation struct {
	Users *[]string `json:"users,omitempty" diff:"users"`
}

UserPolicyRepresentation represents user based policies +kubebuilder:object:generate=true

func (*UserPolicyRepresentation) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserPolicyRepresentation.

func (*UserPolicyRepresentation) DeepCopyInto

func (in *UserPolicyRepresentation) DeepCopyInto(out *UserPolicyRepresentation)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*UserPolicyRepresentation) String

func (v *UserPolicyRepresentation) String() string

type UserSessionRepresentation

type UserSessionRepresentation struct {
	Clients    *map[string]string `json:"clients,omitempty"`
	ID         *string            `json:"id,omitempty"`
	IPAddress  *string            `json:"ipAddress,omitempty"`
	LastAccess *int64             `json:"lastAccess,omitempty"`
	Start      *int64             `json:"start,omitempty"`
	UserID     *string            `json:"userId,omitempty"`
	Username   *string            `json:"username,omitempty"`
}

UserSessionRepresentation represents a list of user's sessions

func (*UserSessionRepresentation) String

func (v *UserSessionRepresentation) String() string

Directories

Path Synopsis
pkg
jwx

Jump to

Keyboard shortcuts

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