Package org.keycloak.models.utils
Class RepresentationToModel
- java.lang.Object
-
- org.keycloak.models.utils.RepresentationToModel
-
public class RepresentationToModel extends Object
-
-
Constructor Summary
Constructors Constructor Description RepresentationToModel()
-
Method Summary
-
-
-
Field Detail
-
OIDC
public static final String OIDC
- See Also:
- Constant Field Values
-
-
Method Detail
-
importRealm
public static void importRealm(KeycloakSession session, RealmRepresentation rep, RealmModel newRealm, boolean skipUserDependent)
-
importRoles
public static void importRoles(RolesRepresentation realmRoles, RealmModel realm)
-
importGroup
public static void importGroup(RealmModel realm, GroupModel parent, GroupRepresentation group)
-
updateRealm
public static void updateRealm(RealmRepresentation rep, RealmModel realm, KeycloakSession session)
-
createRole
public static RoleModel createRole(RealmModel newRealm, RoleRepresentation roleRep)
-
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
public static void updateClientProtocolMappers(ClientRepresentation rep, ClientModel resource)
-
createClientScope
public static ClientScopeModel createClientScope(KeycloakSession session, RealmModel realm, ClientScopeRepresentation resourceRep)
-
updateClientScope
public static void updateClientScope(ClientScopeRepresentation rep, ClientScopeModel resource)
-
createUser
public static UserModel createUser(KeycloakSession session, RealmModel newRealm, UserRepresentation userRep)
-
createGroups
public static void createGroups(UserRepresentation userRep, RealmModel newRealm, UserModel user)
-
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
public static CredentialModel toModel(CredentialRepresentation cred)
-
createRoleMappings
public static void createRoleMappings(UserRepresentation userRep, UserModel user, RealmModel realm)
-
toModel
public static IdentityProviderModel toModel(RealmModel realm, IdentityProviderRepresentation representation, KeycloakSession session)
-
toModel
public static ProtocolMapperModel toModel(ProtocolMapperRepresentation rep)
-
toModel
public static IdentityProviderMapperModel toModel(IdentityProviderMapperRepresentation rep)
-
toModel
public static UserConsentModel toModel(RealmModel newRealm, UserConsentRepresentation consentRep)
-
toModel
public static AuthenticationFlowModel toModel(AuthenticationFlowRepresentation rep)
-
toModel
public static AuthenticationExecutionModel toModel(RealmModel realm, AuthenticationExecutionRepresentation rep)
-
toModel
public static AuthenticatorConfigModel toModel(AuthenticatorConfigRepresentation rep)
-
toModel
public static ComponentModel toModel(KeycloakSession session, ComponentRepresentation rep)
-
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)
-
createResourceServer
public static ResourceServer createResourceServer(ClientModel client, KeycloakSession session, boolean addDefaultRoles)
-
-