Search in sources :

Example 1 with SubjectLocalityType

use of org.keycloak.dom.saml.v2.assertion.SubjectLocalityType in project keycloak by keycloak.

the class SAMLAuthnStatementParser method processSubElement.

@Override
protected void processSubElement(XMLEventReader xmlEventReader, AuthnStatementType target, SAMLAssertionQNames element, StartElement elementDetail) throws ParsingException {
    switch(element) {
        case SUBJECT_LOCALITY:
            StaxParserUtil.advance(xmlEventReader);
            SubjectLocalityType subjectLocalityType = new SubjectLocalityType();
            subjectLocalityType.setAddress(StaxParserUtil.getAttributeValue(elementDetail, SAMLAssertionQNames.ATTR_ADDRESS));
            subjectLocalityType.setDNSName(StaxParserUtil.getAttributeValue(elementDetail, SAMLAssertionQNames.ATTR_DNS_NAME));
            target.setSubjectLocality(subjectLocalityType);
            break;
        case AUTHN_CONTEXT:
            target.setAuthnContext(SAMLAuthnContextParser.getInstance().parse(xmlEventReader));
            break;
        default:
            throw LOGGER.parserUnknownTag(StaxParserUtil.getElementName(elementDetail), elementDetail.getLocation());
    }
}
Also used : SubjectLocalityType(org.keycloak.dom.saml.v2.assertion.SubjectLocalityType)

Aggregations

SubjectLocalityType (org.keycloak.dom.saml.v2.assertion.SubjectLocalityType)1