public class ShibbolethAttributeResolver extends BaseReloadableService implements AttributeResolver<SAMLProfileRequestContext>
AttributeResolver
.
"Raw" attributes are gathered by the registered DataConnector
s while the AttributeDefinition
s refine
the raw attributes or create attributes of their own. Connectors and definitions may depend on each other so
implementations must use a directed dependency graph when performing the resolution.BaseReloadableService.ConfigurationResourceListener
修飾子とタイプ | フィールドと説明 |
---|---|
static Collection<Class> |
PLUGIN_TYPES
Resolution plug-in types.
|
コンストラクタと説明 |
---|
ShibbolethAttributeResolver()
Constructor.
|
修飾子とタイプ | メソッドと説明 |
---|---|
protected void |
addVertex(org.jgrapht.DirectedGraph<ResolutionPlugIn,org.jgrapht.graph.DefaultEdge> graph,
ResolutionPlugIn<?> plugin)
Add a resolution plug-in and dependencies to a directed graph.
|
protected void |
cleanResolvedAttributes(Map<String,BaseAttribute> resolvedAttributes,
ShibbolethResolutionContext resolutionContext)
Removes attributes that contain no values or those which are dependency only.
|
Map<String,AttributeDefinition> |
getAttributeDefinitions()
Gets the attribute definitions registered with this resolver.
|
Map<String,DataConnector> |
getDataConnectors()
Gets the data connectors registered with this provider.
|
protected String |
getNameIdentifierFormat(SAMLObject nameIdentifier)
Gets the format of the name identifier used to identify the subject.
|
Map<String,PrincipalConnector> |
getPrincipalConnectors()
Gets the principal connectors registered with this resolver.
|
protected void |
onNewContextCreated(org.springframework.context.ApplicationContext newServiceContext)
Called after a new context has been created but before it set as the service's context.
|
protected BaseAttribute |
resolveAttribute(String attributeID,
ShibbolethResolutionContext resolutionContext)
Resolve the
AttributeDefinition which has the specified ID. |
Map<String,BaseAttribute> |
resolveAttributes(SAMLProfileRequestContext attributeRequestContext)
Gets all the attributes for a given subject.
|
protected Map<String,BaseAttribute> |
resolveAttributes(ShibbolethResolutionContext resolutionContext)
Resolves the attributes requested in the resolution context or all attributes if no specific attributes were
requested.
|
protected void |
resolveDataConnector(String connectorID,
ShibbolethResolutionContext resolutionContext)
Resolve the
DataConnector which has the specified ID and add it to the resolution context. |
protected void |
resolveDependencies(ResolutionPlugIn<?> plugin,
ShibbolethResolutionContext resolutionContext)
Resolves all the dependencies for a given plugin.
|
String |
resolvePrincipalName(SAMLProfileRequestContext requestContext)
Resolves the principal name for the subject of the request.
|
void |
validate()
Check that the Attribute Resolver is in a valid state and ready to begin receiving resolution requests.
|
protected void |
validateDataConnector(DataConnector connector)
Validates that a data connector is valid, per
ResolutionPlugIn.validate() and, if invalid, fails over to
a connector's failover connector, if present. |
destroy, getPollingFrequency, getPollingRetryAttempts, getPollingTimer, initialize, reload, setPollingFrequency, setPollingRetryAttempts, setPollingTimer
getApplicationContext, getId, getReadWriteLock, getServiceConfigurations, getServiceContext, isDestroyed, isInitialized, loadContext, setApplicationContext, setBeanName, setInitialized, setServiceConfigurations, setServiceContext
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getId, isDestroyed, isInitialized
public static final Collection<Class> PLUGIN_TYPES
public Map<String,AttributeDefinition> getAttributeDefinitions()
public Map<String,DataConnector> getDataConnectors()
public Map<String,PrincipalConnector> getPrincipalConnectors()
public Map<String,BaseAttribute> resolveAttributes(SAMLProfileRequestContext attributeRequestContext) throws AttributeResolutionException
resolveAttributes
インタフェース内 AttributeResolver<SAMLProfileRequestContext>
attributeRequestContext
- the attribute resolution context to use to resolve attributesAttributeResolutionException
- thrown if there is a problem resolving the attributes for the subjectpublic void validate() throws AttributeResolutionException
validate
インタフェース内 AttributeResolver<SAMLProfileRequestContext>
AttributeResolutionException
- if resolver is in an invalid stateprotected void validateDataConnector(DataConnector connector) throws AttributeResolutionException
ResolutionPlugIn.validate()
and, if invalid, fails over to
a connector's failover connector, if present.connector
- connector to validateAttributeResolutionException
- thrown if the connector is invalid and does not define a failover connector
or, if a failover connector is defined, if that connector is invalidpublic String resolvePrincipalName(SAMLProfileRequestContext requestContext) throws AttributeResolutionException
requestContext
- current request contextAttributeResolutionException
- thrown if the subject identifier information can not be resolved into a
principal nameprotected String getNameIdentifierFormat(SAMLObject nameIdentifier)
nameIdentifier
- name identifier used to identify the subjectprotected Map<String,BaseAttribute> resolveAttributes(ShibbolethResolutionContext resolutionContext) throws AttributeResolutionException
resolutionContext
- current resolution contextAttributeResolutionException
- thrown if the attributes could not be resolvedprotected BaseAttribute resolveAttribute(String attributeID, ShibbolethResolutionContext resolutionContext) throws AttributeResolutionException
AttributeDefinition
which has the specified ID. The definition is then added to the
ShibbolethResolutionContext
for use by other ResolutionPlugIn
s and the resolution of the
specified definition is added to resolvedAttributes
to be returned by the resolver.attributeID
- id of the attribute definition to resolveresolutionContext
- resolution context that we are working inAttributeResolutionException
- if unable to resolve the requested attribute definitionprotected void resolveDataConnector(String connectorID, ShibbolethResolutionContext resolutionContext) throws AttributeResolutionException
DataConnector
which has the specified ID and add it to the resolution context.connectorID
- id of the data connector to resolveresolutionContext
- resolution context that we are working inAttributeResolutionException
- if unable to resolve the requested connectorprotected void resolveDependencies(ResolutionPlugIn<?> plugin, ShibbolethResolutionContext resolutionContext) throws AttributeResolutionException
plugin
- plugin whose dependencies should be resolvedresolutionContext
- current resolution contextAttributeResolutionException
- thrown if there is a problem resolving a dependencyprotected void cleanResolvedAttributes(Map<String,BaseAttribute> resolvedAttributes, ShibbolethResolutionContext resolutionContext)
resolvedAttributes
- attribute set to clean upresolutionContext
- current resolution contextprotected void addVertex(org.jgrapht.DirectedGraph<ResolutionPlugIn,org.jgrapht.graph.DefaultEdge> graph, ResolutionPlugIn<?> plugin)
graph
- directed graphplugin
- plug-in to addprotected void onNewContextCreated(org.springframework.context.ApplicationContext newServiceContext) throws ServiceException
onNewContextCreated
クラス内 BaseService
newServiceContext
- the newly created context for the serviceServiceException
- thrown if there is a problem with the given service contextCopyright © 2012. All Rights Reserved.