Class BasicAccessControlService
java.lang.Object
net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
net.shibboleth.utilities.java.support.component.AbstractIdentifiedInitializableComponent
net.shibboleth.utilities.java.support.component.AbstractIdentifiableInitializableComponent
net.shibboleth.utilities.java.support.security.impl.BasicAccessControlService
- All Implemented Interfaces:
Component
,DestructableComponent
,IdentifiableComponent
,IdentifiedComponent
,InitializableComponent
,UnmodifiableComponent
,AccessControlService
public class BasicAccessControlService
extends AbstractIdentifiableInitializableComponent
implements AccessControlService
Simple implementation that uses an in-memory map of policies.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.slf4j.Logger
Class logger.private Map<String,
AccessControl> Map of named policies. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetInstance
(String name) Get anAccessControl
instance matching a given name.void
setPolicyMap
(Map<String, AccessControl> map) Set the policies to store.Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractIdentifiableInitializableComponent
setId
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractIdentifiedInitializableComponent
doInitialize, getId
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
destroy, doDestroy, initialize, isDestroyed, isInitialized
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.shibboleth.utilities.java.support.component.IdentifiedComponent
getId
Methods inherited from interface net.shibboleth.utilities.java.support.component.InitializableComponent
initialize, isInitialized
-
Field Details
-
log
@Nonnull private final org.slf4j.Logger logClass logger. -
policyMap
Map of named policies.
-
-
Constructor Details
-
BasicAccessControlService
public BasicAccessControlService()Constructor.
-
-
Method Details
-
setPolicyMap
Set the policies to store.- Parameters:
map
- map of named policies
-
getInstance
Get anAccessControl
instance matching a given name.In the absence of a matching instance, a default policy that denies access is returned.
- Specified by:
getInstance
in interfaceAccessControlService
- Parameters:
name
- policy name- Returns:
- the matching instance, or a default
-