Package org.keycloak.models.utils
Class RepresentationToModel
java.lang.Object
org.keycloak.models.utils.RepresentationToModel
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ClientModel
createClient
(KeycloakSession session, RealmModel realm, ClientRepresentation resourceRep) Does not create scope or role mappings!static ClientModel
createClient
(KeycloakSession session, RealmModel realm, ClientRepresentation resourceRep, Map<String, String> mappedFlows) static ClientScopeModel
createClientScope
(KeycloakSession session, RealmModel realm, ClientScopeRepresentation resourceRep) static void
createCredentials
(UserRepresentation userRep, KeycloakSession session, RealmModel realm, UserModel user, boolean adminRequest) static void
createFederatedIdentities
(UserRepresentation userRep, KeycloakSession session, RealmModel realm, UserModel user) static void
createGroups
(UserRepresentation userRep, RealmModel newRealm, UserModel user) static ResourceServer
createResourceServer
(ClientModel client, KeycloakSession session, boolean addDefaultRoles) static RoleModel
createRole
(RealmModel newRealm, RoleRepresentation roleRep) static void
createRoleMappings
(UserRepresentation userRep, UserModel user, RealmModel realm) static UserModel
createUser
(KeycloakSession session, RealmModel newRealm, UserRepresentation userRep) static void
importAuthorizationSettings
(ClientRepresentation clientRepresentation, ClientModel client, KeycloakSession session) static void
importGroup
(RealmModel realm, GroupModel parent, GroupRepresentation group) static void
importRealm
(KeycloakSession session, RealmRepresentation rep, RealmModel newRealm, boolean skipUserDependent) static void
importRoles
(RolesRepresentation realmRoles, RealmModel realm) removeEmptyString
(Map<String, String> map) static AuthenticationExecutionModel
toModel
(KeycloakSession session, RealmModel realm, AuthenticationExecutionRepresentation rep) static ComponentModel
toModel
(KeycloakSession session, ComponentRepresentation rep) static IdentityProviderModel
toModel
(RealmModel realm, IdentityProviderRepresentation representation, KeycloakSession session) static UserConsentModel
toModel
(RealmModel newRealm, UserConsentRepresentation consentRep) static AuthenticationFlowModel
static AuthenticatorConfigModel
static Policy
toModel
(AbstractPolicyRepresentation representation, AuthorizationProvider authorization, Policy model) static PermissionTicket
toModel
(PermissionTicketRepresentation representation, ResourceServer resourceServer, AuthorizationProvider authorization) static Resource
toModel
(ResourceRepresentation resource, ResourceServer resourceServer, AuthorizationProvider authorization) static ResourceServer
toModel
(ResourceServerRepresentation rep, AuthorizationProvider authorization, ClientModel client) static Scope
toModel
(ScopeRepresentation scope, ResourceServer resourceServer, AuthorizationProvider authorization) static Scope
toModel
(ScopeRepresentation scope, ResourceServer resourceServer, AuthorizationProvider authorization, boolean updateIfExists) static CredentialModel
static IdentityProviderMapperModel
static ProtocolMapperModel
static void
updateClient
(ClientRepresentation rep, ClientModel resource, KeycloakSession session) static void
updateClientProtocolMappers
(ClientRepresentation rep, ClientModel resource) static void
updateClientScope
(ClientScopeRepresentation rep, ClientScopeModel resource) static void
updateComponent
(KeycloakSession session, ComponentRepresentation rep, ComponentModel component, boolean internal) static void
updateRealm
(RealmRepresentation rep, RealmModel realm, KeycloakSession session)
-
Field Details
-
OIDC
- See Also:
-
-
Constructor Details
-
RepresentationToModel
public RepresentationToModel()
-
-
Method Details
-
importRealm
public static void importRealm(KeycloakSession session, RealmRepresentation rep, RealmModel newRealm, boolean skipUserDependent) -
importRoles
-
importGroup
-
updateRealm
-
createRole
-
createClient
public static ClientModel createClient(KeycloakSession session, RealmModel realm, ClientRepresentation resourceRep) Does not create scope or role mappings!- Parameters:
realm
-resourceRep
-- Returns:
-
createClient
public static ClientModel createClient(KeycloakSession session, RealmModel realm, ClientRepresentation resourceRep, Map<String, String> mappedFlows) -
updateClient
public static void updateClient(ClientRepresentation rep, ClientModel resource, KeycloakSession session) -
updateClientProtocolMappers
-
createClientScope
public static ClientScopeModel createClientScope(KeycloakSession session, RealmModel realm, ClientScopeRepresentation resourceRep) -
updateClientScope
-
createUser
public static UserModel createUser(KeycloakSession session, RealmModel newRealm, UserRepresentation userRep) -
createGroups
-
createFederatedIdentities
public static void createFederatedIdentities(UserRepresentation userRep, KeycloakSession session, RealmModel realm, UserModel user) -
createCredentials
public static void createCredentials(UserRepresentation userRep, KeycloakSession session, RealmModel realm, UserModel user, boolean adminRequest) -
toModel
-
createRoleMappings
-
toModel
public static IdentityProviderModel toModel(RealmModel realm, IdentityProviderRepresentation representation, KeycloakSession session) -
toModel
-
toModel
-
toModel
-
toModel
-
toModel
public static AuthenticationExecutionModel toModel(KeycloakSession session, RealmModel realm, AuthenticationExecutionRepresentation rep) -
toModel
-
toModel
-
updateComponent
public static void updateComponent(KeycloakSession session, ComponentRepresentation rep, ComponentModel component, boolean internal) -
importAuthorizationSettings
public static void importAuthorizationSettings(ClientRepresentation clientRepresentation, ClientModel client, KeycloakSession session) -
toModel
public static ResourceServer toModel(ResourceServerRepresentation rep, AuthorizationProvider authorization, ClientModel client) -
toModel
public static Policy toModel(AbstractPolicyRepresentation representation, AuthorizationProvider authorization, Policy model) -
toModel
public static Resource toModel(ResourceRepresentation resource, ResourceServer resourceServer, AuthorizationProvider authorization) -
toModel
public static Scope toModel(ScopeRepresentation scope, ResourceServer resourceServer, AuthorizationProvider authorization) -
toModel
public static Scope toModel(ScopeRepresentation scope, ResourceServer resourceServer, AuthorizationProvider authorization, boolean updateIfExists) -
toModel
public static PermissionTicket toModel(PermissionTicketRepresentation representation, ResourceServer resourceServer, AuthorizationProvider authorization) -
removeEmptyString
-
createResourceServer
public static ResourceServer createResourceServer(ClientModel client, KeycloakSession session, boolean addDefaultRoles)
-