Class ResourcePolicyProviderFactory
- java.lang.Object
-
- org.keycloak.authorization.policy.provider.permission.ResourcePolicyProviderFactory
-
- All Implemented Interfaces:
PolicyProviderFactory<ResourcePermissionRepresentation>
,ProviderFactory<PolicyProvider>
public class ResourcePolicyProviderFactory extends Object implements PolicyProviderFactory<ResourcePermissionRepresentation>
- Author:
- Pedro Igor
-
-
Constructor Summary
Constructors Constructor Description ResourcePolicyProviderFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
This is called when the server shuts down.PolicyProvider
create(AuthorizationProvider authorization)
PolicyProvider
create(KeycloakSession session)
String
getGroup()
String
getId()
String
getName()
Class<ResourcePermissionRepresentation>
getRepresentationType()
void
init(Config.Scope config)
Only called once when the factory is first created.void
onCreate(Policy policy, ResourcePermissionRepresentation representation, AuthorizationProvider authorization)
void
onRemove(Policy policy, AuthorizationProvider authorization)
void
onUpdate(Policy policy, ResourcePermissionRepresentation representation, AuthorizationProvider authorization)
void
postInit(KeycloakSessionFactory factory)
Called after all provider factories have been initializedResourcePermissionRepresentation
toRepresentation(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, isInternal, onExport, onImport
-
Methods inherited from interface org.keycloak.provider.ProviderFactory
getConfigMetadata, order
-
-
-
-
Method Detail
-
getName
public String getName()
- Specified by:
getName
in interfacePolicyProviderFactory<ResourcePermissionRepresentation>
-
getGroup
public String getGroup()
- Specified by:
getGroup
in interfacePolicyProviderFactory<ResourcePermissionRepresentation>
-
create
public PolicyProvider create(AuthorizationProvider authorization)
- Specified by:
create
in interfacePolicyProviderFactory<ResourcePermissionRepresentation>
-
getRepresentationType
public Class<ResourcePermissionRepresentation> getRepresentationType()
- Specified by:
getRepresentationType
in interfacePolicyProviderFactory<ResourcePermissionRepresentation>
-
toRepresentation
public ResourcePermissionRepresentation toRepresentation(Policy policy, AuthorizationProvider authorization)
- Specified by:
toRepresentation
in interfacePolicyProviderFactory<ResourcePermissionRepresentation>
-
create
public PolicyProvider create(KeycloakSession session)
- Specified by:
create
in interfaceProviderFactory<PolicyProvider>
-
onCreate
public void onCreate(Policy policy, ResourcePermissionRepresentation representation, AuthorizationProvider authorization)
- Specified by:
onCreate
in interfacePolicyProviderFactory<ResourcePermissionRepresentation>
-
onUpdate
public void onUpdate(Policy policy, ResourcePermissionRepresentation representation, AuthorizationProvider authorization)
- Specified by:
onUpdate
in interfacePolicyProviderFactory<ResourcePermissionRepresentation>
-
onRemove
public void onRemove(Policy policy, AuthorizationProvider authorization)
- Specified by:
onRemove
in interfacePolicyProviderFactory<ResourcePermissionRepresentation>
-
init
public void init(Config.Scope config)
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
public void postInit(KeycloakSessionFactory factory)
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
public String getId()
- Specified by:
getId
in interfaceProviderFactory<PolicyProvider>
-
-