Documentation
¶
Overview ¶
package gokeycloak is a golang keycloak adaptor.
Index ¶
- Variables
- func BoolP(value bool) *bool
- func Float32P(value float32) *float32
- func Float64P(value float64) *float64
- func GetQueryParams(s interface{}) (map[string]string, error)
- func Int32P(value int32) *int32
- func Int64P(value int64) *int64
- func IntP(value int) *int
- func NilOrEmpty(value *string) bool
- func NilOrEmptyArray(value *[]string) bool
- func NilOrEmptySlice(value *[]string) bool
- func PBool(value *bool) bool
- func PFloat32(value *float32) float32
- func PFloat64(value *float64) float64
- func PInt(value *int) int
- func PInt32(value *int32) int32
- func PInt64(value *int64) int64
- func PString(value *string) string
- func PStringSlice(value *[]string) []string
- func SetAuthAdminRealms(url string) func(g *GoKeycloak)
- func SetAuthRealms(url string) func(g *GoKeycloak)
- func SetCertCacheInvalidationTime(duration time.Duration) func(g *GoKeycloak)
- func SetLegacyWildFlySupport() func(g *GoKeycloak)
- func SetOpenIDConnectEndpoint(url string) func(g *GoKeycloak)
- func StringP(value string) *string
- func UserAttributeContains(attributes map[string][]string, attribute, value string) bool
- func WithTracer(ctx context.Context, tracer opentracing.Tracer) context.Context
- type APIErrType
- type APIError
- type Access
- type AccessRepresentation
- type ActiveKeys
- type AdapterConfiguration
- type AggregatedPolicyRepresentation
- type Attributes
- type AuthenticationExecutionRepresentation
- type AuthenticationFlowRepresentation
- type AuthorizationParameters
- type AuthorizationResponse
- type BruteForceStatus
- type BuiltinProtocolMappers
- type CertResponse
- type CertResponseKey
- type Client
- type ClientInitialAccessTokenRequest
- type ClientInitialAccessTokenResponse
- type ClientMappingsRepresentation
- type ClientPolicyRepresentation
- type ClientScope
- type ClientScopeAttributes
- type Component
- type CompositesRepresentation
- type CreateAuthenticationExecutionFlowRepresentation
- type CreateAuthenticationExecutionRepresentation
- type CreateClientRequest
- type CreateClientResponse
- type CreatePermissionTicketParams
- type CredentialRepresentation
- type DecisionStrategy
- type EnforcedString
- type EventRepresentation
- type ExecuteActionsEmail
- type FederatedIdentityRepresentation
- type GetClientsParams
- type GetComponentsParams
- type GetEventsParams
- type GetGroupsParams
- type GetPermissionParams
- type GetPolicyParams
- type GetResourceParams
- type GetResourcePoliciesParams
- type GetRoleParams
- type GetScopeParams
- type GetUserPermissionParams
- type GetUsersByRoleParams
- type GetUsersParams
- type GoKeycloak
- func (g *GoKeycloak) AddClientRoleComposite(ctx context.Context, token, realm, roleID string, roles []Role) (int, error)
- func (g *GoKeycloak) AddClientRoleToGroup(ctx context.Context, token, realm, idOfClient, groupID string, roles []Role) (int, error)deprecated
- func (g *GoKeycloak) AddClientRoleToUser(ctx context.Context, token, realm, idOfClient, userID string, roles []Role) (int, error)deprecated
- func (g *GoKeycloak) AddClientRolesToGroup(ctx context.Context, token, realm, idOfClient, groupID string, roles []Role) (int, error)
- func (g *GoKeycloak) AddClientRolesToUser(ctx context.Context, token, realm, idOfClient, userID string, roles []Role) (int, error)
- func (g *GoKeycloak) AddDefaultGroup(ctx context.Context, token, realm, groupID string) error
- func (g *GoKeycloak) AddDefaultScopeToClient(ctx context.Context, token, realm, idOfClient, scopeID string) (int, error)
- func (g *GoKeycloak) AddOptionalScopeToClient(ctx context.Context, token, realm, idOfClient, scopeID string) (int, error)
- func (g *GoKeycloak) AddRealmRoleComposite(ctx context.Context, token, realm, roleName string, roles []Role) (int, error)
- func (g *GoKeycloak) AddRealmRoleToGroup(ctx context.Context, token, realm, groupID string, roles []Role) (int, error)
- func (g *GoKeycloak) AddRealmRoleToUser(ctx context.Context, token, realm, userID string, roles []Role) (int, error)
- func (g *GoKeycloak) AddUserToGroup(ctx context.Context, token, realm, userID, groupID string) (int, error)
- func (g *GoKeycloak) ClearKeysCache(ctx context.Context, token, realm string) (int, error)
- func (g *GoKeycloak) ClearRealmCache(ctx context.Context, token, realm string) (int, error)
- func (g *GoKeycloak) ClearUserCache(ctx context.Context, token, realm string) (int, error)
- func (g *GoKeycloak) CreateAuthenticationExecution(ctx context.Context, token, realm, flow string, ...) (int, error)
- func (g *GoKeycloak) CreateAuthenticationExecutionFlow(ctx context.Context, token, realm, flow string, ...) (int, error)
- func (g *GoKeycloak) CreateAuthenticationFlow(ctx context.Context, token, realm string, ...) (int, error)
- func (g *GoKeycloak) CreateChildGroup(ctx context.Context, token, realm, groupID string, group Group) (int, string, error)
- func (g *GoKeycloak) CreateClient(ctx context.Context, clientInitialAccessToken, realm string, ...) (int, CreateClientResponse, error)
- func (g *GoKeycloak) CreateClientProtocolMapper(ctx context.Context, token, realm, idOfClient string, ...) (int, string, error)
- func (g *GoKeycloak) CreateClientRepresentation(ctx context.Context, token, realm string, newClient Client) (int, *Client, error)
- func (g *GoKeycloak) CreateClientRole(ctx context.Context, token, realm, idOfClient string, role Role) (int, string, error)
- func (g *GoKeycloak) CreateClientScope(ctx context.Context, token, realm string, scope ClientScope) (int, string, error)
- func (g *GoKeycloak) CreateClientScopeMappingsClientRoles(ctx context.Context, token, realm, idOfClient, idOfSelectedClient string, ...) (int, error)
- func (g *GoKeycloak) CreateClientScopeMappingsRealmRoles(ctx context.Context, token, realm, idOfClient string, roles []Role) (int, error)
- func (g *GoKeycloak) CreateClientScopeProtocolMapper(ctx context.Context, token, realm, scopeID string, ...) (int, string, error)
- func (g *GoKeycloak) CreateClientScopesScopeMappingsClientRoles(ctx context.Context, token, realm, idOfClientScope, idOfClient string, ...) (int, error)
- func (g *GoKeycloak) CreateClientScopesScopeMappingsRealmRoles(ctx context.Context, token, realm, clientScopeID string, roles []Role) (int, error)
- func (g *GoKeycloak) CreateComponent(ctx context.Context, token, realm string, component Component) (int, string, error)
- func (g *GoKeycloak) CreateGroup(ctx context.Context, token, realm string, group Group) (int, string, error)
- func (g *GoKeycloak) CreateIdentityProvider(ctx context.Context, token string, realm string, ...) (int, string, error)
- func (g *GoKeycloak) CreateIdentityProviderMapper(ctx context.Context, token, realm, alias string, mapper IdentityProviderMapper) (int, string, error)
- func (g *GoKeycloak) CreatePermission(ctx context.Context, token, realm, idOfClient string, ...) (*PermissionRepresentation, error)
- func (g *GoKeycloak) CreatePermissionTicket(ctx context.Context, token, realm string, ...) (*PermissionTicketResponseRepresentation, error)
- func (g *GoKeycloak) CreatePolicy(ctx context.Context, token, realm, idOfClient string, ...) (*PolicyRepresentation, error)
- func (g *GoKeycloak) CreateRealm(ctx context.Context, token string, realm RealmRepresentation) (int, string, error)
- func (g *GoKeycloak) CreateRealmRole(ctx context.Context, token string, realm string, role Role) (int, string, error)
- func (g *GoKeycloak) CreateResource(ctx context.Context, token, realm string, idOfClient string, ...) (int, *ResourceRepresentation, error)
- func (g *GoKeycloak) CreateResourceClient(ctx context.Context, token, realm string, resource ResourceRepresentation) (int, *ResourceRepresentation, error)
- func (g *GoKeycloak) CreateResourcePolicy(ctx context.Context, token, realm, resourceID string, ...) (*ResourcePolicyRepresentation, error)
- func (g *GoKeycloak) CreateScope(ctx context.Context, token, realm, idOfClient string, ...) (int, *ScopeRepresentation, error)
- func (g *GoKeycloak) CreateUser(ctx context.Context, token, realm string, user User) (int, string, error)
- func (g *GoKeycloak) CreateUserFederatedIdentity(ctx context.Context, token, realm, userID, providerID string, ...) (int, error)
- func (g *GoKeycloak) DecodeAccessToken(ctx context.Context, accessToken, realm string) (int, *jwt.Token, *jwt.MapClaims, error)
- func (g *GoKeycloak) DecodeAccessTokenCustomClaims(ctx context.Context, accessToken, realm string, claims jwt.Claims) (int, *jwt.Token, error)
- func (g *GoKeycloak) DeleteAuthenticationExecution(ctx context.Context, token, realm, executionID string) (int, error)
- func (g *GoKeycloak) DeleteAuthenticationFlow(ctx context.Context, token, realm, flowID string) (int, error)
- func (g *GoKeycloak) DeleteClient(ctx context.Context, token, realm, idOfClient string) (int, error)
- func (g *GoKeycloak) DeleteClientProtocolMapper(ctx context.Context, token, realm, idOfClient, mapperID string) (int, error)
- func (g *GoKeycloak) DeleteClientRepresentation(ctx context.Context, accessToken, realm, clientID string) (int, error)
- func (g *GoKeycloak) DeleteClientRole(ctx context.Context, token, realm, idOfClient, roleName string) (int, error)
- func (g *GoKeycloak) DeleteClientRoleComposite(ctx context.Context, token, realm, roleID string, roles []Role) (int, error)
- func (g *GoKeycloak) DeleteClientRoleFromGroup(ctx context.Context, token, realm, idOfClient, groupID string, roles []Role) (int, error)
- func (g *GoKeycloak) DeleteClientRoleFromUser(ctx context.Context, token, realm, idOfClient, userID string, roles []Role) (int, error)deprecated
- func (g *GoKeycloak) DeleteClientRolesFromUser(ctx context.Context, token, realm, idOfClient, userID string, roles []Role) (int, error)
- func (g *GoKeycloak) DeleteClientScope(ctx context.Context, token, realm, scopeID string) (int, error)
- func (g *GoKeycloak) DeleteClientScopeMappingsClientRoles(ctx context.Context, token, realm, idOfClient, idOfSelectedClient string, ...) (int, error)
- func (g *GoKeycloak) DeleteClientScopeMappingsRealmRoles(ctx context.Context, token, realm, idOfClient string, roles []Role) (int, error)
- func (g *GoKeycloak) DeleteClientScopeProtocolMapper(ctx context.Context, token, realm, scopeID, protocolMapperID string) (int, error)
- func (g *GoKeycloak) DeleteClientScopesScopeMappingsClientRoles(ctx context.Context, token, realm, idOfClientScope, idOfClient string, ...) (int, error)
- func (g *GoKeycloak) DeleteClientScopesScopeMappingsRealmRoles(ctx context.Context, token, realm, clientScopeID string, roles []Role) (int, error)
- func (g *GoKeycloak) DeleteComponent(ctx context.Context, token, realm, componentID string) (int, error)
- func (g *GoKeycloak) DeleteCredentials(ctx context.Context, token, realm, userID, credentialID string) error
- func (g *GoKeycloak) DeleteGroup(ctx context.Context, token, realm, groupID string) (int, error)
- func (g *GoKeycloak) DeleteIdentityProvider(ctx context.Context, token, realm, alias string) (int, error)
- func (g *GoKeycloak) DeleteIdentityProviderMapper(ctx context.Context, token, realm, alias, mapperID string) (int, error)
- func (g *GoKeycloak) DeletePermission(ctx context.Context, token, realm, idOfClient, permissionID string) error
- func (g *GoKeycloak) DeletePolicy(ctx context.Context, token, realm, idOfClient, policyID string) error
- func (g *GoKeycloak) DeleteRealm(ctx context.Context, token, realm string) (int, error)
- func (g *GoKeycloak) DeleteRealmRole(ctx context.Context, token, realm, roleName string) (int, error)
- func (g *GoKeycloak) DeleteRealmRoleComposite(ctx context.Context, token, realm, roleName string, roles []Role) (int, error)
- func (g *GoKeycloak) DeleteRealmRoleFromGroup(ctx context.Context, token, realm, groupID string, roles []Role) (int, error)
- func (g *GoKeycloak) DeleteRealmRoleFromUser(ctx context.Context, token, realm, userID string, roles []Role) (int, error)
- func (g *GoKeycloak) DeleteRequiredAction(ctx context.Context, token string, realm string, alias string) (int, error)
- func (g *GoKeycloak) DeleteResource(ctx context.Context, token, realm, idOfClient, resourceID string) (int, error)
- func (g *GoKeycloak) DeleteResourceClient(ctx context.Context, token, realm, resourceID string) (int, error)
- func (g *GoKeycloak) DeleteResourcePolicy(ctx context.Context, token, realm, permissionID string) error
- func (g *GoKeycloak) DeleteScope(ctx context.Context, token, realm, idOfClient, scopeID string) (int, error)
- func (g *GoKeycloak) DeleteUser(ctx context.Context, token, realm, userID string) (int, error)
- func (g *GoKeycloak) DeleteUserFederatedIdentity(ctx context.Context, token, realm, userID, providerID string) (int, error)
- func (g *GoKeycloak) DeleteUserFromGroup(ctx context.Context, token, realm, userID, groupID string) (int, error)
- func (g *GoKeycloak) DeleteUserPermission(ctx context.Context, token, realm, ticketID string) error
- func (g *GoKeycloak) DisableAllCredentialsByType(ctx context.Context, token, realm, userID string, types []string) error
- func (g *GoKeycloak) EvaluatePermission(ctx context.Context, userToken, realm, audience, response_mode string, ...) (int, *JWT, error)
- func (g *GoKeycloak) ExecuteActionsEmail(ctx context.Context, token, realm string, params ExecuteActionsEmail) (int, error)
- func (g *GoKeycloak) ExportIDPPublicBrokerConfig(ctx context.Context, token, realm, alias string) (int, *string, error)
- func (g *GoKeycloak) GenerateClientInitialAccessToken(ctx context.Context, realm string, adminAccessToken string, ...) (int, ClientInitialAccessTokenResponse, error)
- func (g *GoKeycloak) GetAdapterConfiguration(ctx context.Context, accessToken, realm, clientID string) (int, *AdapterConfiguration, error)
- func (g *GoKeycloak) GetAllRealmsInfo(ctx context.Context, adminAccessToken string) (int, []*ServerInfoRepresentation, error)
- func (g *GoKeycloak) GetAuthenticationExecutions(ctx context.Context, token, realm, flow string) (int, []*ModifyAuthenticationExecutionRepresentation, error)
- func (g *GoKeycloak) GetAuthenticationFlow(ctx context.Context, token, realm string, authenticationFlowID string) (int, *AuthenticationFlowRepresentation, error)
- func (g *GoKeycloak) GetAuthenticationFlows(ctx context.Context, token, realm string) (int, []*AuthenticationFlowRepresentation, error)
- func (g *GoKeycloak) GetAuthorizationPolicyAssociatedPolicies(ctx context.Context, token, realm, idOfClient, policyID string) ([]*PolicyRepresentation, error)
- func (g *GoKeycloak) GetAuthorizationPolicyResources(ctx context.Context, token, realm, idOfClient, policyID string) ([]*PolicyResourceRepresentation, error)
- func (g *GoKeycloak) GetAuthorizationPolicyScopes(ctx context.Context, token, realm, idOfClient, policyID string) ([]*PolicyScopeRepresentation, error)
- func (g *GoKeycloak) GetAvailableClientRolesByGroupID(ctx context.Context, token, realm, idOfClient, groupID string) (int, []*Role, error)
- func (g *GoKeycloak) GetAvailableClientRolesByUserID(ctx context.Context, token, realm, idOfClient, userID string) (int, []*Role, error)
- func (g *GoKeycloak) GetAvailableRealmRolesByGroupID(ctx context.Context, token, realm, groupID string) (int, []*Role, error)
- func (g *GoKeycloak) GetAvailableRealmRolesByUserID(ctx context.Context, token, realm, userID string) (int, []*Role, error)
- func (g *GoKeycloak) GetCerts(ctx context.Context, realm string) (int, *CertResponse, error)
- func (g *GoKeycloak) GetClient(ctx context.Context, token, realm, idOfClient string) (int, *Client, error)
- func (g *GoKeycloak) GetClientOfflineSessions(ctx context.Context, token, realm, idOfClient string) (int, []*UserSessionRepresentation, error)
- func (g *GoKeycloak) GetClientRepresentation(ctx context.Context, accessToken, realm, clientID string) (int, *Client, error)
- func (g *GoKeycloak) GetClientRole(ctx context.Context, token, realm, idOfClient, roleName string) (int, *Role, error)
- func (g *GoKeycloak) GetClientRoleByID(ctx context.Context, token, realm, roleID string) (int, *Role, error)
- func (g *GoKeycloak) GetClientRoles(ctx context.Context, token, realm, idOfClient string, params GetRoleParams) (int, []*Role, error)
- func (g *GoKeycloak) GetClientRolesByGroupID(ctx context.Context, token, realm, idOfClient, groupID string) (int, []*Role, error)
- func (g *GoKeycloak) GetClientRolesByUserID(ctx context.Context, token, realm, idOfClient, userID string) (int, []*Role, error)
- func (g *GoKeycloak) GetClientScope(ctx context.Context, token, realm, scopeID string) (int, *ClientScope, error)
- func (g *GoKeycloak) GetClientScopeMappings(ctx context.Context, token, realm, idOfClient string) (int, *MappingsRepresentation, error)
- func (g *GoKeycloak) GetClientScopeMappingsClientRoles(ctx context.Context, token, realm, idOfClient, idOfSelectedClient string) (int, []*Role, error)
- func (g *GoKeycloak) GetClientScopeMappingsClientRolesAvailable(ctx context.Context, token, realm, idOfClient, idOfSelectedClient string) (int, []*Role, error)
- func (g *GoKeycloak) GetClientScopeMappingsRealmRoles(ctx context.Context, token, realm, idOfClient string) (int, []*Role, error)
- func (g *GoKeycloak) GetClientScopeMappingsRealmRolesAvailable(ctx context.Context, token, realm, idOfClient string) (int, []*Role, error)
- func (g *GoKeycloak) GetClientScopeProtocolMapper(ctx context.Context, token, realm, scopeID, protocolMapperID string) (int, *ProtocolMappers, error)
- func (g *GoKeycloak) GetClientScopeProtocolMappers(ctx context.Context, token, realm, scopeID string) (int, []*ProtocolMappers, error)
- func (g *GoKeycloak) GetClientScopes(ctx context.Context, token, realm string) (int, []*ClientScope, error)
- func (g *GoKeycloak) GetClientScopesScopeMappingsClientRoles(ctx context.Context, token, realm, idOfClientScope, idOfClient string) (int, []*Role, error)
- func (g *GoKeycloak) GetClientScopesScopeMappingsClientRolesAvailable(ctx context.Context, token, realm, idOfClientScope, idOfClient string) (int, []*Role, error)
- func (g *GoKeycloak) GetClientScopesScopeMappingsRealmRoles(ctx context.Context, token, realm, clientScopeID string) (int, []*Role, error)
- func (g *GoKeycloak) GetClientScopesScopeMappingsRealmRolesAvailable(ctx context.Context, token, realm, clientScopeID string) (int, []*Role, error)
- func (g *GoKeycloak) GetClientSecret(ctx context.Context, token, realm, idOfClient string) (int, *CredentialRepresentation, error)
- func (g *GoKeycloak) GetClientServiceAccount(ctx context.Context, token, realm, idOfClient string) (int, *User, error)
- func (g *GoKeycloak) GetClientUserSessions(ctx context.Context, token, realm, idOfClient string) (int, []*UserSessionRepresentation, error)
- func (g *GoKeycloak) GetClients(ctx context.Context, token, realm string, params GetClientsParams) (int, []*Client, error)
- func (g *GoKeycloak) GetClientsDefaultScopes(ctx context.Context, token, realm, idOfClient string) (int, []*ClientScope, error)
- func (g *GoKeycloak) GetClientsOptionalScopes(ctx context.Context, token, realm, idOfClient string) (int, []*ClientScope, error)
- func (g *GoKeycloak) GetComponent(ctx context.Context, token, realm string, componentID string) (*Component, error)
- func (g *GoKeycloak) GetComponents(ctx context.Context, token, realm string) ([]*Component, error)
- func (g *GoKeycloak) GetComponentsWithParams(ctx context.Context, token, realm string, params GetComponentsParams) ([]*Component, error)
- func (g *GoKeycloak) GetCompositeClientRolesByGroupID(ctx context.Context, token, realm, idOfClient, groupID string) (int, []*Role, error)
- func (g *GoKeycloak) GetCompositeClientRolesByRoleID(ctx context.Context, token, realm, idOfClient, roleID string) (int, []*Role, error)
- func (g *GoKeycloak) GetCompositeClientRolesByUserID(ctx context.Context, token, realm, idOfClient, userID string) (int, []*Role, error)
- func (g *GoKeycloak) GetCompositeRealmRoles(ctx context.Context, token, realm, roleName string) (int, []*Role, error)
- func (g *GoKeycloak) GetCompositeRealmRolesByGroupID(ctx context.Context, token, realm, groupID string) (int, []*Role, error)
- func (g *GoKeycloak) GetCompositeRealmRolesByRoleID(ctx context.Context, token, realm, roleID string) (int, []*Role, error)
- func (g *GoKeycloak) GetCompositeRealmRolesByUserID(ctx context.Context, token, realm, userID string) (int, []*Role, error)
- func (g *GoKeycloak) GetCompositeRolesByRoleID(ctx context.Context, token, realm, roleID string) (int, []*Role, error)
- func (g *GoKeycloak) GetConfiguredUserStorageCredentialTypes(ctx context.Context, token, realm, userID string) ([]string, error)
- func (g *GoKeycloak) GetCredentialRegistrators(ctx context.Context, token, realm string) ([]string, error)
- func (g *GoKeycloak) GetCredentials(ctx context.Context, token, realm, userID string) ([]*CredentialRepresentation, error)
- func (g *GoKeycloak) GetDefaultDefaultClientScopes(ctx context.Context, token, realm string) (int, []*ClientScope, error)
- func (g *GoKeycloak) GetDefaultGroups(ctx context.Context, token, realm string) ([]*Group, error)
- func (g *GoKeycloak) GetDefaultOptionalClientScopes(ctx context.Context, token, realm string) (int, []*ClientScope, error)
- func (g *GoKeycloak) GetDependentPermissions(ctx context.Context, token, realm, idOfClient, policyID string) ([]*PermissionRepresentation, error)
- func (g *GoKeycloak) GetEvents(ctx context.Context, token string, realm string, params GetEventsParams) ([]*EventRepresentation, error)
- func (g *GoKeycloak) GetGroup(ctx context.Context, token, realm, groupID string) (int, *Group, error)
- func (g *GoKeycloak) GetGroupByPath(ctx context.Context, token, realm, groupPath string) (int, *Group, error)
- func (g *GoKeycloak) GetGroupMembers(ctx context.Context, token, realm, groupID string, params GetGroupsParams) (int, []*User, error)
- func (g *GoKeycloak) GetGroups(ctx context.Context, token, realm string, params GetGroupsParams) (int, []*Group, error)
- func (g *GoKeycloak) GetGroupsByClientRole(ctx context.Context, token, realm string, roleName string, clientID string) (int, []*Group, error)
- func (g *GoKeycloak) GetGroupsByRole(ctx context.Context, token, realm string, roleName string) (int, []*Group, error)
- func (g *GoKeycloak) GetGroupsCount(ctx context.Context, token, realm string, params GetGroupsParams) (int, int, error)
- func (g *GoKeycloak) GetIdentityProvider(ctx context.Context, token, realm, alias string) (int, *IdentityProviderRepresentation, error)
- func (g *GoKeycloak) GetIdentityProviderMapper(ctx context.Context, token string, realm string, alias string, mapperID string) (int, *IdentityProviderMapper, error)
- func (g *GoKeycloak) GetIdentityProviderMapperByID(ctx context.Context, token, realm, alias, mapperID string) (int, *IdentityProviderMapper, error)
- func (g *GoKeycloak) GetIdentityProviderMappers(ctx context.Context, token, realm, alias string) (int, []*IdentityProviderMapper, error)
- func (g *GoKeycloak) GetIdentityProviders(ctx context.Context, token, realm string) (int, []*IdentityProviderRepresentation, error)
- func (g *GoKeycloak) GetIssuer(ctx context.Context, realm string) (int, *IssuerResponse, error)
- func (g *GoKeycloak) GetKeyStoreConfig(ctx context.Context, token, realm string) (int, *KeyStoreConfig, error)
- func (g *GoKeycloak) GetPermission(ctx context.Context, token, realm, idOfClient, permissionID string) (*PermissionRepresentation, error)
- func (g *GoKeycloak) GetPermissionResources(ctx context.Context, token, realm, idOfClient, permissionID string) ([]*PermissionResource, error)
- func (g *GoKeycloak) GetPermissionScopes(ctx context.Context, token, realm, idOfClient, permissionID string) ([]*PermissionScope, error)
- func (g *GoKeycloak) GetPermissions(ctx context.Context, token, realm, idOfClient string, ...) ([]*PermissionRepresentation, error)
- func (g *GoKeycloak) GetPolicies(ctx context.Context, token, realm, idOfClient string, params GetPolicyParams) ([]*PolicyRepresentation, error)
- func (g *GoKeycloak) GetPolicy(ctx context.Context, token, realm, idOfClient, policyID string) (*PolicyRepresentation, error)
- func (g *GoKeycloak) GetRawUserInfo(ctx context.Context, accessToken, realm string) (int, map[string]interface{}, error)
- func (g *GoKeycloak) GetRealm(ctx context.Context, token, realm string) (int, *RealmRepresentation, error)
- func (g *GoKeycloak) GetRealmRole(ctx context.Context, token, realm, roleName string) (int, *Role, error)
- func (g *GoKeycloak) GetRealmRoleByID(ctx context.Context, token, realm, roleID string) (int, *Role, error)
- func (g *GoKeycloak) GetRealmRoles(ctx context.Context, token, realm string, params GetRoleParams) (int, []*Role, error)
- func (g *GoKeycloak) GetRealmRolesByGroupID(ctx context.Context, token, realm, groupID string) (int, []*Role, error)
- func (g *GoKeycloak) GetRealmRolesByUserID(ctx context.Context, token, realm, userID string) (int, []*Role, error)
- func (g *GoKeycloak) GetRealms(ctx context.Context, token string) (int, []*RealmRepresentation, error)
- func (g *GoKeycloak) GetRequest(ctx context.Context) *resty.Request
- func (g *GoKeycloak) GetRequestWithBasicAuth(ctx context.Context, clientID, clientSecret string) *resty.Request
- func (g *GoKeycloak) GetRequestWithBearerAuth(ctx context.Context, token string) *resty.Request
- func (g *GoKeycloak) GetRequestWithBearerAuthNoCache(ctx context.Context, token string) *resty.Request
- func (g *GoKeycloak) GetRequestWithBearerAuthXMLHeader(ctx context.Context, token string) *resty.Request
- func (g *GoKeycloak) GetRequestingPartyPermissionDecision(ctx context.Context, token, realm string, options RequestingPartyTokenOptions) (int, *RequestingPartyPermissionDecision, error)
- func (g *GoKeycloak) GetRequestingPartyPermissions(ctx context.Context, token, realm string, options RequestingPartyTokenOptions) (int, *[]RequestingPartyPermission, error)
- func (g *GoKeycloak) GetRequestingPartyToken(ctx context.Context, token, realm string, options RequestingPartyTokenOptions) (int, *JWT, error)
- func (g *GoKeycloak) GetRequiredAction(ctx context.Context, token string, realm string, alias string) (int, *RequiredActionProviderRepresentation, error)
- func (g *GoKeycloak) GetRequiredActions(ctx context.Context, token string, realm string) (int, []*RequiredActionProviderRepresentation, error)
- func (g *GoKeycloak) GetResource(ctx context.Context, token, realm, idOfClient, resourceID string) (int, *ResourceRepresentation, error)
- func (g *GoKeycloak) GetResourceClient(ctx context.Context, token, realm, resourceID string) (int, *ResourceRepresentation, error)
- func (g *GoKeycloak) GetResourcePolicies(ctx context.Context, token, realm string, params GetResourcePoliciesParams) ([]*ResourcePolicyRepresentation, error)
- func (g *GoKeycloak) GetResourcePolicy(ctx context.Context, token, realm, permissionID string) (*ResourcePolicyRepresentation, error)
- func (g *GoKeycloak) GetResources(ctx context.Context, token, realm, idOfClient string, params GetResourceParams) (int, []*ResourceRepresentation, error)
- func (g *GoKeycloak) GetResourcesClient(ctx context.Context, token, realm string, params GetResourceParams) (int, []*ResourceRepresentation, error)
- func (g *GoKeycloak) GetRoleMappingByGroupID(ctx context.Context, token, realm, groupID string) (int, *MappingsRepresentation, error)
- func (g *GoKeycloak) GetRoleMappingByUserID(ctx context.Context, token, realm, userID string) (int, *MappingsRepresentation, error)
- func (g *GoKeycloak) GetScope(ctx context.Context, token, realm, idOfClient, scopeID string) (int, *ScopeRepresentation, error)
- func (g *GoKeycloak) GetScopes(ctx context.Context, token, realm, idOfClient string, params GetScopeParams) (int, []*ScopeRepresentation, error)
- func (g *GoKeycloak) GetToken(ctx context.Context, realm string, options TokenOptions) (int, *JWT, error)
- func (g *GoKeycloak) GetUserBruteForceDetectionStatus(ctx context.Context, accessToken, realm, userID string) (*BruteForceStatus, error)
- func (g *GoKeycloak) GetUserByID(ctx context.Context, accessToken, realm, userID string) (int, *User, error)
- func (g *GoKeycloak) GetUserCount(ctx context.Context, token string, realm string, params GetUsersParams) (int, int, error)
- func (g *GoKeycloak) GetUserFederatedIdentities(ctx context.Context, token, realm, userID string) (int, []*FederatedIdentityRepresentation, error)
- func (g *GoKeycloak) GetUserGroups(ctx context.Context, token, realm, userID string, params GetGroupsParams) (int, []*Group, error)
- func (g *GoKeycloak) GetUserInfo(ctx context.Context, accessToken, realm string) (int, *UserInfo, error)
- func (g *GoKeycloak) GetUserOfflineSessionsForClient(ctx context.Context, token, realm, userID, idOfClient string) (int, []*UserSessionRepresentation, error)
- func (g *GoKeycloak) GetUserPermissions(ctx context.Context, token, realm string, params GetUserPermissionParams) ([]*PermissionGrantResponseRepresentation, error)
- func (g *GoKeycloak) GetUserSessions(ctx context.Context, token, realm, userID string) (int, []*UserSessionRepresentation, error)
- func (g *GoKeycloak) GetUsers(ctx context.Context, token, realm string, params GetUsersParams) (int, []*User, error)
- func (g *GoKeycloak) GetUsersByClientRoleName(ctx context.Context, token, realm, idOfClient, roleName string, ...) (int, []*User, error)
- func (g *GoKeycloak) GetUsersByRoleName(ctx context.Context, token, realm, roleName string, ...) (int, []*User, error)
- func (g *GoKeycloak) GrantUserPermission(ctx context.Context, token, realm string, permission PermissionGrantParams) (*PermissionGrantResponseRepresentation, error)
- func (g *GoKeycloak) ImportIdentityProviderConfig(ctx context.Context, token, realm, fromURL, providerID string) (int, map[string]string, error)
- func (g *GoKeycloak) ImportIdentityProviderConfigFromFile(ctx context.Context, token, realm, providerID, fileName string, ...) (int, map[string]string, error)
- func (g *GoKeycloak) IntrospectToken(ctx context.Context, accessToken, clientID, clientSecret, realm string) (int, *IntroSpectTokenResult, error)
- func (g *GoKeycloak) Login(ctx context.Context, clientID, clientSecret, realm, username, password string) (int, *JWT, error)
- func (g *GoKeycloak) LoginAdmin(ctx context.Context, username, password, realm string) (int, *JWT, error)
- func (g *GoKeycloak) LoginClient(ctx context.Context, clientID, clientSecret, realm string) (int, *JWT, error)
- func (g *GoKeycloak) LoginClientSignedJWT(ctx context.Context, clientID, realm string, key interface{}, ...) (int, *JWT, error)
- func (g *GoKeycloak) LoginClientTokenExchange(ctx context.Context, ...) (int, *JWT, error)
- func (g *GoKeycloak) LoginOtp(ctx context.Context, ...) (int, *JWT, error)
- func (g *GoKeycloak) Logout(ctx context.Context, clientID, clientSecret, realm, refreshToken string) (int, error)
- func (g *GoKeycloak) LogoutAllSessions(ctx context.Context, adminAccessToken, realm, userID string) (int, error)
- func (g *GoKeycloak) LogoutPublicClient(ctx context.Context, clientID, realm, accessToken, refreshToken string) (int, error)
- func (g *GoKeycloak) LogoutUserSession(ctx context.Context, accessToken, realm, session string) (int, error)
- func (g *GoKeycloak) MoveCredentialBehind(ctx context.Context, ...) error
- func (g *GoKeycloak) MoveCredentialToFirst(ctx context.Context, token, realm, userID, credentialID string) error
- func (g *GoKeycloak) RefreshToken(ctx context.Context, refreshToken, clientID, clientSecret, realm string) (int, *JWT, error)
- func (g *GoKeycloak) RegenerateClientSecret(ctx context.Context, token, realm, idOfClient string) (int, *CredentialRepresentation, error)
- func (g *GoKeycloak) RegisterRequiredAction(ctx context.Context, token string, realm string, ...) (int, error)
- func (g *GoKeycloak) RemoveDefaultGroup(ctx context.Context, token, realm, groupID string) error
- func (g *GoKeycloak) RemoveDefaultScopeFromClient(ctx context.Context, token, realm, idOfClient, scopeID string) (int, error)
- func (g *GoKeycloak) RemoveOptionalScopeFromClient(ctx context.Context, token, realm, idOfClient, scopeID string) (int, error)
- func (g *GoKeycloak) RestyClient() *resty.Client
- func (g *GoKeycloak) RevokeToken(ctx context.Context, realm, clientID, clientSecret, refreshToken string) (int, error)
- func (g *GoKeycloak) RevokeUserConsents(ctx context.Context, accessToken, realm, userID, clientID string) (int, error)
- func (g *GoKeycloak) SendVerifyEmail(ctx context.Context, token, userID, realm string, ...) (int, error)
- func (g *GoKeycloak) SetPassword(ctx context.Context, token, userID, realm, password string, temporary bool) (int, error)
- func (g *GoKeycloak) SetRestyClient(restyClient *resty.Client)
- func (g *GoKeycloak) UpdateAuthenticationExecution(ctx context.Context, token, realm, flow string, ...) (int, error)
- func (g *GoKeycloak) UpdateAuthenticationFlow(ctx context.Context, token, realm string, ...) (int, *AuthenticationFlowRepresentation, error)
- func (g *GoKeycloak) UpdateClient(ctx context.Context, token, realm string, updatedClient Client) (int, error)
- func (g *GoKeycloak) UpdateClientProtocolMapper(ctx context.Context, token, realm, idOfClient, mapperID string, ...) (int, error)
- func (g *GoKeycloak) UpdateClientRepresentation(ctx context.Context, accessToken, realm string, updatedClient Client) (int, *Client, error)
- func (g *GoKeycloak) UpdateClientScope(ctx context.Context, token, realm string, scope ClientScope) (int, error)
- func (g *GoKeycloak) UpdateClientScopeProtocolMapper(ctx context.Context, token, realm, scopeID string, ...) (int, error)
- func (g *GoKeycloak) UpdateComponent(ctx context.Context, token, realm string, component Component) error
- func (g *GoKeycloak) UpdateCredentialUserLabel(ctx context.Context, token, realm, userID, credentialID, userLabel string) error
- func (g *GoKeycloak) UpdateGroup(ctx context.Context, token, realm string, updatedGroup Group) (int, error)
- func (g *GoKeycloak) UpdateIdentityProvider(ctx context.Context, token, realm, alias string, ...) (int, error)
- func (g *GoKeycloak) UpdateIdentityProviderMapper(ctx context.Context, token, realm, alias string, mapper IdentityProviderMapper) (int, error)
- func (g *GoKeycloak) UpdatePermission(ctx context.Context, token, realm, idOfClient string, ...) error
- func (g *GoKeycloak) UpdatePolicy(ctx context.Context, token, realm, idOfClient string, ...) error
- func (g *GoKeycloak) UpdateRealm(ctx context.Context, token string, realm RealmRepresentation) (int, error)
- func (g *GoKeycloak) UpdateRealmRole(ctx context.Context, token, realm, roleName string, role Role) (int, error)
- func (g *GoKeycloak) UpdateRealmRoleByID(ctx context.Context, token, realm, roleID string, role Role) (int, error)
- func (g *GoKeycloak) UpdateRequiredAction(ctx context.Context, token string, realm string, ...) (int, error)
- func (g *GoKeycloak) UpdateResource(ctx context.Context, token, realm, idOfClient string, ...) (int, error)
- func (g *GoKeycloak) UpdateResourceClient(ctx context.Context, token, realm string, resource ResourceRepresentation) (int, error)
- func (g *GoKeycloak) UpdateResourcePolicy(ctx context.Context, token, realm, permissionID string, ...) error
- func (g *GoKeycloak) UpdateRole(ctx context.Context, token, realm, idOfClient string, role Role) (int, error)
- func (g *GoKeycloak) UpdateScope(ctx context.Context, token, realm, idOfClient string, ...) (int, error)
- func (g *GoKeycloak) UpdateUser(ctx context.Context, token, realm string, user User) (int, error)
- func (g *GoKeycloak) UpdateUserPermission(ctx context.Context, token, realm string, permission PermissionGrantParams) (*PermissionGrantResponseRepresentation, error)
- type Group
- type GroupDefinition
- type GroupPolicyRepresentation
- type GroupsCount
- type HTTPErrorResponse
- type IdentityProviderMapper
- type IdentityProviderRepresentation
- type IntroSpectTokenResult
- type IssuerResponse
- type JSPolicyRepresentation
- type JWT
- type Key
- type KeyStoreConfig
- type Logic
- type MappingsRepresentation
- type MemoryInfoRepresentation
- type ModifyAuthenticationExecutionRepresentation
- type MultiValuedHashMap
- type PasswordPolicy
- type PermissionGrantParams
- type PermissionGrantResponseRepresentation
- type PermissionRepresentation
- type PermissionResource
- type PermissionScope
- type PermissionTicketDescriptionRepresentation
- type PermissionTicketPermissionRepresentation
- type PermissionTicketRepresentation
- type PermissionTicketResponseRepresentation
- type PolicyEnforcementMode
- type PolicyRepresentation
- type PolicyResourceRepresentation
- type PolicyScopeRepresentation
- type ProtocolMapperRepresentation
- type ProtocolMapperType
- type ProtocolMapperTypeProperty
- type ProtocolMapperTypes
- type ProtocolMappers
- type ProtocolMappersConfig
- type RealmRepresentation
- type RequestingPartyPermission
- type RequestingPartyPermissionDecision
- type RequestingPartyTokenOptions
- type RequiredActionProviderRepresentation
- type ResourceOwnerRepresentation
- type ResourcePermission
- type ResourcePolicyRepresentation
- type ResourceRepresentation
- type ResourceServerRepresentation
- type Role
- type RoleDefinition
- type RolePolicyRepresentation
- type RolesRepresentation
- type ScopeRepresentation
- type SendVerificationMailParams
- type ServerInfoRepresentation
- type SetPasswordRequest
- type StringOrArray
- type SystemInfoRepresentation
- type ThemeRepresentation
- type Themes
- type TimePolicyRepresentation
- type TokenOptions
- type User
- type UserGroup
- type UserInfo
- type UserInfoAddress
- type UserPolicyRepresentation
- type UserSessionRepresentation
Constants ¶
This section is empty.
Variables ¶
var ( ENFORCING = PolicyEnforcementModeP("ENFORCING") PERMISSIVE = PolicyEnforcementModeP("PERMISSIVE") DISABLED = PolicyEnforcementModeP("DISABLED") )
PolicyEnforcementMode values
var ( POSITIVE = LogicP("POSITIVE") NEGATIVE = LogicP("NEGATIVE") )
Logic values
var ( AFFIRMATIVE = DecisionStrategyP("AFFIRMATIVE") UNANIMOUS = DecisionStrategyP("UNANIMOUS") CONSENSUS = DecisionStrategyP("CONSENSUS") )
DecisionStrategy values
Functions ¶
func GetQueryParams ¶
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 NilOrEmpty ¶
NilOrEmpty returns true if string is empty or has a nil value
func NilOrEmptyArray ¶
NilOrEmptyArray returns true if string is empty or has a nil value
func NilOrEmptySlice ¶
NilOrEmptySlice returns true if list is empty or has a nil value
func PStringSlice ¶
PStringSlice converts a pointer to []string or returns ampty slice if nill value
func SetAuthAdminRealms ¶
func SetAuthAdminRealms(url string) func(g *GoKeycloak)
SetAuthAdminRealms sets the auth admin realm
func SetAuthRealms ¶
func SetAuthRealms(url string) func(g *GoKeycloak)
SetAuthRealms sets the auth realm
func SetCertCacheInvalidationTime ¶
func SetCertCacheInvalidationTime(duration time.Duration) func(g *GoKeycloak)
==== Functional Options === SetCertCacheInvalidationTime sets the logout
func SetLegacyWildFlySupport ¶
func SetLegacyWildFlySupport() func(g *GoKeycloak)
SetLegacyWildFlySupport maintain legacy WildFly support.
func SetOpenIDConnectEndpoint ¶
func SetOpenIDConnectEndpoint(url string) func(g *GoKeycloak)
SetOpenIDConnectEndpoint sets the logout
func UserAttributeContains ¶
UserAttributeContains checks if the given attribute value is set
func WithTracer ¶
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
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
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"`
}
AggregatedPolicyRepresentation represents aggregated policies
func (*AggregatedPolicyRepresentation) String ¶
func (v *AggregatedPolicyRepresentation) String() 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 []ProtocolMapperRepresentation `json:"saml,omitempty"`
OpenIDConnect []ProtocolMapperRepresentation `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 *map[string]interface{} `json:"access,omitempty"`
AdminURL *string `json:"adminUrl,omitempty"`
Attributes *map[string]string `json:"attributes,omitempty"`
AuthenticationFlowBindingOverrides *map[string]string `json:"authenticationFlowBindingOverrides,omitempty"`
AuthorizationServicesEnabled *bool `json:"authorizationServicesEnabled,omitempty"`
AuthorizationSettings *ResourceServerRepresentation `json:"authorizationSettings,omitempty"`
BaseURL *string `json:"baseUrl,omitempty"`
BearerOnly *bool `json:"bearerOnly,omitempty"`
ClientAuthenticatorType *string `json:"clientAuthenticatorType,omitempty"`
ClientID *string `json:"clientId,omitempty"`
ConsentRequired *bool `json:"consentRequired,omitempty"`
DefaultClientScopes *[]string `json:"defaultClientScopes,omitempty"`
DefaultRoles *[]string `json:"defaultRoles,omitempty"`
Description *string `json:"description,omitempty"`
DirectAccessGrantsEnabled *bool `json:"directAccessGrantsEnabled,omitempty"`
Enabled *bool `json:"enabled,omitempty"`
FrontChannelLogout *bool `json:"frontchannelLogout,omitempty"`
FullScopeAllowed *bool `json:"fullScopeAllowed,omitempty"`
ID *string `json:"id,omitempty"`
ImplicitFlowEnabled *bool `json:"implicitFlowEnabled,omitempty"`
Name *string `json:"name,omitempty"`
NodeReRegistrationTimeout *int32 `json:"nodeReRegistrationTimeout,omitempty"`
NotBefore *int32 `json:"notBefore,omitempty"`
OptionalClientScopes *[]string `json:"optionalClientScopes,omitempty"`
Origin *string `json:"origin,omitempty"`
Protocol *string `json:"protocol,omitempty"`
ProtocolMappers *[]ProtocolMapperRepresentation `json:"protocolMappers,omitempty"`
PublicClient *bool `json:"publicClient,omitempty"`
RedirectURIs *[]string `json:"redirectUris,omitempty"`
RegisteredNodes *map[string]int `json:"registeredNodes,omitempty"`
RegistrationAccessToken *string `json:"registrationAccessToken,omitempty"`
RootURL *string `json:"rootUrl,omitempty"`
Secret *string `json:"secret,omitempty"`
ServiceAccountsEnabled *bool `json:"serviceAccountsEnabled,omitempty"`
StandardFlowEnabled *bool `json:"standardFlowEnabled,omitempty"`
SurrogateAuthRequired *bool `json:"surrogateAuthRequired,omitempty"`
WebOrigins *[]string `json:"webOrigins,omitempty"`
}
Client is a ClientRepresentation
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 ¶
func (v *ClientMappingsRepresentation) String() string
type ClientPolicyRepresentation ¶
type ClientPolicyRepresentation struct {
Clients *[]string `json:"clients,omitempty"`
}
ClientPolicyRepresentation represents client based policies
func (*ClientPolicyRepresentation) String ¶
func (v *ClientPolicyRepresentation) String() string
type ClientScope ¶
type ClientScope struct {
ID *string `json:"id,omitempty"`
Name *string `json:"name,omitempty"`
Description *string `json:"description,omitempty"`
Type *string `json:"type,omitempty"`
Protocol *string `json:"protocol,omitempty"`
ClientScopeAttributes *ClientScopeAttributes `json:"attributes,omitempty"`
ProtocolMappers *[]ProtocolMappers `json:"protocolMappers,omitempty"`
}
ClientScope is a ClientScope
func (*ClientScope) String ¶
func (v *ClientScope) String() string
type ClientScopeAttributes ¶
type ClientScopeAttributes struct {
ConsentScreenText *string `json:"consent.screen.text,omitempty"`
DisplayOnConsentScreen *string `json:"display.on.consent.screen,omitempty"`
IncludeInTokenScope *string `json:"include.in.token.scope,omitempty"`
GuiOrder *string `json:"gui.order,omitempty"`
}
ClientScopeAttributes are attributes of client scopes
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
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
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 CreateClientRequest ¶
type CreateClientRequest struct {
RedirectUris []string `json:"redirect_uris,omitempty"`
TokenEndpointAuthMethod string `json:"token_endpoint_auth_method,omitempty"`
GrantTypes []string `json:"grant_types,omitempty"`
ResponseTypes []string `json:"response_types,omitempty"`
Scope string `json:"scope,omitempty"`
SubjectType string `json:"subject_type,omitempty"`
RequestUris []any `json:"request_uris,omitempty"`
TLSClientCertificateBoundAccessTokens bool `json:"tls_client_certificate_bound_access_tokens,omitempty"`
ClientSecretExpiresAt int `json:"client_secret_expires_at,omitempty"`
BackchannelLogoutSessionRequired bool `json:"backchannel_logout_session_required,omitempty"`
RequirePushedAuthorizationRequests bool `json:"require_pushed_authorization_requests,omitempty"`
FrontchannelLogoutSessionRequired bool `json:"frontchannel_logout_session_required,omitempty"`
}
type CreateClientResponse ¶
type CreateClientResponse struct {
RedirectUris []string `json:"redirect_uris,omitempty"`
TokenEndpointAuthMethod string `json:"token_endpoint_auth_method,omitempty"`
GrantTypes []string `json:"grant_types,omitempty"`
ResponseTypes []string `json:"response_types,omitempty"`
ClientID string `json:"client_id,omitempty"`
ClientSecret string `json:"client_secret,omitempty"`
Scope string `json:"scope,omitempty"`
SubjectType string `json:"subject_type,omitempty"`
RequestUris []any `json:"request_uris,omitempty"`
TLSClientCertificateBoundAccessTokens bool `json:"tls_client_certificate_bound_access_tokens,omitempty"`
ClientIDIssuedAt int `json:"client_id_issued_at,omitempty"`
ClientSecretExpiresAt int `json:"client_secret_expires_at,omitempty"`
RegistrationClientURI string `json:"registration_client_uri,omitempty"`
RegistrationAccessToken string `json:"registration_access_token,omitempty"`
BackchannelLogoutSessionRequired bool `json:"backchannel_logout_session_required,omitempty"`
RequirePushedAuthorizationRequests bool `json:"require_pushed_authorization_requests,omitempty"`
FrontchannelLogoutSessionRequired bool `json:"frontchannel_logout_session_required,omitempty"`
}
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 ¶
func (v *CreatePermissionTicketParams) String() 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 ¶
func (v *FederatedIdentityRepresentation) 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 GoKeycloak ¶
type GoKeycloak 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(*GoKeycloak)) *GoKeycloak
NewClient creates a new Client
func (*GoKeycloak) AddClientRoleComposite ¶
func (g *GoKeycloak) AddClientRoleComposite(ctx context.Context, token, realm, roleID string, roles []Role) (int, error)
AddClientRoleComposite adds roles as composite
func (*GoKeycloak) AddClientRoleToGroup
deprecated
func (*GoKeycloak) AddClientRoleToUser
deprecated
func (*GoKeycloak) AddClientRolesToGroup ¶
func (g *GoKeycloak) AddClientRolesToGroup(ctx context.Context, token, realm, idOfClient, groupID string, roles []Role) (int, error)
AddClientRolesToGroup adds a client role to the group
func (*GoKeycloak) AddClientRolesToUser ¶
func (g *GoKeycloak) AddClientRolesToUser(ctx context.Context, token, realm, idOfClient, userID string, roles []Role) (int, error)
AddClientRolesToUser adds client-level role mappings
func (*GoKeycloak) AddDefaultGroup ¶
func (g *GoKeycloak) AddDefaultGroup(ctx context.Context, token, realm, groupID string) error
AddDefaultGroup adds group to the list of default groups
func (*GoKeycloak) AddDefaultScopeToClient ¶
func (g *GoKeycloak) AddDefaultScopeToClient(ctx context.Context, token, realm, idOfClient, scopeID string) (int, error)
AddDefaultScopeToClient adds a client scope to the list of client's default scopes
func (*GoKeycloak) AddOptionalScopeToClient ¶
func (g *GoKeycloak) AddOptionalScopeToClient(ctx context.Context, token, realm, idOfClient, scopeID string) (int, error)
AddOptionalScopeToClient adds a client scope to the list of client's optional scopes
func (*GoKeycloak) AddRealmRoleComposite ¶
func (g *GoKeycloak) AddRealmRoleComposite(ctx context.Context, token, realm, roleName string, roles []Role) (int, error)
AddRealmRoleComposite adds a role to the composite.
func (*GoKeycloak) AddRealmRoleToGroup ¶
func (g *GoKeycloak) AddRealmRoleToGroup(ctx context.Context, token, realm, groupID string, roles []Role) (int, error)
AddRealmRoleToGroup adds realm-level role mappings
func (*GoKeycloak) AddRealmRoleToUser ¶
func (g *GoKeycloak) AddRealmRoleToUser(ctx context.Context, token, realm, userID string, roles []Role) (int, error)
AddRealmRoleToUser adds realm-level role mappings
func (*GoKeycloak) AddUserToGroup ¶
func (g *GoKeycloak) AddUserToGroup(ctx context.Context, token, realm, userID, groupID string) (int, error)
AddUserToGroup puts given user to given group
func (*GoKeycloak) ClearKeysCache ¶
ClearKeysCache clears realm cache
func (*GoKeycloak) ClearRealmCache ¶
ClearRealmCache clears realm cache
func (*GoKeycloak) ClearUserCache ¶
ClearUserCache clears realm cache
func (*GoKeycloak) CreateAuthenticationExecution ¶
func (g *GoKeycloak) CreateAuthenticationExecution(ctx context.Context, token, realm, flow string, execution CreateAuthenticationExecutionRepresentation) (int, error)
CreateAuthenticationExecution creates a new execution for the given flow name in the given realm
func (*GoKeycloak) CreateAuthenticationExecutionFlow ¶
func (g *GoKeycloak) CreateAuthenticationExecutionFlow(ctx context.Context, token, realm, flow string, executionFlow CreateAuthenticationExecutionFlowRepresentation) (int, error)
CreateAuthenticationExecutionFlow creates a new execution for the given flow name in the given realm
func (*GoKeycloak) CreateAuthenticationFlow ¶
func (g *GoKeycloak) CreateAuthenticationFlow(ctx context.Context, token, realm string, flow AuthenticationFlowRepresentation) (int, error)
CreateAuthenticationFlow creates a new Authentication flow in a realm
func (*GoKeycloak) CreateChildGroup ¶
func (g *GoKeycloak) CreateChildGroup(ctx context.Context, token, realm, groupID string, group Group) (int, string, error)
CreateChildGroup creates a new child group
func (*GoKeycloak) CreateClient ¶
func (g *GoKeycloak) CreateClient(ctx context.Context, clientInitialAccessToken, realm string, newClient CreateClientRequest) (int, CreateClientResponse, error)
CreateClient creates the given g.
func (*GoKeycloak) CreateClientProtocolMapper ¶
func (g *GoKeycloak) CreateClientProtocolMapper(ctx context.Context, token, realm, idOfClient string, mapper ProtocolMapperRepresentation) (int, string, error)
CreateClientProtocolMapper creates a protocol mapper in client scope
func (*GoKeycloak) CreateClientRepresentation ¶
func (g *GoKeycloak) CreateClientRepresentation(ctx context.Context, token, realm string, newClient Client) (int, *Client, error)
CreateClientRepresentation creates a new client representation
func (*GoKeycloak) CreateClientRole ¶
func (g *GoKeycloak) CreateClientRole(ctx context.Context, token, realm, idOfClient string, role Role) (int, string, error)
CreateClientRole creates a new role for a client
func (*GoKeycloak) CreateClientScope ¶
func (g *GoKeycloak) CreateClientScope(ctx context.Context, token, realm string, scope ClientScope) (int, string, error)
CreateClientScope creates a new client scope
func (*GoKeycloak) CreateClientScopeMappingsClientRoles ¶
func (g *GoKeycloak) CreateClientScopeMappingsClientRoles(ctx context.Context, token, realm, idOfClient, idOfSelectedClient string, roles []Role) (int, error)
CreateClientScopeMappingsClientRoles creates client-level roles from the client’s scope
func (*GoKeycloak) CreateClientScopeMappingsRealmRoles ¶
func (g *GoKeycloak) CreateClientScopeMappingsRealmRoles(ctx context.Context, token, realm, idOfClient string, roles []Role) (int, error)
CreateClientScopeMappingsRealmRoles create realm-level roles to the client’s scope
func (*GoKeycloak) CreateClientScopeProtocolMapper ¶
func (g *GoKeycloak) CreateClientScopeProtocolMapper(ctx context.Context, token, realm, scopeID string, protocolMapper ProtocolMappers) (int, string, error)
CreateClientScopeProtocolMapper creates a new protocolMapper under the given client scope
func (*GoKeycloak) CreateClientScopesScopeMappingsClientRoles ¶
func (g *GoKeycloak) CreateClientScopesScopeMappingsClientRoles( ctx context.Context, token, realm, idOfClientScope, idOfClient string, roles []Role, ) (int, error)
CreateClientScopesScopeMappingsClientRoles attaches a client role to a client scope (not client's scope)
func (*GoKeycloak) CreateClientScopesScopeMappingsRealmRoles ¶
func (g *GoKeycloak) CreateClientScopesScopeMappingsRealmRoles(ctx context.Context, token, realm, clientScopeID string, roles []Role) (int, error)
CreateClientScopesScopeMappingsRealmRoles creates realm-level roles to the client scope
func (*GoKeycloak) CreateComponent ¶
func (g *GoKeycloak) CreateComponent(ctx context.Context, token, realm string, component Component) (int, string, error)
CreateComponent creates the given component.
func (*GoKeycloak) CreateGroup ¶
func (g *GoKeycloak) CreateGroup(ctx context.Context, token, realm string, group Group) (int, string, error)
CreateGroup creates a new group.
func (*GoKeycloak) CreateIdentityProvider ¶
func (g *GoKeycloak) CreateIdentityProvider(ctx context.Context, token string, realm string, providerRep IdentityProviderRepresentation) (int, string, error)
CreateIdentityProvider creates an identity provider in a realm
func (*GoKeycloak) CreateIdentityProviderMapper ¶
func (g *GoKeycloak) CreateIdentityProviderMapper(ctx context.Context, token, realm, alias string, mapper IdentityProviderMapper) (int, string, error)
CreateIdentityProviderMapper creates an instance of an identity provider mapper associated with the given alias
func (*GoKeycloak) CreatePermission ¶
func (g *GoKeycloak) CreatePermission(ctx context.Context, token, realm, idOfClient string, permission PermissionRepresentation) (*PermissionRepresentation, error)
CreatePermission creates a permission associated with the client
func (*GoKeycloak) CreatePermissionTicket ¶
func (g *GoKeycloak) CreatePermissionTicket(ctx context.Context, token, realm string, permissions []CreatePermissionTicketParams) (*PermissionTicketResponseRepresentation, error)
CreatePermissionTicket creates a permission ticket, using access token from client
func (*GoKeycloak) CreatePolicy ¶
func (g *GoKeycloak) CreatePolicy(ctx context.Context, token, realm, idOfClient string, policy PolicyRepresentation) (*PolicyRepresentation, error)
CreatePolicy creates a policy associated with the client
func (*GoKeycloak) CreateRealm ¶
func (g *GoKeycloak) CreateRealm(ctx context.Context, token string, realm RealmRepresentation) (int, string, error)
CreateRealm creates a realm
func (*GoKeycloak) CreateRealmRole ¶
func (g *GoKeycloak) CreateRealmRole(ctx context.Context, token string, realm string, role Role) (int, string, error)
CreateRealmRole creates a role in a realm
func (*GoKeycloak) CreateResource ¶
func (g *GoKeycloak) CreateResource(ctx context.Context, token, realm string, idOfClient string, resource ResourceRepresentation) (int, *ResourceRepresentation, error)
CreateResource creates a resource associated with the client, using access token from admin
func (*GoKeycloak) CreateResourceClient ¶
func (g *GoKeycloak) CreateResourceClient(ctx context.Context, token, realm string, resource ResourceRepresentation) (int, *ResourceRepresentation, error)
CreateResourceClient creates a resource associated with the client, using access token from client
func (*GoKeycloak) CreateResourcePolicy ¶
func (g *GoKeycloak) 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 (*GoKeycloak) CreateScope ¶
func (g *GoKeycloak) CreateScope(ctx context.Context, token, realm, idOfClient string, scope ScopeRepresentation) (int, *ScopeRepresentation, error)
CreateScope creates a scope associated with the client
func (*GoKeycloak) CreateUser ¶
func (g *GoKeycloak) CreateUser(ctx context.Context, token, realm string, user User) (int, 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 (*GoKeycloak) CreateUserFederatedIdentity ¶
func (g *GoKeycloak) CreateUserFederatedIdentity(ctx context.Context, token, realm, userID, providerID string, federatedIdentityRep FederatedIdentityRepresentation) (int, error)
CreateUserFederatedIdentity creates an user federated identity
func (*GoKeycloak) DecodeAccessToken ¶
func (g *GoKeycloak) DecodeAccessToken(ctx context.Context, accessToken, realm string) (int, *jwt.Token, *jwt.MapClaims, error)
DecodeAccessToken decodes the accessToken
func (*GoKeycloak) DecodeAccessTokenCustomClaims ¶
func (g *GoKeycloak) DecodeAccessTokenCustomClaims(ctx context.Context, accessToken, realm string, claims jwt.Claims) (int, *jwt.Token, error)
DecodeAccessTokenCustomClaims decodes the accessToken and writes claims into the given claims
func (*GoKeycloak) DeleteAuthenticationExecution ¶
func (g *GoKeycloak) DeleteAuthenticationExecution(ctx context.Context, token, realm, executionID string) (int, error)
DeleteAuthenticationExecution delete a single execution with the given ID
func (*GoKeycloak) DeleteAuthenticationFlow ¶
func (g *GoKeycloak) DeleteAuthenticationFlow(ctx context.Context, token, realm, flowID string) (int, error)
DeleteAuthenticationFlow deletes a flow in a realm with the given ID
func (*GoKeycloak) DeleteClient ¶
func (g *GoKeycloak) DeleteClient(ctx context.Context, token, realm, idOfClient string) (int, error)
DeleteClient deletes a given client
func (*GoKeycloak) DeleteClientProtocolMapper ¶
func (g *GoKeycloak) DeleteClientProtocolMapper(ctx context.Context, token, realm, idOfClient, mapperID string) (int, error)
DeleteClientProtocolMapper deletes a protocol mapper in client scope
func (*GoKeycloak) DeleteClientRepresentation ¶
func (g *GoKeycloak) DeleteClientRepresentation(ctx context.Context, accessToken, realm, clientID string) (int, error)
DeleteClientRepresentation deletes a given client representation.
func (*GoKeycloak) DeleteClientRole ¶
func (g *GoKeycloak) DeleteClientRole(ctx context.Context, token, realm, idOfClient, roleName string) (int, error)
DeleteClientRole deletes a given role.
func (*GoKeycloak) DeleteClientRoleComposite ¶
func (g *GoKeycloak) DeleteClientRoleComposite(ctx context.Context, token, realm, roleID string, roles []Role) (int, error)
DeleteClientRoleComposite deletes composites from a role
func (*GoKeycloak) DeleteClientRoleFromGroup ¶
func (g *GoKeycloak) DeleteClientRoleFromGroup(ctx context.Context, token, realm, idOfClient, groupID string, roles []Role) (int, error)
DeleteClientRoleFromGroup removes a client role from from the group
func (*GoKeycloak) DeleteClientRoleFromUser
deprecated
func (*GoKeycloak) DeleteClientRolesFromUser ¶
func (g *GoKeycloak) DeleteClientRolesFromUser(ctx context.Context, token, realm, idOfClient, userID string, roles []Role) (int, error)
DeleteClientRolesFromUser adds client-level role mappings
func (*GoKeycloak) DeleteClientScope ¶
func (g *GoKeycloak) DeleteClientScope(ctx context.Context, token, realm, scopeID string) (int, error)
DeleteClientScope deletes the scope with the given id.
func (*GoKeycloak) DeleteClientScopeMappingsClientRoles ¶
func (g *GoKeycloak) DeleteClientScopeMappingsClientRoles(ctx context.Context, token, realm, idOfClient, idOfSelectedClient string, roles []Role) (int, error)
DeleteClientScopeMappingsClientRoles deletes client-level roles from the client’s scope
func (*GoKeycloak) DeleteClientScopeMappingsRealmRoles ¶
func (g *GoKeycloak) DeleteClientScopeMappingsRealmRoles(ctx context.Context, token, realm, idOfClient string, roles []Role) (int, error)
DeleteClientScopeMappingsRealmRoles deletes realm-level roles from the client’s scope
func (*GoKeycloak) DeleteClientScopeProtocolMapper ¶
func (g *GoKeycloak) DeleteClientScopeProtocolMapper(ctx context.Context, token, realm, scopeID, protocolMapperID string) (int, error)
DeleteClientScopeProtocolMapper deletes the given protocol mapper from the client scope
func (*GoKeycloak) DeleteClientScopesScopeMappingsClientRoles ¶
func (g *GoKeycloak) DeleteClientScopesScopeMappingsClientRoles(ctx context.Context, token, realm, idOfClientScope, idOfClient string, roles []Role) (int, error)
DeleteClientScopesScopeMappingsClientRoles removes attachment of client roles from a client scope (not client's scope).
func (*GoKeycloak) DeleteClientScopesScopeMappingsRealmRoles ¶
func (g *GoKeycloak) DeleteClientScopesScopeMappingsRealmRoles(ctx context.Context, token, realm, clientScopeID string, roles []Role) (int, error)
DeleteClientScopesScopeMappingsRealmRoles deletes realm-level roles from the client-scope
func (*GoKeycloak) DeleteComponent ¶
func (g *GoKeycloak) DeleteComponent(ctx context.Context, token, realm, componentID string) (int, error)
DeleteComponent deletes the component with the given id.
func (*GoKeycloak) DeleteCredentials ¶
func (g *GoKeycloak) DeleteCredentials(ctx context.Context, token, realm, userID, credentialID string) error
DeleteCredentials deletes the given credential for a given user
func (*GoKeycloak) DeleteGroup ¶
DeleteGroup deletes the group with the given groupID.
func (*GoKeycloak) DeleteIdentityProvider ¶
func (g *GoKeycloak) DeleteIdentityProvider(ctx context.Context, token, realm, alias string) (int, error)
DeleteIdentityProvider deletes the identity provider in a realm
func (*GoKeycloak) DeleteIdentityProviderMapper ¶
func (g *GoKeycloak) DeleteIdentityProviderMapper(ctx context.Context, token, realm, alias, mapperID string) (int, error)
DeleteIdentityProviderMapper deletes an instance of an identity provider mapper associated with the given alias and mapper ID
func (*GoKeycloak) DeletePermission ¶
func (g *GoKeycloak) DeletePermission(ctx context.Context, token, realm, idOfClient, permissionID string) error
DeletePermission deletes a policy associated with the client
func (*GoKeycloak) DeletePolicy ¶
func (g *GoKeycloak) DeletePolicy(ctx context.Context, token, realm, idOfClient, policyID string) error
DeletePolicy deletes a policy associated with the client
func (*GoKeycloak) DeleteRealm ¶
DeleteRealm removes a realm
func (*GoKeycloak) DeleteRealmRole ¶
func (g *GoKeycloak) DeleteRealmRole(ctx context.Context, token, realm, roleName string) (int, error)
DeleteRealmRole deletes a role in a realm by role's name
func (*GoKeycloak) DeleteRealmRoleComposite ¶
func (g *GoKeycloak) DeleteRealmRoleComposite(ctx context.Context, token, realm, roleName string, roles []Role) (int, error)
DeleteRealmRoleComposite deletes a role from the composite.
func (*GoKeycloak) DeleteRealmRoleFromGroup ¶
func (g *GoKeycloak) DeleteRealmRoleFromGroup(ctx context.Context, token, realm, groupID string, roles []Role) (int, error)
DeleteRealmRoleFromGroup deletes realm-level role mappings
func (*GoKeycloak) DeleteRealmRoleFromUser ¶
func (g *GoKeycloak) DeleteRealmRoleFromUser(ctx context.Context, token, realm, userID string, roles []Role) (int, error)
DeleteRealmRoleFromUser deletes realm-level role mappings
func (*GoKeycloak) DeleteRequiredAction ¶
func (g *GoKeycloak) DeleteRequiredAction(ctx context.Context, token string, realm string, alias string) (int, error)
DeleteRequiredAction updates a required action for a given realm
func (*GoKeycloak) DeleteResource ¶
func (g *GoKeycloak) DeleteResource(ctx context.Context, token, realm, idOfClient, resourceID string) (int, error)
DeleteResource deletes a resource associated with the client (using an admin token)
func (*GoKeycloak) DeleteResourceClient ¶
func (g *GoKeycloak) DeleteResourceClient(ctx context.Context, token, realm, resourceID string) (int, error)
DeleteResourceClient deletes a resource associated with the client (using a client token)
func (*GoKeycloak) DeleteResourcePolicy ¶
func (g *GoKeycloak) 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 (*GoKeycloak) DeleteScope ¶
func (g *GoKeycloak) DeleteScope(ctx context.Context, token, realm, idOfClient, scopeID string) (int, error)
DeleteScope deletes a scope associated with the client
func (*GoKeycloak) DeleteUser ¶
DeleteUser delete a given user
func (*GoKeycloak) DeleteUserFederatedIdentity ¶
func (g *GoKeycloak) DeleteUserFederatedIdentity(ctx context.Context, token, realm, userID, providerID string) (int, error)
DeleteUserFederatedIdentity deletes an user federated identity
func (*GoKeycloak) DeleteUserFromGroup ¶
func (g *GoKeycloak) DeleteUserFromGroup(ctx context.Context, token, realm, userID, groupID string) (int, error)
DeleteUserFromGroup deletes given user from given group
func (*GoKeycloak) DeleteUserPermission ¶
func (g *GoKeycloak) DeleteUserPermission(ctx context.Context, token, realm, ticketID string) error
DeleteUserPermission revokes permissions according query parameters
func (*GoKeycloak) DisableAllCredentialsByType ¶
func (g *GoKeycloak) DisableAllCredentialsByType(ctx context.Context, token, realm, userID string, types []string) error
DisableAllCredentialsByType disables all credentials for a user of a specific type
func (*GoKeycloak) EvaluatePermission ¶
func (*GoKeycloak) ExecuteActionsEmail ¶
func (g *GoKeycloak) ExecuteActionsEmail(ctx context.Context, token, realm string, params ExecuteActionsEmail) (int, error)
ExecuteActionsEmail executes an actions email
func (*GoKeycloak) ExportIDPPublicBrokerConfig ¶
func (g *GoKeycloak) ExportIDPPublicBrokerConfig(ctx context.Context, token, realm, alias string) (int, *string, error)
ExportIDPPublicBrokerConfig exports the broker config for a given alias
func (*GoKeycloak) GenerateClientInitialAccessToken ¶
func (g *GoKeycloak) GenerateClientInitialAccessToken(ctx context.Context, realm string, adminAccessToken string, requestBody ClientInitialAccessTokenRequest) (int, ClientInitialAccessTokenResponse, error)
func (*GoKeycloak) GetAdapterConfiguration ¶
func (g *GoKeycloak) GetAdapterConfiguration(ctx context.Context, accessToken, realm, clientID string) (int, *AdapterConfiguration, error)
GetAdapterConfiguration returns a adapter configuration
func (*GoKeycloak) GetAllRealmsInfo ¶
func (g *GoKeycloak) GetAllRealmsInfo(ctx context.Context, adminAccessToken string) (int, []*ServerInfoRepresentation, error)
URL: {{keycloak_url}}/admin/realms GetServerInfo fetches the server info.
func (*GoKeycloak) GetAuthenticationExecutions ¶
func (g *GoKeycloak) GetAuthenticationExecutions(ctx context.Context, token, realm, flow string) (int, []*ModifyAuthenticationExecutionRepresentation, error)
GetAuthenticationExecutions retrieves all executions of a given flow
func (*GoKeycloak) GetAuthenticationFlow ¶
func (g *GoKeycloak) GetAuthenticationFlow(ctx context.Context, token, realm string, authenticationFlowID string) (int, *AuthenticationFlowRepresentation, error)
GetAuthenticationFlow get an authentication flow with the given ID
func (*GoKeycloak) GetAuthenticationFlows ¶
func (g *GoKeycloak) GetAuthenticationFlows(ctx context.Context, token, realm string) (int, []*AuthenticationFlowRepresentation, error)
GetAuthenticationFlows get all authentication flows from a realm
func (*GoKeycloak) GetAuthorizationPolicyAssociatedPolicies ¶
func (g *GoKeycloak) 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 (*GoKeycloak) GetAuthorizationPolicyResources ¶
func (g *GoKeycloak) 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 (*GoKeycloak) GetAuthorizationPolicyScopes ¶
func (g *GoKeycloak) 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 (*GoKeycloak) GetAvailableClientRolesByGroupID ¶
func (g *GoKeycloak) GetAvailableClientRolesByGroupID(ctx context.Context, token, realm, idOfClient, groupID string) (int, []*Role, error)
GetAvailableClientRolesByGroupID returns all available roles to the given group
func (*GoKeycloak) GetAvailableClientRolesByUserID ¶
func (g *GoKeycloak) GetAvailableClientRolesByUserID(ctx context.Context, token, realm, idOfClient, userID string) (int, []*Role, error)
GetAvailableClientRolesByUserID returns all available client roles to the given user
func (*GoKeycloak) GetAvailableRealmRolesByGroupID ¶
func (g *GoKeycloak) GetAvailableRealmRolesByGroupID(ctx context.Context, token, realm, groupID string) (int, []*Role, error)
GetAvailableRealmRolesByGroupID returns all available realm roles to the given group
func (*GoKeycloak) GetAvailableRealmRolesByUserID ¶
func (g *GoKeycloak) GetAvailableRealmRolesByUserID(ctx context.Context, token, realm, userID string) (int, []*Role, error)
GetAvailableRealmRolesByUserID returns all available realm roles to the given user
func (*GoKeycloak) GetCerts ¶
func (g *GoKeycloak) GetCerts(ctx context.Context, realm string) (int, *CertResponse, error)
GetCerts fetches certificates for the given realm from the public /open-id-connect/certs endpoint
func (*GoKeycloak) GetClient ¶
func (g *GoKeycloak) GetClient(ctx context.Context, token, realm, idOfClient string) (int, *Client, error)
GetClient returns a client
func (*GoKeycloak) GetClientOfflineSessions ¶
func (g *GoKeycloak) GetClientOfflineSessions(ctx context.Context, token, realm, idOfClient string) (int, []*UserSessionRepresentation, error)
GetClientOfflineSessions returns offline sessions associated with the client
func (*GoKeycloak) GetClientRepresentation ¶
func (g *GoKeycloak) GetClientRepresentation(ctx context.Context, accessToken, realm, clientID string) (int, *Client, error)
GetClientRepresentation returns a client representation
func (*GoKeycloak) GetClientRole ¶
func (g *GoKeycloak) GetClientRole(ctx context.Context, token, realm, idOfClient, roleName string) (int, *Role, error)
GetClientRole get a role for the given client in a realm by role name
func (*GoKeycloak) GetClientRoleByID ¶
func (g *GoKeycloak) GetClientRoleByID(ctx context.Context, token, realm, roleID string) (int, *Role, error)
GetClientRoleByID gets role for the given client in realm using role ID
func (*GoKeycloak) GetClientRoles ¶
func (g *GoKeycloak) GetClientRoles(ctx context.Context, token, realm, idOfClient string, params GetRoleParams) (int, []*Role, error)
GetClientRoles get all roles for the given client in realm
func (*GoKeycloak) GetClientRolesByGroupID ¶
func (g *GoKeycloak) GetClientRolesByGroupID(ctx context.Context, token, realm, idOfClient, groupID string) (int, []*Role, error)
GetClientRolesByGroupID returns all client roles assigned to the given group
func (*GoKeycloak) GetClientRolesByUserID ¶
func (g *GoKeycloak) GetClientRolesByUserID(ctx context.Context, token, realm, idOfClient, userID string) (int, []*Role, error)
GetClientRolesByUserID returns all client roles assigned to the given user
func (*GoKeycloak) GetClientScope ¶
func (g *GoKeycloak) GetClientScope(ctx context.Context, token, realm, scopeID string) (int, *ClientScope, error)
GetClientScope returns a clientscope
func (*GoKeycloak) GetClientScopeMappings ¶
func (g *GoKeycloak) GetClientScopeMappings(ctx context.Context, token, realm, idOfClient string) (int, *MappingsRepresentation, error)
GetClientScopeMappings returns all scope mappings for the client
func (*GoKeycloak) GetClientScopeMappingsClientRoles ¶
func (g *GoKeycloak) GetClientScopeMappingsClientRoles(ctx context.Context, token, realm, idOfClient, idOfSelectedClient string) (int, []*Role, error)
GetClientScopeMappingsClientRoles returns roles associated with a client’s scope
func (*GoKeycloak) GetClientScopeMappingsClientRolesAvailable ¶
func (g *GoKeycloak) GetClientScopeMappingsClientRolesAvailable(ctx context.Context, token, realm, idOfClient, idOfSelectedClient string) (int, []*Role, error)
GetClientScopeMappingsClientRolesAvailable returns available roles associated with a client’s scope
func (*GoKeycloak) GetClientScopeMappingsRealmRoles ¶
func (g *GoKeycloak) GetClientScopeMappingsRealmRoles(ctx context.Context, token, realm, idOfClient string) (int, []*Role, error)
GetClientScopeMappingsRealmRoles returns realm-level roles associated with the client’s scope
func (*GoKeycloak) GetClientScopeMappingsRealmRolesAvailable ¶
func (g *GoKeycloak) GetClientScopeMappingsRealmRolesAvailable(ctx context.Context, token, realm, idOfClient string) (int, []*Role, error)
GetClientScopeMappingsRealmRolesAvailable returns realm-level roles that are available to attach to this client’s scope
func (*GoKeycloak) GetClientScopeProtocolMapper ¶
func (g *GoKeycloak) GetClientScopeProtocolMapper(ctx context.Context, token, realm, scopeID, protocolMapperID string) (int, *ProtocolMappers, error)
GetClientScopeProtocolMapper returns a protocol mapper of a client scope
func (*GoKeycloak) GetClientScopeProtocolMappers ¶
func (g *GoKeycloak) GetClientScopeProtocolMappers(ctx context.Context, token, realm, scopeID string) (int, []*ProtocolMappers, error)
GetClientScopeProtocolMappers returns all protocol mappers of a client scope
func (*GoKeycloak) GetClientScopes ¶
func (g *GoKeycloak) GetClientScopes(ctx context.Context, token, realm string) (int, []*ClientScope, error)
GetClientScopes returns all client scopes
func (*GoKeycloak) GetClientScopesScopeMappingsClientRoles ¶
func (g *GoKeycloak) GetClientScopesScopeMappingsClientRoles(ctx context.Context, token, realm, idOfClientScope, idOfClient string) (int, []*Role, error)
GetClientScopesScopeMappingsClientRoles returns attached client roles for a specific client, for a client scope (not client's scope).
func (*GoKeycloak) GetClientScopesScopeMappingsClientRolesAvailable ¶
func (g *GoKeycloak) GetClientScopesScopeMappingsClientRolesAvailable(ctx context.Context, token, realm, idOfClientScope, idOfClient string) (int, []*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 (*GoKeycloak) GetClientScopesScopeMappingsRealmRoles ¶
func (g *GoKeycloak) GetClientScopesScopeMappingsRealmRoles(ctx context.Context, token, realm, clientScopeID string) (int, []*Role, error)
GetClientScopesScopeMappingsRealmRoles returns roles associated with a client-scope
func (*GoKeycloak) GetClientScopesScopeMappingsRealmRolesAvailable ¶
func (g *GoKeycloak) GetClientScopesScopeMappingsRealmRolesAvailable(ctx context.Context, token, realm, clientScopeID string) (int, []*Role, error)
GetClientScopesScopeMappingsRealmRolesAvailable returns realm-level roles that are available to attach to this client scope
func (*GoKeycloak) GetClientSecret ¶
func (g *GoKeycloak) GetClientSecret(ctx context.Context, token, realm, idOfClient string) (int, *CredentialRepresentation, error)
GetClientSecret returns a client's secret
func (*GoKeycloak) GetClientServiceAccount ¶
func (g *GoKeycloak) GetClientServiceAccount(ctx context.Context, token, realm, idOfClient string) (int, *User, error)
GetClientServiceAccount retrieves the service account "user" for a client if enabled
func (*GoKeycloak) GetClientUserSessions ¶
func (g *GoKeycloak) GetClientUserSessions(ctx context.Context, token, realm, idOfClient string) (int, []*UserSessionRepresentation, error)
GetClientUserSessions returns user sessions associated with the client
func (*GoKeycloak) GetClients ¶
func (g *GoKeycloak) GetClients(ctx context.Context, token, realm string, params GetClientsParams) (int, []*Client, error)
GetClients gets all clients in realm
func (*GoKeycloak) GetClientsDefaultScopes ¶
func (g *GoKeycloak) GetClientsDefaultScopes(ctx context.Context, token, realm, idOfClient string) (int, []*ClientScope, error)
GetClientsDefaultScopes returns a list of the client's default scopes
func (*GoKeycloak) GetClientsOptionalScopes ¶
func (g *GoKeycloak) GetClientsOptionalScopes(ctx context.Context, token, realm, idOfClient string) (int, []*ClientScope, error)
GetClientsOptionalScopes returns a list of the client's optional scopes
func (*GoKeycloak) GetComponent ¶
func (g *GoKeycloak) GetComponent(ctx context.Context, token, realm string, componentID string) (*Component, error)
GetComponent get exactly one component by ID
func (*GoKeycloak) GetComponents ¶
GetComponents get all components in realm
func (*GoKeycloak) GetComponentsWithParams ¶
func (g *GoKeycloak) GetComponentsWithParams(ctx context.Context, token, realm string, params GetComponentsParams) ([]*Component, error)
GetComponentsWithParams get all components in realm with query params
func (*GoKeycloak) GetCompositeClientRolesByGroupID ¶
func (g *GoKeycloak) GetCompositeClientRolesByGroupID(ctx context.Context, token, realm, idOfClient, groupID string) (int, []*Role, error)
GetCompositeClientRolesByGroupID returns all client roles and composite roles assigned to the given group
func (*GoKeycloak) GetCompositeClientRolesByRoleID ¶
func (g *GoKeycloak) GetCompositeClientRolesByRoleID(ctx context.Context, token, realm, idOfClient, roleID string) (int, []*Role, error)
GetCompositeClientRolesByRoleID returns all client composite roles associated with the given client role
func (*GoKeycloak) GetCompositeClientRolesByUserID ¶
func (g *GoKeycloak) GetCompositeClientRolesByUserID(ctx context.Context, token, realm, idOfClient, userID string) (int, []*Role, error)
GetCompositeClientRolesByUserID returns all client roles and composite roles assigned to the given user
func (*GoKeycloak) GetCompositeRealmRoles ¶
func (g *GoKeycloak) GetCompositeRealmRoles(ctx context.Context, token, realm, roleName string) (int, []*Role, error)
GetCompositeRealmRoles returns all realm composite roles associated with the given realm role
func (*GoKeycloak) GetCompositeRealmRolesByGroupID ¶
func (g *GoKeycloak) GetCompositeRealmRolesByGroupID(ctx context.Context, token, realm, groupID string) (int, []*Role, error)
GetCompositeRealmRolesByGroupID returns all realm roles and composite roles assigned to the given group
func (*GoKeycloak) GetCompositeRealmRolesByRoleID ¶
func (g *GoKeycloak) GetCompositeRealmRolesByRoleID(ctx context.Context, token, realm, roleID string) (int, []*Role, error)
GetCompositeRealmRolesByRoleID returns all realm composite roles associated with the given client role
func (*GoKeycloak) GetCompositeRealmRolesByUserID ¶
func (g *GoKeycloak) GetCompositeRealmRolesByUserID(ctx context.Context, token, realm, userID string) (int, []*Role, error)
GetCompositeRealmRolesByUserID returns all realm roles and composite roles assigned to the given user
func (*GoKeycloak) GetCompositeRolesByRoleID ¶
func (g *GoKeycloak) GetCompositeRolesByRoleID(ctx context.Context, token, realm, roleID string) (int, []*Role, error)
GetCompositeRolesByRoleID returns all realm composite roles associated with the given client role
func (*GoKeycloak) GetConfiguredUserStorageCredentialTypes ¶
func (g *GoKeycloak) 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 (*GoKeycloak) GetCredentialRegistrators ¶
func (g *GoKeycloak) GetCredentialRegistrators(ctx context.Context, token, realm string) ([]string, error)
GetCredentialRegistrators returns credentials registrators
func (*GoKeycloak) GetCredentials ¶
func (g *GoKeycloak) GetCredentials(ctx context.Context, token, realm, userID string) ([]*CredentialRepresentation, error)
GetCredentials returns credentials available for a given user
func (*GoKeycloak) GetDefaultDefaultClientScopes ¶
func (g *GoKeycloak) GetDefaultDefaultClientScopes(ctx context.Context, token, realm string) (int, []*ClientScope, error)
GetDefaultDefaultClientScopes returns a list of default realm default scopes
func (*GoKeycloak) GetDefaultGroups ¶
GetDefaultGroups returns a list of default groups
func (*GoKeycloak) GetDefaultOptionalClientScopes ¶
func (g *GoKeycloak) GetDefaultOptionalClientScopes(ctx context.Context, token, realm string) (int, []*ClientScope, error)
GetDefaultOptionalClientScopes returns a list of default realm optional scopes
func (*GoKeycloak) GetDependentPermissions ¶
func (g *GoKeycloak) GetDependentPermissions(ctx context.Context, token, realm, idOfClient, policyID string) ([]*PermissionRepresentation, error)
GetDependentPermissions returns a client's permission with the given policy id
func (*GoKeycloak) GetEvents ¶
func (g *GoKeycloak) GetEvents(ctx context.Context, token string, realm string, params GetEventsParams) ([]*EventRepresentation, error)
GetEvents returns events
func (*GoKeycloak) GetGroup ¶
func (g *GoKeycloak) GetGroup(ctx context.Context, token, realm, groupID string) (int, *Group, error)
GetGroup get group with id in realm
func (*GoKeycloak) GetGroupByPath ¶
func (g *GoKeycloak) GetGroupByPath(ctx context.Context, token, realm, groupPath string) (int, *Group, error)
GetGroupByPath get group with path in realm
func (*GoKeycloak) GetGroupMembers ¶
func (g *GoKeycloak) GetGroupMembers(ctx context.Context, token, realm, groupID string, params GetGroupsParams) (int, []*User, error)
GetGroupMembers get a list of users of group with id in realm
func (*GoKeycloak) GetGroups ¶
func (g *GoKeycloak) GetGroups(ctx context.Context, token, realm string, params GetGroupsParams) (int, []*Group, error)
GetGroups get all groups in realm
func (*GoKeycloak) GetGroupsByClientRole ¶
func (g *GoKeycloak) GetGroupsByClientRole(ctx context.Context, token, realm string, roleName string, clientID string) (int, []*Group, error)
GetGroupsByClientRole gets groups with specified roles assigned of given client within a realm
func (*GoKeycloak) GetGroupsByRole ¶
func (g *GoKeycloak) GetGroupsByRole(ctx context.Context, token, realm string, roleName string) (int, []*Group, error)
GetGroupsByRole gets groups assigned with a specific role of a realm
func (*GoKeycloak) GetGroupsCount ¶
func (g *GoKeycloak) GetGroupsCount(ctx context.Context, token, realm string, params GetGroupsParams) (int, int, error)
GetGroupsCount gets the groups count in the realm
func (*GoKeycloak) GetIdentityProvider ¶
func (g *GoKeycloak) GetIdentityProvider(ctx context.Context, token, realm, alias string) (int, *IdentityProviderRepresentation, error)
GetIdentityProvider gets the identity provider in a realm
func (*GoKeycloak) GetIdentityProviderMapper ¶
func (g *GoKeycloak) GetIdentityProviderMapper(ctx context.Context, token string, realm string, alias string, mapperID string) (int, *IdentityProviderMapper, error)
GetIdentityProviderMapper gets the mapper by id for the given identity provider alias in a realm
func (*GoKeycloak) GetIdentityProviderMapperByID ¶
func (g *GoKeycloak) GetIdentityProviderMapperByID(ctx context.Context, token, realm, alias, mapperID string) (int, *IdentityProviderMapper, error)
GetIdentityProviderMapperByID gets the mapper of an identity provider
func (*GoKeycloak) GetIdentityProviderMappers ¶
func (g *GoKeycloak) GetIdentityProviderMappers(ctx context.Context, token, realm, alias string) (int, []*IdentityProviderMapper, error)
GetIdentityProviderMappers returns list of mappers associated with an identity provider
func (*GoKeycloak) GetIdentityProviders ¶
func (g *GoKeycloak) GetIdentityProviders(ctx context.Context, token, realm string) (int, []*IdentityProviderRepresentation, error)
GetIdentityProviders returns list of identity providers in a realm
func (*GoKeycloak) GetIssuer ¶
func (g *GoKeycloak) GetIssuer(ctx context.Context, realm string) (int, *IssuerResponse, error)
GetIssuer gets the issuer of the given realm
func (*GoKeycloak) GetKeyStoreConfig ¶
func (g *GoKeycloak) GetKeyStoreConfig(ctx context.Context, token, realm string) (int, *KeyStoreConfig, error)
GetKeyStoreConfig get keystoreconfig of the realm
func (*GoKeycloak) GetPermission ¶
func (g *GoKeycloak) GetPermission(ctx context.Context, token, realm, idOfClient, permissionID string) (*PermissionRepresentation, error)
GetPermission returns a client's permission with the given id
func (*GoKeycloak) GetPermissionResources ¶
func (g *GoKeycloak) GetPermissionResources(ctx context.Context, token, realm, idOfClient, permissionID string) ([]*PermissionResource, error)
GetPermissionResources returns a client's resource attached for the given permission id
func (*GoKeycloak) GetPermissionScopes ¶
func (g *GoKeycloak) GetPermissionScopes(ctx context.Context, token, realm, idOfClient, permissionID string) ([]*PermissionScope, error)
GetPermissionScopes returns a client's scopes configured for the given permission id
func (*GoKeycloak) GetPermissions ¶
func (g *GoKeycloak) GetPermissions(ctx context.Context, token, realm, idOfClient string, params GetPermissionParams) ([]*PermissionRepresentation, error)
GetPermissions returns permissions associated with the client
func (*GoKeycloak) GetPolicies ¶
func (g *GoKeycloak) GetPolicies(ctx context.Context, token, realm, idOfClient string, params GetPolicyParams) ([]*PolicyRepresentation, error)
GetPolicies returns policies associated with the client
func (*GoKeycloak) GetPolicy ¶
func (g *GoKeycloak) GetPolicy(ctx context.Context, token, realm, idOfClient, policyID string) (*PolicyRepresentation, error)
GetPolicy returns a client's policy with the given id
func (*GoKeycloak) GetRawUserInfo ¶
func (g *GoKeycloak) GetRawUserInfo(ctx context.Context, accessToken, realm string) (int, map[string]interface{}, error)
GetRawUserInfo calls the UserInfo endpoint and returns a raw json object
func (*GoKeycloak) GetRealm ¶
func (g *GoKeycloak) GetRealm(ctx context.Context, token, realm string) (int, *RealmRepresentation, error)
GetRealm returns top-level representation of the realm
func (*GoKeycloak) GetRealmRole ¶
func (g *GoKeycloak) GetRealmRole(ctx context.Context, token, realm, roleName string) (int, *Role, error)
GetRealmRole returns a role from a realm by role's name
func (*GoKeycloak) GetRealmRoleByID ¶
func (g *GoKeycloak) GetRealmRoleByID(ctx context.Context, token, realm, roleID string) (int, *Role, error)
GetRealmRoleByID returns a role from a realm by role's ID
func (*GoKeycloak) GetRealmRoles ¶
func (g *GoKeycloak) GetRealmRoles(ctx context.Context, token, realm string, params GetRoleParams) (int, []*Role, error)
GetRealmRoles get all roles of the given realm.
func (*GoKeycloak) GetRealmRolesByGroupID ¶
func (g *GoKeycloak) GetRealmRolesByGroupID(ctx context.Context, token, realm, groupID string) (int, []*Role, error)
GetRealmRolesByGroupID returns all roles assigned to the given group
func (*GoKeycloak) GetRealmRolesByUserID ¶
func (g *GoKeycloak) GetRealmRolesByUserID(ctx context.Context, token, realm, userID string) (int, []*Role, error)
GetRealmRolesByUserID returns all roles assigned to the given user
func (*GoKeycloak) GetRealms ¶
func (g *GoKeycloak) GetRealms(ctx context.Context, token string) (int, []*RealmRepresentation, error)
GetRealms returns top-level representation of all realms
func (*GoKeycloak) GetRequest ¶
func (g *GoKeycloak) GetRequest(ctx context.Context) *resty.Request
GetRequest returns a request for calling endpoints.
func (*GoKeycloak) GetRequestWithBasicAuth ¶
func (g *GoKeycloak) GetRequestWithBasicAuth(ctx context.Context, clientID, clientSecret string) *resty.Request
GetRequestWithBasicAuth returns a form data base request configured with basic auth.
func (*GoKeycloak) GetRequestWithBearerAuth ¶
GetRequestWithBearerAuth returns a JSON base request configured with an auth token.
func (*GoKeycloak) GetRequestWithBearerAuthNoCache ¶
func (g *GoKeycloak) GetRequestWithBearerAuthNoCache(ctx context.Context, token string) *resty.Request
GetRequestWithBearerAuthNoCache returns a JSON base request configured with an auth token and no-cache header.
func (*GoKeycloak) GetRequestWithBearerAuthXMLHeader ¶
func (g *GoKeycloak) GetRequestWithBearerAuthXMLHeader(ctx context.Context, token string) *resty.Request
GetRequestWithBearerAuthXMLHeader returns an XML base request configured with an auth token.
func (*GoKeycloak) GetRequestingPartyPermissionDecision ¶
func (g *GoKeycloak) GetRequestingPartyPermissionDecision(ctx context.Context, token, realm string, options RequestingPartyTokenOptions) (int, *RequestingPartyPermissionDecision, error)
GetRequestingPartyPermissionDecision returns a requesting party permission decision granted by the server
func (*GoKeycloak) GetRequestingPartyPermissions ¶
func (g *GoKeycloak) GetRequestingPartyPermissions(ctx context.Context, token, realm string, options RequestingPartyTokenOptions) (int, *[]RequestingPartyPermission, error)
GetRequestingPartyPermissions returns a requesting party permissions granted by the server
func (*GoKeycloak) GetRequestingPartyToken ¶
func (g *GoKeycloak) GetRequestingPartyToken(ctx context.Context, token, realm string, options RequestingPartyTokenOptions) (int, *JWT, error)
URL: {{keycloak_url}}/realms/{{realm}}/protocol/openid-connect/token GetRequestingPartyToken returns a requesting party token with permissions granted by the server
func (*GoKeycloak) GetRequiredAction ¶
func (g *GoKeycloak) GetRequiredAction(ctx context.Context, token string, realm string, alias string) (int, *RequiredActionProviderRepresentation, error)
GetRequiredAction gets a required action for a given realm
func (*GoKeycloak) GetRequiredActions ¶
func (g *GoKeycloak) GetRequiredActions(ctx context.Context, token string, realm string) (int, []*RequiredActionProviderRepresentation, error)
GetRequiredActions gets a list of required actions for a given realm
func (*GoKeycloak) GetResource ¶
func (g *GoKeycloak) GetResource(ctx context.Context, token, realm, idOfClient, resourceID string) (int, *ResourceRepresentation, error)
GetResource returns a client's resource with the given id, using access token from admin
func (*GoKeycloak) GetResourceClient ¶
func (g *GoKeycloak) GetResourceClient(ctx context.Context, token, realm, resourceID string) (int, *ResourceRepresentation, error)
GetResourceClient returns a client's resource with the given id, using access token from client
func (*GoKeycloak) GetResourcePolicies ¶
func (g *GoKeycloak) 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 (*GoKeycloak) GetResourcePolicy ¶
func (g *GoKeycloak) 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 (*GoKeycloak) GetResources ¶
func (g *GoKeycloak) GetResources(ctx context.Context, token, realm, idOfClient string, params GetResourceParams) (int, []*ResourceRepresentation, error)
GetResources returns resources associated with the client, using access token from admin
func (*GoKeycloak) GetResourcesClient ¶
func (g *GoKeycloak) GetResourcesClient(ctx context.Context, token, realm string, params GetResourceParams) (int, []*ResourceRepresentation, error)
GetResourcesClient returns resources associated with the client, using access token from client
func (*GoKeycloak) GetRoleMappingByGroupID ¶
func (g *GoKeycloak) GetRoleMappingByGroupID(ctx context.Context, token, realm, groupID string) (int, *MappingsRepresentation, error)
GetRoleMappingByGroupID gets the role mappings by group
func (*GoKeycloak) GetRoleMappingByUserID ¶
func (g *GoKeycloak) GetRoleMappingByUserID(ctx context.Context, token, realm, userID string) (int, *MappingsRepresentation, error)
GetRoleMappingByUserID gets the role mappings by user
func (*GoKeycloak) GetScope ¶
func (g *GoKeycloak) GetScope(ctx context.Context, token, realm, idOfClient, scopeID string) (int, *ScopeRepresentation, error)
GetScope returns a client's scope with the given id
func (*GoKeycloak) GetScopes ¶
func (g *GoKeycloak) GetScopes(ctx context.Context, token, realm, idOfClient string, params GetScopeParams) (int, []*ScopeRepresentation, error)
GetScopes returns scopes associated with the client
func (*GoKeycloak) GetToken ¶
func (g *GoKeycloak) GetToken(ctx context.Context, realm string, options TokenOptions) (int, *JWT, error)
URL: {{keycloak_url}}/realms/{{realm}}/protocol/openid-connect/token GetToken uses TokenOptions to fetch a token.
func (*GoKeycloak) GetUserBruteForceDetectionStatus ¶
func (g *GoKeycloak) GetUserBruteForceDetectionStatus(ctx context.Context, accessToken, realm, userID string) (*BruteForceStatus, error)
GetUserBruteForceDetectionStatus fetches a user status regarding brute force protection
func (*GoKeycloak) GetUserByID ¶
func (g *GoKeycloak) GetUserByID(ctx context.Context, accessToken, realm, userID string) (int, *User, error)
GetUserByID fetches a user from the given realm with the given userID
func (*GoKeycloak) GetUserCount ¶
func (g *GoKeycloak) GetUserCount(ctx context.Context, token string, realm string, params GetUsersParams) (int, int, error)
GetUserCount gets the user count in the realm
func (*GoKeycloak) GetUserFederatedIdentities ¶
func (g *GoKeycloak) GetUserFederatedIdentities(ctx context.Context, token, realm, userID string) (int, []*FederatedIdentityRepresentation, error)
GetUserFederatedIdentities gets all user federated identities
func (*GoKeycloak) GetUserGroups ¶
func (g *GoKeycloak) GetUserGroups(ctx context.Context, token, realm, userID string, params GetGroupsParams) (int, []*Group, error)
GetUserGroups get all groups for user
func (*GoKeycloak) GetUserInfo ¶
func (g *GoKeycloak) GetUserInfo(ctx context.Context, accessToken, realm string) (int, *UserInfo, error)
GetUserInfo calls the UserInfo endpoint
func (*GoKeycloak) GetUserOfflineSessionsForClient ¶
func (g *GoKeycloak) GetUserOfflineSessionsForClient(ctx context.Context, token, realm, userID, idOfClient string) (int, []*UserSessionRepresentation, error)
GetUserOfflineSessionsForClient returns offline sessions associated with the user and client
func (*GoKeycloak) GetUserPermissions ¶
func (g *GoKeycloak) GetUserPermissions(ctx context.Context, token, realm string, params GetUserPermissionParams) ([]*PermissionGrantResponseRepresentation, error)
GetUserPermissions gets granted permissions according query parameters
func (*GoKeycloak) GetUserSessions ¶
func (g *GoKeycloak) GetUserSessions(ctx context.Context, token, realm, userID string) (int, []*UserSessionRepresentation, error)
GetUserSessions returns user sessions associated with the user
func (*GoKeycloak) GetUsers ¶
func (g *GoKeycloak) GetUsers(ctx context.Context, token, realm string, params GetUsersParams) (int, []*User, error)
GetUsers get all users in realm
func (*GoKeycloak) GetUsersByClientRoleName ¶
func (g *GoKeycloak) GetUsersByClientRoleName(ctx context.Context, token, realm, idOfClient, roleName string, params GetUsersByRoleParams) (int, []*User, error)
GetUsersByClientRoleName returns all users have a given client role
func (*GoKeycloak) GetUsersByRoleName ¶
func (g *GoKeycloak) GetUsersByRoleName(ctx context.Context, token, realm, roleName string, params GetUsersByRoleParams) (int, []*User, error)
GetUsersByRoleName returns all users have a given role
func (*GoKeycloak) GrantUserPermission ¶
func (g *GoKeycloak) 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 (*GoKeycloak) ImportIdentityProviderConfig ¶
func (g *GoKeycloak) ImportIdentityProviderConfig(ctx context.Context, token, realm, fromURL, providerID string) (int, map[string]string, error)
ImportIdentityProviderConfig parses and returns the identity provider config at a given URL
func (*GoKeycloak) ImportIdentityProviderConfigFromFile ¶
func (g *GoKeycloak) ImportIdentityProviderConfigFromFile(ctx context.Context, token, realm, providerID, fileName string, fileBody io.Reader) (int, map[string]string, error)
ImportIdentityProviderConfigFromFile parses and returns the identity provider config from a given file
func (*GoKeycloak) IntrospectToken ¶
func (g *GoKeycloak) IntrospectToken(ctx context.Context, accessToken, clientID, clientSecret, realm string) (int, *IntroSpectTokenResult, error)
----------------------------------------------------------------------------------
TOKEN
---------------------------------------------------------------------------------- RetrospectToken calls the openid-connect introspect endpoint
func (*GoKeycloak) Login ¶
func (g *GoKeycloak) Login(ctx context.Context, clientID, clientSecret, realm, username, password string) (int, *JWT, error)
Login performs a login with user credentials and a client
func (*GoKeycloak) LoginAdmin ¶
func (g *GoKeycloak) LoginAdmin(ctx context.Context, username, password, realm string) (int, *JWT, error)
LoginAdmin performs a login with Admin client
func (*GoKeycloak) LoginClient ¶
func (g *GoKeycloak) LoginClient(ctx context.Context, clientID, clientSecret, realm string) (int, *JWT, error)
LoginClient performs a login with client credentials
func (*GoKeycloak) LoginClientSignedJWT ¶
func (g *GoKeycloak) LoginClientSignedJWT( ctx context.Context, clientID, realm string, key interface{}, signedMethod jwt.SigningMethod, expiresAt *jwt.NumericDate, ) (int, *JWT, error)
LoginClientSignedJWT performs a login with client credentials and signed jwt claims
func (*GoKeycloak) LoginClientTokenExchange ¶
func (g *GoKeycloak) LoginClientTokenExchange(ctx context.Context, clientID, token, clientSecret, realm, targetClient, userID string) (int, *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 (*GoKeycloak) LoginOtp ¶
func (g *GoKeycloak) LoginOtp(ctx context.Context, clientID, clientSecret, realm, username, password, totp string) (int, *JWT, error)
LoginOtp performs a login with user credentials and otp token
func (*GoKeycloak) Logout ¶
func (g *GoKeycloak) Logout(ctx context.Context, clientID, clientSecret, realm, refreshToken string) (int, error)
Logout logs out users with refresh token
func (*GoKeycloak) LogoutAllSessions ¶
func (g *GoKeycloak) LogoutAllSessions(ctx context.Context, adminAccessToken, realm, userID string) (int, error)
LogoutAllSessions logs out all sessions of a user given an id.
func (*GoKeycloak) LogoutPublicClient ¶
func (g *GoKeycloak) LogoutPublicClient(ctx context.Context, clientID, realm, accessToken, refreshToken string) (int, error)
LogoutPublicClient performs a logout using a public client and the accessToken.
func (*GoKeycloak) LogoutUserSession ¶
func (g *GoKeycloak) LogoutUserSession(ctx context.Context, accessToken, realm, session string) (int, error)
LogoutUserSession logs out a single sessions of a user given a session id
func (*GoKeycloak) MoveCredentialBehind ¶
func (g *GoKeycloak) MoveCredentialBehind(ctx context.Context, token, realm, userID, credentialID, newPreviousCredentialID string) error
MoveCredentialBehind move a credential to a position behind another credential
func (*GoKeycloak) MoveCredentialToFirst ¶
func (g *GoKeycloak) 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 (*GoKeycloak) RefreshToken ¶
func (g *GoKeycloak) RefreshToken(ctx context.Context, refreshToken, clientID, clientSecret, realm string) (int, *JWT, error)
RefreshToken refreshes the given token. May return a *APIError with further details about the issue.
func (*GoKeycloak) RegenerateClientSecret ¶
func (g *GoKeycloak) RegenerateClientSecret(ctx context.Context, token, realm, idOfClient string) (int, *CredentialRepresentation, error)
RegenerateClientSecret triggers the creation of the new client secret.
func (*GoKeycloak) RegisterRequiredAction ¶
func (g *GoKeycloak) RegisterRequiredAction(ctx context.Context, token string, realm string, requiredAction RequiredActionProviderRepresentation) (int, error)
RegisterRequiredAction creates a required action for a given realm
func (*GoKeycloak) RemoveDefaultGroup ¶
func (g *GoKeycloak) RemoveDefaultGroup(ctx context.Context, token, realm, groupID string) error
RemoveDefaultGroup removes group from the list of default groups
func (*GoKeycloak) RemoveDefaultScopeFromClient ¶
func (g *GoKeycloak) RemoveDefaultScopeFromClient(ctx context.Context, token, realm, idOfClient, scopeID string) (int, error)
RemoveDefaultScopeFromClient removes a client scope from the list of client's default scopes
func (*GoKeycloak) RemoveOptionalScopeFromClient ¶
func (g *GoKeycloak) RemoveOptionalScopeFromClient(ctx context.Context, token, realm, idOfClient, scopeID string) (int, error)
RemoveOptionalScopeFromClient deletes a client scope from the list of client's optional scopes
func (*GoKeycloak) RestyClient ¶
func (g *GoKeycloak) RestyClient() *resty.Client
RestyClient returns the internal resty g. This can be used to configure the g.
func (*GoKeycloak) RevokeToken ¶
func (g *GoKeycloak) RevokeToken(ctx context.Context, realm, clientID, clientSecret, refreshToken string) (int, error)
RevokeToken revokes the passed token. The token can either be an access or refresh token.
func (*GoKeycloak) RevokeUserConsents ¶
func (g *GoKeycloak) RevokeUserConsents(ctx context.Context, accessToken, realm, userID, clientID string) (int, error)
RevokeUserConsents revokes the given user consent.
func (*GoKeycloak) SendVerifyEmail ¶
func (g *GoKeycloak) SendVerifyEmail(ctx context.Context, token, userID, realm string, params ...SendVerificationMailParams) (int, error)
SendVerifyEmail sends a verification e-mail to a user.
func (*GoKeycloak) SetPassword ¶
func (g *GoKeycloak) SetPassword(ctx context.Context, token, userID, realm, password string, temporary bool) (int, error)
SetPassword sets a new password for the user with the given id. Needs elevated privileges
func (*GoKeycloak) SetRestyClient ¶
func (g *GoKeycloak) SetRestyClient(restyClient *resty.Client)
SetRestyClient overwrites the internal resty g.
func (*GoKeycloak) UpdateAuthenticationExecution ¶
func (g *GoKeycloak) UpdateAuthenticationExecution(ctx context.Context, token, realm, flow string, execution ModifyAuthenticationExecutionRepresentation) (int, error)
UpdateAuthenticationExecution updates an authentication execution for the given flow in the given realm
func (*GoKeycloak) UpdateAuthenticationFlow ¶
func (g *GoKeycloak) UpdateAuthenticationFlow(ctx context.Context, token, realm string, flow AuthenticationFlowRepresentation, authenticationFlowID string) (int, *AuthenticationFlowRepresentation, error)
UpdateAuthenticationFlow a given Authentication Flow
func (*GoKeycloak) UpdateClient ¶
func (g *GoKeycloak) UpdateClient(ctx context.Context, token, realm string, updatedClient Client) (int, error)
UpdateClient updates the given Client
func (*GoKeycloak) UpdateClientProtocolMapper ¶
func (g *GoKeycloak) UpdateClientProtocolMapper(ctx context.Context, token, realm, idOfClient, mapperID string, mapper ProtocolMapperRepresentation) (int, error)
UpdateClientProtocolMapper updates a protocol mapper in client scope
func (*GoKeycloak) UpdateClientRepresentation ¶
func (g *GoKeycloak) UpdateClientRepresentation(ctx context.Context, accessToken, realm string, updatedClient Client) (int, *Client, error)
UpdateClientRepresentation updates the given client representation
func (*GoKeycloak) UpdateClientScope ¶
func (g *GoKeycloak) UpdateClientScope(ctx context.Context, token, realm string, scope ClientScope) (int, error)
UpdateClientScope updates the given client scope.
func (*GoKeycloak) UpdateClientScopeProtocolMapper ¶
func (g *GoKeycloak) UpdateClientScopeProtocolMapper(ctx context.Context, token, realm, scopeID string, protocolMapper ProtocolMappers) (int, error)
UpdateClientScopeProtocolMapper updates the given protocol mapper for a client scope
func (*GoKeycloak) UpdateComponent ¶
func (g *GoKeycloak) UpdateComponent(ctx context.Context, token, realm string, component Component) error
UpdateComponent updates the given component
func (*GoKeycloak) UpdateCredentialUserLabel ¶
func (g *GoKeycloak) UpdateCredentialUserLabel(ctx context.Context, token, realm, userID, credentialID, userLabel string) error
UpdateCredentialUserLabel updates label for the given credential for the given user
func (*GoKeycloak) UpdateGroup ¶
func (g *GoKeycloak) UpdateGroup(ctx context.Context, token, realm string, updatedGroup Group) (int, error)
UpdateGroup updates the given group.
func (*GoKeycloak) UpdateIdentityProvider ¶
func (g *GoKeycloak) UpdateIdentityProvider(ctx context.Context, token, realm, alias string, providerRep IdentityProviderRepresentation) (int, error)
UpdateIdentityProvider updates the identity provider in a realm
func (*GoKeycloak) UpdateIdentityProviderMapper ¶
func (g *GoKeycloak) UpdateIdentityProviderMapper(ctx context.Context, token, realm, alias string, mapper IdentityProviderMapper) (int, error)
UpdateIdentityProviderMapper updates mapper of an identity provider
func (*GoKeycloak) UpdatePermission ¶
func (g *GoKeycloak) UpdatePermission(ctx context.Context, token, realm, idOfClient string, permission PermissionRepresentation) error
UpdatePermission updates a permission associated with the client
func (*GoKeycloak) UpdatePolicy ¶
func (g *GoKeycloak) UpdatePolicy(ctx context.Context, token, realm, idOfClient string, policy PolicyRepresentation) error
UpdatePolicy updates a policy associated with the client
func (*GoKeycloak) UpdateRealm ¶
func (g *GoKeycloak) UpdateRealm(ctx context.Context, token string, realm RealmRepresentation) (int, error)
UpdateRealm updates a given realm
func (*GoKeycloak) UpdateRealmRole ¶
func (g *GoKeycloak) UpdateRealmRole(ctx context.Context, token, realm, roleName string, role Role) (int, error)
UpdateRealmRole updates a role in a realm
func (*GoKeycloak) UpdateRealmRoleByID ¶
func (g *GoKeycloak) UpdateRealmRoleByID(ctx context.Context, token, realm, roleID string, role Role) (int, error)
UpdateRealmRoleByID updates a role in a realm by role's ID
func (*GoKeycloak) UpdateRequiredAction ¶
func (g *GoKeycloak) UpdateRequiredAction(ctx context.Context, token string, realm string, requiredAction RequiredActionProviderRepresentation) (int, error)
UpdateRequiredAction updates a required action for a given realm
func (*GoKeycloak) UpdateResource ¶
func (g *GoKeycloak) UpdateResource(ctx context.Context, token, realm, idOfClient string, resource ResourceRepresentation) (int, error)
UpdateResource updates a resource associated with the client, using access token from admin
func (*GoKeycloak) UpdateResourceClient ¶
func (g *GoKeycloak) UpdateResourceClient(ctx context.Context, token, realm string, resource ResourceRepresentation) (int, error)
UpdateResourceClient updates a resource associated with the client, using access token from client
func (*GoKeycloak) UpdateResourcePolicy ¶
func (g *GoKeycloak) 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 (*GoKeycloak) UpdateRole ¶
func (g *GoKeycloak) UpdateRole(ctx context.Context, token, realm, idOfClient string, role Role) (int, error)
UpdateRole updates the given role.
func (*GoKeycloak) UpdateScope ¶
func (g *GoKeycloak) UpdateScope(ctx context.Context, token, realm, idOfClient string, scope ScopeRepresentation) (int, error)
UpdateScope updates a scope associated with the client
func (*GoKeycloak) UpdateUser ¶
UpdateUser updates a given user
func (*GoKeycloak) UpdateUserPermission ¶
func (g *GoKeycloak) 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
type GroupDefinition ¶
type GroupDefinition struct {
ID *string `json:"id,omitempty"`
Path *string `json:"path,omitempty"`
ExtendChildren *bool `json:"extendChildren,omitempty"`
}
GroupDefinition represents a group in a GroupPolicyRepresentation
func (*GroupDefinition) String ¶
func (v *GroupDefinition) String() string
type GroupPolicyRepresentation ¶
type GroupPolicyRepresentation struct {
Groups *[]GroupDefinition `json:"groups,omitempty"`
GroupsClaim *string `json:"groupsClaim,omitempty"`
}
GroupPolicyRepresentation represents group based policies
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 ¶
func (v *IdentityProviderRepresentation) String() 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"`
}
JSPolicyRepresentation represents js based policies
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
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 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 ¶
func (v *PermissionGrantResponseRepresentation) String() string
type PermissionRepresentation ¶
type PermissionRepresentation struct {
DecisionStrategy *DecisionStrategy `json:"decisionStrategy,omitempty"`
Description *string `json:"description,omitempty"`
ID *string `json:"id,omitempty"`
Logic *Logic `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 ¶
func (v *PermissionTicketDescriptionRepresentation) String() 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 ¶
func (v *PermissionTicketPermissionRepresentation) String() string
type PermissionTicketRepresentation ¶
type PermissionTicketRepresentation struct {
AZP *string `json:"azp,omitempty"`
Claims *map[string][]string `json:"claims,omitempty"`
Permissions *[]PermissionTicketPermissionRepresentation `json:"permissions,omitempty"`
jwt.StandardClaims
}
PermissionTicketRepresentation represents the permission ticket contents
func (*PermissionTicketRepresentation) String ¶
func (v *PermissionTicketRepresentation) String() string
type PermissionTicketResponseRepresentation ¶
type PermissionTicketResponseRepresentation struct {
Ticket *string `json:"ticket,omitempty"`
}
PermissionTicketResponseRepresentation represents the keycloak response containing the permission ticket
func (*PermissionTicketResponseRepresentation) String ¶
func (v *PermissionTicketResponseRepresentation) String() 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"`
DecisionStrategy *DecisionStrategy `json:"decisionStrategy,omitempty"`
Description *string `json:"description,omitempty"`
ID *string `json:"id,omitempty"`
Logic *Logic `json:"logic,omitempty"`
Name *string `json:"name,omitempty"`
Owner *string `json:"owner,omitempty"`
Policies *[]string `json:"policies,omitempty"`
Resources *[]string `json:"resources,omitempty"`
Scopes *[]string `json:"scopes,omitempty"`
Type *string `json:"type,omitempty"`
RolePolicyRepresentation
JSPolicyRepresentation
ClientPolicyRepresentation
TimePolicyRepresentation
UserPolicyRepresentation
AggregatedPolicyRepresentation
GroupPolicyRepresentation
}
PolicyRepresentation is a representation of a Policy
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 ProtocolMapperRepresentation ¶
type ProtocolMapperRepresentation struct {
Config *map[string]string `json:"config,omitempty"`
ID *string `json:"id,omitempty"`
Name *string `json:"name,omitempty"`
Protocol *string `json:"protocol,omitempty"`
ProtocolMapper *string `json:"protocolMapper,omitempty"`
ConsentRequired *bool `json:"consentRequired,omitempty"`
}
ProtocolMapperRepresentation represents....
func (*ProtocolMapperRepresentation) String ¶
func (v *ProtocolMapperRepresentation) 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 ProtocolMappers ¶
type ProtocolMappers struct {
ID *string `json:"id,omitempty"`
Name *string `json:"name,omitempty"`
Protocol *string `json:"protocol,omitempty"`
ProtocolMapper *string `json:"protocolMapper,omitempty"`
ConsentRequired *bool `json:"consentRequired,omitempty"`
ProtocolMappersConfig *ProtocolMappersConfig `json:"config,omitempty"`
}
ProtocolMappers are protocolmappers
func (*ProtocolMappers) String ¶
func (v *ProtocolMappers) String() string
type ProtocolMappersConfig ¶
type ProtocolMappersConfig struct {
UserinfoTokenClaim *string `json:"userinfo.token.claim,omitempty"`
UserAttribute *string `json:"user.attribute,omitempty"`
IDTokenClaim *string `json:"id.token.claim,omitempty"`
AccessTokenClaim *string `json:"access.token.claim,omitempty"`
ClaimName *string `json:"claim.name,omitempty"`
ClaimValue *string `json:"claim.value,omitempty"`
JSONTypeLabel *string `json:"jsonType.label,omitempty"`
Multivalued *string `json:"multivalued,omitempty"`
UsermodelClientRoleMappingClientID *string `json:"usermodel.clientRoleMapping.clientId,omitempty"`
IncludedClientAudience *string `json:"included.client.audience,omitempty"`
FullPath *string `json:"full.path,omitempty"`
AttributeName *string `json:"attribute.name,omitempty"`
AttributeNameFormat *string `json:"attribute.nameformat,omitempty"`
Single *string `json:"single,omitempty"`
}
ProtocolMappersConfig is a config of a protocol mapper
func (*ProtocolMappersConfig) String ¶
func (v *ProtocolMappersConfig) String() string
type RealmRepresentation ¶
type RealmRepresentation struct {
AccessCodeLifespan *int `json:"accessCodeLifespan,omitempty"`
AccessCodeLifespanLogin *int `json:"accessCodeLifespanLogin,omitempty"`
AccessCodeLifespanUserAction *int `json:"accessCodeLifespanUserAction,omitempty"`
AccessTokenLifespan *int `json:"accessTokenLifespan,omitempty"`
AccessTokenLifespanForImplicitFlow *int `json:"accessTokenLifespanForImplicitFlow,omitempty"`
AccountTheme *string `json:"accountTheme,omitempty"`
ActionTokenGeneratedByAdminLifespan *int `json:"actionTokenGeneratedByAdminLifespan,omitempty"`
ActionTokenGeneratedByUserLifespan *int `json:"actionTokenGeneratedByUserLifespan,omitempty"`
AdminEventsDetailsEnabled *bool `json:"adminEventsDetailsEnabled,omitempty"`
AdminEventsEnabled *bool `json:"adminEventsEnabled,omitempty"`
AdminTheme *string `json:"adminTheme,omitempty"`
Attributes *map[string]string `json:"attributes,omitempty"`
AuthenticationFlows *[]interface{} `json:"authenticationFlows,omitempty"`
AuthenticatorConfig *[]interface{} `json:"authenticatorConfig,omitempty"`
BrowserFlow *string `json:"browserFlow,omitempty"`
BrowserSecurityHeaders *map[string]string `json:"browserSecurityHeaders,omitempty"`
BruteForceProtected *bool `json:"bruteForceProtected,omitempty"`
ClientAuthenticationFlow *string `json:"clientAuthenticationFlow,omitempty"`
ClientScopeMappings *map[string]string `json:"clientScopeMappings,omitempty"`
ClientScopes *[]ClientScope `json:"clientScopes,omitempty"`
Clients *[]Client `json:"clients,omitempty"`
Components interface{} `json:"components,omitempty"`
DefaultDefaultClientScopes *[]string `json:"defaultDefaultClientScopes,omitempty"`
DefaultGroups *[]string `json:"defaultGroups,omitempty"`
DefaultLocale *string `json:"defaultLocale,omitempty"`
DefaultOptionalClientScopes *[]string `json:"defaultOptionalClientScopes,omitempty"`
DefaultRole *Role `json:"defaultRole,omitempty"`
DefaultRoles *[]string `json:"defaultRoles,omitempty"`
DefaultSignatureAlgorithm *string `json:"defaultSignatureAlgorithm,omitempty"`
DirectGrantFlow *string `json:"directGrantFlow,omitempty"`
DisplayName *string `json:"displayName,omitempty"`
DisplayNameHTML *string `json:"displayNameHtml,omitempty"`
DockerAuthenticationFlow *string `json:"dockerAuthenticationFlow,omitempty"`
DuplicateEmailsAllowed *bool `json:"duplicateEmailsAllowed,omitempty"`
EditUsernameAllowed *bool `json:"editUsernameAllowed,omitempty"`
EmailTheme *string `json:"emailTheme,omitempty"`
Enabled *bool `json:"enabled,omitempty"`
EnabledEventTypes *[]string `json:"enabledEventTypes,omitempty"`
EventsEnabled *bool `json:"eventsEnabled,omitempty"`
EventsExpiration *int64 `json:"eventsExpiration,omitempty"`
EventsListeners *[]string `json:"eventsListeners,omitempty"`
FailureFactor *int `json:"failureFactor,omitempty"`
FederatedUsers *[]interface{} `json:"federatedUsers,omitempty"`
Groups *[]interface{} `json:"groups,omitempty"`
ID *string `json:"id,omitempty"`
IdentityProviderMappers *[]interface{} `json:"identityProviderMappers,omitempty"`
IdentityProviders *[]interface{} `json:"identityProviders,omitempty"`
InternationalizationEnabled *bool `json:"internationalizationEnabled,omitempty"`
KeycloakVersion *string `json:"keycloakVersion,omitempty"`
LoginTheme *string `json:"loginTheme,omitempty"`
LoginWithEmailAllowed *bool `json:"loginWithEmailAllowed,omitempty"`
MaxDeltaTimeSeconds *int `json:"maxDeltaTimeSeconds,omitempty"`
MaxFailureWaitSeconds *int `json:"maxFailureWaitSeconds,omitempty"`
MinimumQuickLoginWaitSeconds *int `json:"minimumQuickLoginWaitSeconds,omitempty"`
NotBefore *int `json:"notBefore,omitempty"`
OfflineSessionIdleTimeout *int `json:"offlineSessionIdleTimeout,omitempty"`
OfflineSessionMaxLifespan *int `json:"offlineSessionMaxLifespan,omitempty"`
OfflineSessionMaxLifespanEnabled *bool `json:"offlineSessionMaxLifespanEnabled,omitempty"`
OtpPolicyAlgorithm *string `json:"otpPolicyAlgorithm,omitempty"`
OtpPolicyDigits *int `json:"otpPolicyDigits,omitempty"`
OtpPolicyInitialCounter *int `json:"otpPolicyInitialCounter,omitempty"`
OtpPolicyLookAheadWindow *int `json:"otpPolicyLookAheadWindow,omitempty"`
OtpPolicyPeriod *int `json:"otpPolicyPeriod,omitempty"`
OtpPolicyType *string `json:"otpPolicyType,omitempty"`
OtpSupportedApplications *[]string `json:"otpSupportedApplications,omitempty"`
PasswordPolicy *string `json:"passwordPolicy,omitempty"`
PermanentLockout *bool `json:"permanentLockout,omitempty"`
ProtocolMappers *[]interface{} `json:"protocolMappers,omitempty"`
QuickLoginCheckMilliSeconds *int64 `json:"quickLoginCheckMilliSeconds,omitempty"`
Realm *string `json:"realm,omitempty"`
RefreshTokenMaxReuse *int `json:"refreshTokenMaxReuse,omitempty"`
RegistrationAllowed *bool `json:"registrationAllowed,omitempty"`
RegistrationEmailAsUsername *bool `json:"registrationEmailAsUsername,omitempty"`
RegistrationFlow *string `json:"registrationFlow,omitempty"`
RememberMe *bool `json:"rememberMe,omitempty"`
RequiredActions *[]interface{} `json:"requiredActions,omitempty"`
ResetCredentialsFlow *string `json:"resetCredentialsFlow,omitempty"`
ResetPasswordAllowed *bool `json:"resetPasswordAllowed,omitempty"`
RevokeRefreshToken *bool `json:"revokeRefreshToken,omitempty"`
Roles *RolesRepresentation `json:"roles,omitempty"`
ScopeMappings *[]interface{} `json:"scopeMappings,omitempty"`
SMTPServer *map[string]string `json:"smtpServer,omitempty"`
SslRequired *string `json:"sslRequired,omitempty"`
SsoSessionIdleTimeout *int `json:"ssoSessionIdleTimeout,omitempty"`
SsoSessionIdleTimeoutRememberMe *int `json:"ssoSessionIdleTimeoutRememberMe,omitempty"`
SsoSessionMaxLifespan *int `json:"ssoSessionMaxLifespan,omitempty"`
SsoSessionMaxLifespanRememberMe *int `json:"ssoSessionMaxLifespanRememberMe,omitempty"`
SupportedLocales *[]string `json:"supportedLocales,omitempty"`
UserFederationMappers *[]interface{} `json:"userFederationMappers,omitempty"`
UserFederationProviders *[]interface{} `json:"userFederationProviders,omitempty"`
UserManagedAccessAllowed *bool `json:"userManagedAccessAllowed,omitempty"`
Users *[]User `json:"users,omitempty"`
VerifyEmail *bool `json:"verifyEmail,omitempty"`
WaitIncrementSeconds *int `json:"waitIncrementSeconds,omitempty"`
WebAuthnPolicyAcceptableAaguids *[]string `json:"webAuthnPolicyAcceptableAaguids,omitempty"`
WebAuthnPolicyAttestationConveyancePreference *string `json:"webAuthnPolicyAttestationConveyancePreference,omitempty"`
WebAuthnPolicyAuthenticatorAttachment *string `json:"webAuthnPolicyAuthenticatorAttachment,omitempty"`
WebAuthnPolicyAvoidSameAuthenticatorRegister *bool `json:"webAuthnPolicyAvoidSameAuthenticatorRegister,omitempty"`
WebAuthnPolicyCreateTimeout *int `json:"webAuthnPolicyCreateTimeout,omitempty"`
WebAuthnPolicyPasswordlessAcceptableAaguids *[]string `json:"webAuthnPolicyPasswordlessAcceptableAaguids,omitempty"`
WebAuthnPolicyPasswordlessAttestationConveyancePreference *string `json:"webAuthnPolicyPasswordlessAttestationConveyancePreference,omitempty"`
WebAuthnPolicyPasswordlessAuthenticatorAttachment *string `json:"webAuthnPolicyPasswordlessAuthenticatorAttachment,omitempty"`
WebAuthnPolicyPasswordlessAvoidSameAuthenticatorRegister *bool `json:"webAuthnPolicyPasswordlessAvoidSameAuthenticatorRegister,omitempty"`
WebAuthnPolicyPasswordlessCreateTimeout *int `json:"webAuthnPolicyPasswordlessCreateTimeout,omitempty"`
WebAuthnPolicyPasswordlessRequireResidentKey *string `json:"webAuthnPolicyPasswordlessRequireResidentKey,omitempty"`
WebAuthnPolicyPasswordlessRpEntityName *string `json:"webAuthnPolicyPasswordlessRpEntityName,omitempty"`
WebAuthnPolicyPasswordlessRpID *string `json:"webAuthnPolicyPasswordlessRpId,omitempty"`
WebAuthnPolicyPasswordlessSignatureAlgorithms *[]string `json:"webAuthnPolicyPasswordlessSignatureAlgorithms,omitempty"`
WebAuthnPolicyPasswordlessUserVerificationRequirement *string `json:"webAuthnPolicyPasswordlessUserVerificationRequirement,omitempty"`
WebAuthnPolicyRequireResidentKey *string `json:"webAuthnPolicyRequireResidentKey,omitempty"`
WebAuthnPolicyRpEntityName *string `json:"webAuthnPolicyRpEntityName,omitempty"`
WebAuthnPolicyRpID *string `json:"webAuthnPolicyRpId,omitempty"`
WebAuthnPolicySignatureAlgorithms *[]string `json:"webAuthnPolicySignatureAlgorithms,omitempty"`
WebAuthnPolicyUserVerificationRequirement *string `json:"webAuthnPolicyUserVerificationRequirement,omitempty"`
}
RealmRepresentation represents a realm
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 ¶
func (v *RequiredActionProviderRepresentation) String() string
type ResourceOwnerRepresentation ¶
type ResourceOwnerRepresentation struct {
ID *string `json:"id,omitempty"`
Name *string `json:"name,omitempty"`
}
ResourceOwnerRepresentation represents a resource's owner
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 *Logic `json:"logic,omitempty"`
DecisionStrategy *DecisionStrategy `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 ¶
func (v *ResourcePolicyRepresentation) String() string
type ResourceRepresentation ¶
type ResourceRepresentation struct {
ID *string `json:"_id,omitempty"` // TODO: is marked "_optional" in template, input error or deliberate?
Attributes *map[string][]string `json:"attributes,omitempty"`
DisplayName *string `json:"displayName,omitempty"`
IconURI *string `json:"icon_uri,omitempty"` // TODO: With "_" because that's how it's written down in the template
Name *string `json:"name,omitempty"`
Owner *ResourceOwnerRepresentation `json:"owner,omitempty"`
OwnerManagedAccess *bool `json:"ownerManagedAccess,omitempty"`
ResourceScopes *[]ScopeRepresentation `json:"resource_scopes,omitempty"`
Scopes *[]ScopeRepresentation `json:"scopes,omitempty"`
Type *string `json:"type,omitempty"`
URIs *[]string `json:"uris,omitempty"`
}
ResourceRepresentation is a representation of a Resource
func (*ResourceRepresentation) String ¶
func (v *ResourceRepresentation) String() string
type ResourceServerRepresentation ¶
type ResourceServerRepresentation struct {
AllowRemoteResourceManagement *bool `json:"allowRemoteResourceManagement,omitempty"`
ClientID *string `json:"clientId,omitempty"`
ID *string `json:"id,omitempty"`
Name *string `json:"name,omitempty"`
Policies *[]PolicyRepresentation `json:"policies,omitempty"`
PolicyEnforcementMode *PolicyEnforcementMode `json:"policyEnforcementMode,omitempty"`
Resources *[]ResourceRepresentation `json:"resources,omitempty"`
Scopes *[]ScopeRepresentation `json:"scopes,omitempty"`
DecisionStrategy *DecisionStrategy `json:"decisionStrategy,omitempty"`
}
ResourceServerRepresentation represents the resources of a Server
func (*ResourceServerRepresentation) String ¶
func (v *ResourceServerRepresentation) String() string
type Role ¶
type Role struct {
ID *string `json:"id,omitempty"`
Name *string `json:"name,omitempty"`
ScopeParamRequired *bool `json:"scopeParamRequired,omitempty"`
Composite *bool `json:"composite,omitempty"`
Composites *CompositesRepresentation `json:"composites,omitempty"`
ClientRole *bool `json:"clientRole,omitempty"`
ContainerID *string `json:"containerId,omitempty"`
Description *string `json:"description,omitempty"`
Attributes *map[string][]string `json:"attributes,omitempty"`
}
Role is a role
type RoleDefinition ¶
type RoleDefinition struct {
ID *string `json:"id,omitempty"`
Private *bool `json:"private,omitempty"`
Required *bool `json:"required,omitempty"`
}
RoleDefinition represents a role in a RolePolicyRepresentation
func (*RoleDefinition) String ¶
func (v *RoleDefinition) String() string
type RolePolicyRepresentation ¶
type RolePolicyRepresentation struct {
Roles *[]RoleDefinition `json:"roles,omitempty"`
}
RolePolicyRepresentation represents role based policies
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"`
IconURI *string `json:"iconUri,omitempty"`
ID *string `json:"id,omitempty"`
Name *string `json:"name,omitempty"`
Policies *[]PolicyRepresentation `json:"policies,omitempty"`
Resources *[]ResourceRepresentation `json:"resources,omitempty"`
}
ScopeRepresentation is a represents a Scope
func (*ScopeRepresentation) String ¶
func (v *ScopeRepresentation) String() string
type SendVerificationMailParams ¶
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 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"`
NotOnOrAfter *string `json:"notOnOrAfter,omitempty"`
DayMonth *string `json:"dayMonth,omitempty"`
DayMonthEnd *string `json:"dayMonthEnd,omitempty"`
Month *string `json:"month,omitempty"`
MonthEnd *string `json:"monthEnd,omitempty"`
Year *string `json:"year,omitempty"`
YearEnd *string `json:"yearEnd,omitempty"`
Hour *string `json:"hour,omitempty"`
HourEnd *string `json:"hourEnd,omitempty"`
Minute *string `json:"minute,omitempty"`
MinuteEnd *string `json:"minuteEnd,omitempty"`
}
TimePolicyRepresentation represents time based policies
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
type UserGroup ¶
type UserGroup struct {
ID *string `json:"id,omitempty"`
Name *string `json:"name,omitempty"`
Path *string `json:"path,omitempty"`
}
UserGroup is a UserGroup
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
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"`
}
UserPolicyRepresentation represents user based policies
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