Class JSPolicyProviderFactory
java.lang.Object
org.keycloak.authorization.policy.provider.js.JSPolicyProviderFactory
- All Implemented Interfaces:
PolicyProviderFactory<JSPolicyRepresentation>
,ProviderFactory<PolicyProvider>
- Direct Known Subclasses:
DeployedScriptPolicyFactory
public class JSPolicyProviderFactory
extends Object
implements PolicyProviderFactory<JSPolicyRepresentation>
- Author:
- Pedro Igor
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
This is called when the server shuts down.create
(AuthorizationProvider authorization) create
(KeycloakSession session) getGroup()
getId()
getName()
protected ScriptModel
getScriptModel
(Policy policy, RealmModel realm, ScriptingProvider scripting) void
init
(Config.Scope config) Only called once when the factory is first created.protected boolean
boolean
void
onCreate
(Policy policy, JSPolicyRepresentation representation, AuthorizationProvider authorization) void
onImport
(Policy policy, PolicyRepresentation representation, AuthorizationProvider authorization) void
onRemove
(Policy policy, AuthorizationProvider authorization) void
onUpdate
(Policy policy, JSPolicyRepresentation representation, AuthorizationProvider authorization) void
postInit
(KeycloakSessionFactory factory) Called after all provider factories have been initializedtoRepresentation
(Policy policy, AuthorizationProvider authorization) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.keycloak.authorization.policy.provider.PolicyProviderFactory
getAdminResource, onExport
Methods inherited from interface org.keycloak.provider.ProviderFactory
getConfigMetadata, order
-
Constructor Details
-
JSPolicyProviderFactory
public JSPolicyProviderFactory()
-
-
Method Details
-
getName
- Specified by:
getName
in interfacePolicyProviderFactory<JSPolicyRepresentation>
-
getGroup
- Specified by:
getGroup
in interfacePolicyProviderFactory<JSPolicyRepresentation>
-
create
- Specified by:
create
in interfacePolicyProviderFactory<JSPolicyRepresentation>
-
create
- Specified by:
create
in interfaceProviderFactory<PolicyProvider>
-
toRepresentation
- Specified by:
toRepresentation
in interfacePolicyProviderFactory<JSPolicyRepresentation>
-
getRepresentationType
- Specified by:
getRepresentationType
in interfacePolicyProviderFactory<JSPolicyRepresentation>
-
onCreate
public void onCreate(Policy policy, JSPolicyRepresentation representation, AuthorizationProvider authorization) - Specified by:
onCreate
in interfacePolicyProviderFactory<JSPolicyRepresentation>
-
onUpdate
public void onUpdate(Policy policy, JSPolicyRepresentation representation, AuthorizationProvider authorization) - Specified by:
onUpdate
in interfacePolicyProviderFactory<JSPolicyRepresentation>
-
onImport
public void onImport(Policy policy, PolicyRepresentation representation, AuthorizationProvider authorization) - Specified by:
onImport
in interfacePolicyProviderFactory<JSPolicyRepresentation>
-
onRemove
- Specified by:
onRemove
in interfacePolicyProviderFactory<JSPolicyRepresentation>
-
init
Description copied from interface:ProviderFactory
Only called once when the factory is first created. This config is pulled from keycloak_server.json- Specified by:
init
in interfaceProviderFactory<PolicyProvider>
-
postInit
Description copied from interface:ProviderFactory
Called after all provider factories have been initialized- Specified by:
postInit
in interfaceProviderFactory<PolicyProvider>
-
close
public void close()Description copied from interface:ProviderFactory
This is called when the server shuts down.- Specified by:
close
in interfaceProviderFactory<PolicyProvider>
-
getId
- Specified by:
getId
in interfaceProviderFactory<PolicyProvider>
-
isInternal
public boolean isInternal()- Specified by:
isInternal
in interfacePolicyProviderFactory<JSPolicyRepresentation>
-
getScriptModel
-
isDeployed
protected boolean isDeployed()
-