public class DefaultClientPolicyManager extends Object implements ClientPolicyManager
| Modifier and Type | Field and Description |
|---|---|
static String |
CLIENT_POLICIES |
static String |
CLIENT_PROFILES |
| Constructor and Description |
|---|
DefaultClientPolicyManager(KeycloakSession session) |
| Modifier and Type | Method and Description |
|---|---|
String |
getClientPolicies(RealmModel realm)
when getting client policies via Admin REST API, returns the existing client policies set on the realm.
|
String |
getClientPoliciesJsonString(RealmModel realm)
returns the json representation of the client policies set on the realm.
|
String |
getClientPoliciesOnKeycloakApp()
returns the json representation of the builtin client policies set on keycloak application.
|
String |
getClientProfiles(RealmModel realm)
when getting client profiles via Admin REST API, returns the existing client profiles set on the realm.
|
String |
getClientProfilesJsonString(RealmModel realm)
returns the json representation of the client profiles set on the realm.
|
String |
getClientProfilesOnKeycloakApp()
returns the json representation of the builtin client profiles set on keycloak application.
|
void |
setupClientPoliciesOnCreatedRealm(RealmModel realm)
when creating a realm, reads the builtin client profiles and policies
that have already been set on keycloak application on booting keycloak and put them onto the realm as its attribute.
|
void |
setupClientPoliciesOnExportingRealm(RealmModel realm,
RealmRepresentation rep)
when exporting realm the realm, prepares the exported representation of the client profiles and policies.
|
void |
setupClientPoliciesOnImportedRealm(RealmModel realm,
RealmRepresentation rep)
when importing a realm, reads the builtin client profiles and policies
that have already been set on keycloak application on booting keycloak and override them
with ones loaded from the imported realm json file.
|
void |
setupClientPoliciesOnKeycloakApp(String profilesFilePath,
String policiesFilePath)
when booting keycloak, reads json representations of the builtin client profiles and policies from files
enclosed in keycloak-services jar file and put them onto the keycloak application.
|
void |
triggerOnEvent(ClientPolicyContext context)
execute a method for handling an event defined in
ClientPolicyEvent. |
void |
updateClientPolicies(RealmModel realm,
String json)
when updating client policies via Admin REST API, reads the json representation of the client policies
and overrides the existing client policies set on the realm with them.
|
void |
updateClientProfiles(RealmModel realm,
String json)
when updating client profiles via Admin REST API, reads the json representation of the client profiles
and overrides the existing client profiles set on the realm with them.
|
public static final String CLIENT_PROFILES
public static final String CLIENT_POLICIES
public DefaultClientPolicyManager(KeycloakSession session)
public void triggerOnEvent(ClientPolicyContext context) throws ClientPolicyException
ClientPolicyManagerClientPolicyEvent.triggerOnEvent in interface ClientPolicyManagercontext - - the context of the event.ClientPolicyExceptionpublic void setupClientPoliciesOnKeycloakApp(String profilesFilePath, String policiesFilePath)
ClientPolicyManagersetupClientPoliciesOnKeycloakApp in interface ClientPolicyManagerprofilesFilePath - - the file path for the builtin client profilespoliciesFilePath - - the file path for the builtin client policiespublic void setupClientPoliciesOnCreatedRealm(RealmModel realm)
ClientPolicyManagersetupClientPoliciesOnCreatedRealm in interface ClientPolicyManagerrealm - - the newly created realmpublic void setupClientPoliciesOnImportedRealm(RealmModel realm, RealmRepresentation rep)
ClientPolicyManagersetupClientPoliciesOnImportedRealm in interface ClientPolicyManagerrealm - - the newly created realm to be overriden by imported realm's representationrep - - imported realm's representationpublic void updateClientProfiles(RealmModel realm, String json) throws ClientPolicyException
ClientPolicyManagerupdateClientProfiles in interface ClientPolicyManagerrealm - - the realm whose client profiles is to be overriden by the new client profilesjson - - the json representation of the new client profiles that overrides the existing client profiles set on the realmClientPolicyExceptionpublic String getClientProfiles(RealmModel realm)
ClientPolicyManagergetClientProfiles in interface ClientPolicyManagerrealm - - the realm whose client profiles is to be returnedpublic void updateClientPolicies(RealmModel realm, String json) throws ClientPolicyException
ClientPolicyManagerupdateClientPolicies in interface ClientPolicyManagerrealm - - the realm whose client policies is to be overriden by the new client policiesjson - - the json representation of the new client policies that overrides the existing client policies set on the realmClientPolicyExceptionpublic void setupClientPoliciesOnExportingRealm(RealmModel realm, RealmRepresentation rep)
ClientPolicyManagersetupClientPoliciesOnExportingRealm in interface ClientPolicyManagerrealm - - the realm to be exportedrep - - the realm's representation to be exported actuallypublic String getClientPolicies(RealmModel realm)
ClientPolicyManagergetClientPolicies in interface ClientPolicyManagerrealm - - the realm whose client policies is to be returnedpublic String getClientProfilesOnKeycloakApp()
ClientPolicyManagergetClientProfilesOnKeycloakApp in interface ClientPolicyManagerpublic String getClientPoliciesOnKeycloakApp()
ClientPolicyManagergetClientPoliciesOnKeycloakApp in interface ClientPolicyManagerpublic String getClientProfilesJsonString(RealmModel realm)
ClientPolicyManagergetClientProfilesJsonString in interface ClientPolicyManagerrealm - - the realm whose client profiles is to be returnedpublic String getClientPoliciesJsonString(RealmModel realm)
ClientPolicyManagergetClientPoliciesJsonString in interface ClientPolicyManagerrealm - - the realm whose client policies is to be returnedCopyright © 2021 JBoss by Red Hat. All rights reserved.