Class SAMLAuthContext
java.lang.Object
se.swedenconnect.cert.extensions.data.saci.AbstractDomData
se.swedenconnect.cert.extensions.data.saci.SAMLAuthContext
DOM based implementation of SAMLAuthContext for the AuhtnContext extension RFC 7773
-
Field Summary
Fields inherited from class se.swedenconnect.cert.extensions.data.saci.AbstractDomData
SACI_NS, SAML_ASSERTION_NS, strictMode, XML_DATE_TIME_FORMATTER
-
Constructor Summary
ConstructorsConstructorDescriptionSAMLAuthContext
(boolean strictMode) Creates a new empty SAMLAuthContext objectSAMLAuthContext
(String xml, boolean strictMode) Creates a SAMLAuthContext object from XML textSAMLAuthContext
(Document document, boolean strictMode) Creates a SAMLAuthContext object from an XML document -
Method Summary
Modifier and TypeMethodDescriptionBuilds a new document for SAMLAuthContextprotected Element
getElement
(Document owner) Gets a DOM element from the element data fieldsprotected void
setValuesFromElement
(Element element) Creates an instance of this elements data from a DOM elementprotected void
validate()
Validates the data fields of this object to assert that it meets basic content requirementsMethods inherited from class se.swedenconnect.cert.extensions.data.saci.AbstractDomData
adoptAttributes, adoptElements, getAttributeValue, getAttributeValue, getElements, getOtherAttributes, getSingleElement, instantToString, parseTime, setAttribute, setAttribute
-
Constructor Details
-
SAMLAuthContext
public SAMLAuthContext(boolean strictMode) Creates a new empty SAMLAuthContext object- Parameters:
strictMode
- true to strictly enforce content requirement rules
-
SAMLAuthContext
Creates a SAMLAuthContext object from an XML document- Parameters:
document
- document holding SAMLAuthContext datastrictMode
- true to strictly enforce content requirement rules- Throws:
CertificateException
- content validation errors
-
SAMLAuthContext
public SAMLAuthContext(String xml, boolean strictMode) throws IOException, ParserConfigurationException, SAXException, CertificateException Creates a SAMLAuthContext object from XML text- Parameters:
xml
- xml text sourcestrictMode
- true to strictly enforce content requirement rules- Throws:
IOException
- errors parsing xml contentParserConfigurationException
- errors parsing xml contentSAXException
- errors parsing xml contentCertificateException
- content validation errors
-
-
Method Details
-
validate
Validates the data fields of this object to assert that it meets basic content requirements- Specified by:
validate
in classAbstractDomData
- Throws:
CertificateException
- validation errors
-
getDocument
Builds a new document for SAMLAuthContext- Returns:
- SAMLAuthContext XML document
-
getElement
Gets a DOM element from the element data fields- Specified by:
getElement
in classAbstractDomData
- Parameters:
owner
- the document this element shall belong to- Returns:
- DOM element populated with the field data of this object
-
setValuesFromElement
Creates an instance of this elements data from a DOM element- Specified by:
setValuesFromElement
in classAbstractDomData
- Parameters:
element
- xml element providing content data- Throws:
CertificateException
- content validation error
-