|
||||||||||
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.attribute.provider.ShibbolethSAML1AttributeAuthority
public class ShibbolethSAML1AttributeAuthority
SAML 1 Attribute Authority.
Constructor Summary | |
---|---|
ShibbolethSAML1AttributeAuthority(ShibbolethAttributeResolver resolver)
This creates a new attribute authority. |
Method Summary | |
---|---|
org.opensaml.saml1.core.AttributeStatement |
buildAttributeStatement(org.opensaml.saml1.core.AttributeQuery query,
Collection<BaseAttribute> attributes)
Creates a SAML 1 attribute statment from a collection of BaseAttribute . |
protected Collection<org.opensaml.saml1.core.Attribute> |
encodeAttributes(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 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(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. |
Methods inherited from class edu.internet2.middleware.shibboleth.common.config.BaseService |
---|
destroy, getApplicationContext, getId, getReadWriteLock, getServiceConfigurations, getServiceContext, initialize, 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 |
Constructor Detail |
---|
public ShibbolethSAML1AttributeAuthority(ShibbolethAttributeResolver resolver)
resolver
- The attribute resolver to setMethod Detail |
---|
public 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 respone to, may be nullattributes
- the attributes to create the attribute statement form
AttributeEncodingException
- 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 translate
public 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 Shibboleth.
getPrincipal
in interface SAML1AttributeAuthority
requestContext
- The request context within which to retrieve the principal. At a mimium, a
NameIdentifier
and relying party ID must be included.
NameIdentifier
into the internal principal name used Shibboleth
AttributeRequestException
- thrown if the principal get not be resolvedpublic org.opensaml.saml1.core.AttributeDesignator getSAMLAttributeByAttributeID(String id)
getSAMLAttributeByAttributeID
in interface SAML1AttributeAuthority
id
- internal attribute ID
public 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 request
AttributeRequestException
- thrown if there is a problem retrieving the attributesprotected Set<String> getAttributeIds(org.opensaml.common.SAMLObject samlRequest)
samlRequest
- the attribute query
protected Set<String> getAttribtueIds(org.opensaml.saml2.metadata.EntityDescriptor metadata)
metadata
- the entity metadata
protected Set<String> getAttributeIds(List<org.opensaml.saml1.core.AttributeDesignator> attributes)
attributes
- List
Set
of attribute idsprotected Collection<org.opensaml.saml1.core.Attribute> encodeAttributes(Collection<BaseAttribute> attributes)
attributes
- shibboleth attributes to be encoded into SAML attributes
protected void onNewContextCreated(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 |