public class ShibbolethSAML1AttributeAuthority extends BaseService implements SAML1AttributeAuthority
Constructor and Description |
---|
ShibbolethSAML1AttributeAuthority(ShibbolethAttributeResolver resolver)
This creates a new attribute authority.
|
Modifier and Type | Method and Description |
---|---|
org.opensaml.saml1.core.AttributeStatement |
buildAttributeStatement(org.opensaml.saml1.core.AttributeQuery query,
Collection<BaseAttribute> attributes)
Creates a SAML 1 attribute statement from a collection of
BaseAttribute . |
protected Collection<org.opensaml.saml1.core.Attribute> |
encodeAttributes(org.opensaml.saml1.core.AttributeQuery query,
Collection<BaseAttribute> attributes)
This encodes the supplied attributes with that attribute's SAML1 encoder.
|
protected Set<String> |
getAttribtueIds(org.opensaml.saml2.metadata.EntityDescriptor metadata)
Gets the attribute IDs for those attributes requested in the entity metadata.
|
String |
getAttributeIDBySAMLAttribute(org.opensaml.saml1.core.AttributeDesignator attribute)
Translates SAML 1 attribute naming information into the internal attribute ID used by the resolver and filtering
engine.
|
protected Set<String> |
getAttributeIds(List<org.opensaml.saml1.core.AttributeDesignator> attributes)
This parses the attribute ids from the supplied list of attributes.
|
protected Set<String> |
getAttributeIds(org.opensaml.common.SAMLObject samlRequest)
Gets the attribute IDs for those attributes requested in the attribute query.
|
ShibbolethAttributeResolver |
getAttributeResolver()
Gets the attribute resolver.
|
Map<String,BaseAttribute> |
getAttributes(SAMLProfileRequestContext<? extends org.opensaml.common.SAMLObject,? extends org.opensaml.saml1.core.ResponseAbstractType,org.opensaml.saml1.core.NameIdentifier,? extends AbstractSAML1ProfileConfiguration> requestContext)
Gets the attributes for the principal identified in the request.
|
ShibbolethAttributeFilteringEngine |
getFilteringEngine()
Gets the filtering engine.
|
String |
getPrincipal(SAMLProfileRequestContext<? extends org.opensaml.common.SAMLObject,? extends org.opensaml.saml1.core.ResponseAbstractType,org.opensaml.saml1.core.NameIdentifier,? extends AbstractSAML1ProfileConfiguration> requestContext)
Resolves a
NameIdentifier into the internal principal name used by Shibboleth. |
org.opensaml.saml1.core.AttributeDesignator |
getSAMLAttributeByAttributeID(String id)
Translates the internal attribute ID, used by the resolver and filtering engine, into its representative SAML 1
attribute name.
|
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.
|
void |
setFilteringEngine(ShibbolethAttributeFilteringEngine engine)
Sets the attribute filtering engine.
|
destroy, getApplicationContext, getId, getReadWriteLock, getServiceConfigurations, getServiceContext, initialize, isDestroyed, isInitialized, loadContext, setApplicationContext, setBeanName, setInitialized, setServiceConfigurations, setServiceContext
public ShibbolethSAML1AttributeAuthority(ShibbolethAttributeResolver resolver)
resolver
- The attribute resolver to setpublic ShibbolethAttributeResolver getAttributeResolver()
public ShibbolethAttributeFilteringEngine getFilteringEngine()
public void setFilteringEngine(ShibbolethAttributeFilteringEngine engine)
engine
- attribute filtering enginepublic org.opensaml.saml1.core.AttributeStatement buildAttributeStatement(org.opensaml.saml1.core.AttributeQuery query, Collection<BaseAttribute> attributes) throws AttributeEncodingException
BaseAttribute
.buildAttributeStatement
in interface SAML1AttributeAuthority
query
- the attribute query the statement is in response to, may be nullattributes
- the attributes to create the attribute statement formAttributeEncodingException
- thrown if an BaseAttribute
can not be encodedpublic String getAttributeIDBySAMLAttribute(org.opensaml.saml1.core.AttributeDesignator attribute)
getAttributeIDBySAMLAttribute
in interface SAML1AttributeAuthority
attribute
- the SAML 1 attribute to translatepublic String getPrincipal(SAMLProfileRequestContext<? extends org.opensaml.common.SAMLObject,? extends org.opensaml.saml1.core.ResponseAbstractType,org.opensaml.saml1.core.NameIdentifier,? extends AbstractSAML1ProfileConfiguration> requestContext) throws AttributeRequestException
NameIdentifier
into the internal principal name used by Shibboleth.getPrincipal
in interface SAML1AttributeAuthority
requestContext
- The request context within which to retrieve the principal. At a minimum, a
NameIdentifier
and relying party ID must be included.NameIdentifier
into the internal principal name used by ShibbolethAttributeRequestException
- thrown if the principal get not be resolvedpublic org.opensaml.saml1.core.AttributeDesignator getSAMLAttributeByAttributeID(String id)
getSAMLAttributeByAttributeID
in interface SAML1AttributeAuthority
id
- internal attribute IDpublic Map<String,BaseAttribute> getAttributes(SAMLProfileRequestContext<? extends org.opensaml.common.SAMLObject,? extends org.opensaml.saml1.core.ResponseAbstractType,org.opensaml.saml1.core.NameIdentifier,? extends AbstractSAML1ProfileConfiguration> requestContext) throws AttributeRequestException
getAttributes
in interface AttributeAuthority<SAMLProfileRequestContext<? extends org.opensaml.common.SAMLObject,? extends org.opensaml.saml1.core.ResponseAbstractType,org.opensaml.saml1.core.NameIdentifier,? extends AbstractSAML1ProfileConfiguration>>
requestContext
- contextual information for the attribute requestAttributeRequestException
- thrown if there is a problem retrieving the attributesprotected Set<String> getAttributeIds(org.opensaml.common.SAMLObject samlRequest)
samlRequest
- the attribute queryprotected Set<String> getAttribtueIds(org.opensaml.saml2.metadata.EntityDescriptor metadata)
metadata
- the entity metadataprotected Set<String> getAttributeIds(List<org.opensaml.saml1.core.AttributeDesignator> attributes)
attributes
- List
Set
of attribute idsprotected Collection<org.opensaml.saml1.core.Attribute> encodeAttributes(org.opensaml.saml1.core.AttributeQuery query, Collection<BaseAttribute> attributes)
query
- request that may containing filtering designatorsattributes
- internal attributes to be encoded into SAML attributesprotected void onNewContextCreated(org.springframework.context.ApplicationContext newServiceContext) throws ServiceException
onNewContextCreated
in class BaseService
newServiceContext
- the newly created context for the serviceServiceException
- thrown if there is a problem with the given service contextCopyright © 1999–2014. All rights reserved.