use of com.sun.identity.saml.assertion.SubjectConfirmation in project OpenAM by OpenRock.
the class DefaultAttributeMapper method getSSOTokenID.
/**
* This method exams the SubjectConfirmation of the Subject in the
* AttributeQuery. If it has only one ConfirmationMethod, and this
* ConfirmationMethod equals to "urn:com:sun:identity"; and its
* SubjectConfirmationData contains TEXT node only, then the method
* returns the concatenated string of all the TEXT nodes. Otherwise,
* it returns null.
* <p>
* @param query the <code>AttributeQuery</code> object.
* @see com.sun.identity.saml.plugins.AttributeMapper#getSSOTokenID
*/
public String getSSOTokenID(AttributeQuery query) {
if (query == null) {
return null;
}
SubjectConfirmation sc = query.getSubject().getSubjectConfirmation();
if (sc == null) {
return null;
}
if (!SAMLUtils.isCorrectConfirmationMethod(sc)) {
return null;
}
Element scData = sc.getSubjectConfirmationData();
return XMLUtils.getElementString(scData);
}
Aggregations