public interface ClientPolicyManager
ClientPolicyEvent
.
Also provides methods for handling client profiles and policies.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.
|
void triggerOnEvent(ClientPolicyContext context) throws ClientPolicyException
ClientPolicyEvent
.context
- - the context of the event.{@link
- ClientPolicyException}ClientPolicyException
void setupClientPoliciesOnKeycloakApp(String profilesFilePath, String policiesFilePath)
profilesFilePath
- - the file path for the builtin client profilespoliciesFilePath
- - the file path for the builtin client policiesvoid setupClientPoliciesOnCreatedRealm(RealmModel realm)
realm
- - the newly created realmvoid setupClientPoliciesOnImportedRealm(RealmModel realm, RealmRepresentation rep)
realm
- - the newly created realm to be overriden by imported realm's representationrep
- - imported realm's representationvoid updateClientProfiles(RealmModel realm, String json) throws ClientPolicyException
realm
- - 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 realm{@link
- ClientPolicyException}ClientPolicyException
String getClientProfiles(RealmModel realm)
realm
- - the realm whose client profiles is to be returnedvoid updateClientPolicies(RealmModel realm, String json) throws ClientPolicyException
realm
- - 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 realm{@link
- ClientPolicyException}ClientPolicyException
String getClientPolicies(RealmModel realm)
realm
- - the realm whose client policies is to be returnedvoid setupClientPoliciesOnExportingRealm(RealmModel realm, RealmRepresentation rep)
realm
- - the realm to be exportedrep
- - the realm's representation to be exported actuallyString getClientProfilesOnKeycloakApp()
String getClientPoliciesOnKeycloakApp()
String getClientProfilesJsonString(RealmModel realm)
realm
- - the realm whose client profiles is to be returnedString getClientPoliciesJsonString(RealmModel realm)
realm
- - the realm whose client policies is to be returnedCopyright © 2021 JBoss by Red Hat. All rights reserved.