|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.internet2.middleware.shibboleth.common.config.BaseService
edu.internet2.middleware.shibboleth.common.config.BaseReloadableService
edu.internet2.middleware.shibboleth.common.attribute.resolver.provider.ShibbolethAttributeResolver
public class ShibbolethAttributeResolver
Primary implementation of 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.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class edu.internet2.middleware.shibboleth.common.config.BaseReloadableService |
---|
BaseReloadableService.ConfigurationResourceListener |
Field Summary | |
---|---|
static Collection<Class> |
PLUGIN_TYPES
Resolution plug-in types. |
Constructor Summary | |
---|---|
ShibbolethAttributeResolver()
Constructor. |
Method Summary | |
---|---|
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(org.opensaml.common.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. |
Methods inherited from class edu.internet2.middleware.shibboleth.common.config.BaseReloadableService |
---|
destroy, getPollingFrequency, getPollingRetryAttempts, getPollingTimer, initialize, reload, setPollingFrequency, setPollingRetryAttempts, setPollingTimer |
Methods inherited from class edu.internet2.middleware.shibboleth.common.config.BaseService |
---|
getApplicationContext, getId, getReadWriteLock, getServiceConfigurations, getServiceContext, isDestroyed, isInitialized, loadContext, setApplicationContext, setBeanName, setInitialized, setServiceConfigurations, setServiceContext |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface edu.internet2.middleware.shibboleth.common.service.Service |
---|
getId, isDestroyed, isInitialized |
Field Detail |
---|
public static final Collection<Class> PLUGIN_TYPES
Constructor Detail |
---|
public ShibbolethAttributeResolver()
Method Detail |
---|
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
in interface AttributeResolver<SAMLProfileRequestContext>
attributeRequestContext
- the attribute resolution context to use to resolve attributes
AttributeResolutionException
- thrown if there is a problem resolving the attributes for the subjectpublic void validate() throws AttributeResolutionException
validate
in interface AttributeResolver<SAMLProfileRequestContext>
AttributeResolutionException
- if resolver is in an invalid statepublic String resolvePrincipalName(SAMLProfileRequestContext requestContext) throws AttributeResolutionException
requestContext
- current request context
AttributeResolutionException
- thrown if the subject identifier information can not be resolved into a
principal nameprotected String getNameIdentifierFormat(org.opensaml.common.SAMLObject nameIdentifier)
nameIdentifier
- name identifier used to identify the subject
protected Map<String,BaseAttribute> resolveAttributes(ShibbolethResolutionContext resolutionContext) throws AttributeResolutionException
resolutionContext
- current resolution context
AttributeResolutionException
- 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 in
AttributeResolutionException
- 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 in
AttributeResolutionException
- if unable to resolve the requested connectorprotected void resolveDependencies(ResolutionPlugIn<?> plugin, ShibbolethResolutionContext resolutionContext) throws AttributeResolutionException
plugin
- plugin whose dependencies should be resolvedresolutionContext
- current resolution context
AttributeResolutionException
- 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
in class BaseService
newServiceContext
- the newly created context for the service
ServiceException
- thrown if there is a problem with the given service context
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |