public class JWTMessageAuthentication extends java.lang.Object implements MessageAuthentication
The XML APIs specify the following XSD fragment:
XSD Fragment
<xs:element name="authToken">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="scheme" type="xs:string" default="jwt"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
MessageAuthentication.MessageAuthScheme| Constructor and Description |
|---|
JWTMessageAuthentication()
Initializes an empty JWTMessageAuthentication.
The method setJwtToken(String)
must be invoked to be valid. |
JWTMessageAuthentication(java.lang.String jwtToken)
Initializes a JWT Message Authentication with a JWT token.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addCharacterData(java.lang.String cData)
Adds character data to the content element.
|
void |
addChild(java.lang.String tagName,
XMLMarshallable child)
Adds a child to the objects, the
child represents
the marshallable object to be added into the content tree. |
java.lang.String |
getJwtToken()
Returns a jwt token as authentication data.
|
MessageAuthentication.MessageAuthScheme |
getScheme()
Returns the authentication scheme defined in this class: MessageAuthScheme.JWT.
|
void |
marshal(XMLOutputter output)
Gives an XML representation of this object, and of its
children.
|
void |
setAttributes(XMLAttributes atts)
Sets the attributes of the XML representation of the tag being
processed.
|
void |
setJwtToken(java.lang.String jwtToken)
Sets the JWT token for this message authentication.
|
public JWTMessageAuthentication()
setJwtToken(String)
must be invoked to be valid.public JWTMessageAuthentication(java.lang.String jwtToken)
jwtToken - The jwt token used to be authenticatedpublic MessageAuthentication.MessageAuthScheme getScheme()
getScheme in interface MessageAuthenticationpublic java.lang.String getJwtToken()
public void setJwtToken(java.lang.String jwtToken)
jwtToken - The JWT token for this message authenticationpublic void setAttributes(XMLAttributes atts)
setAttributes in interface XMLMarshallableatts - The XML attributes of the current tagpublic void addChild(java.lang.String tagName,
XMLMarshallable child)
child represents
the marshallable object to be added into the content tree.addChild in interface XMLMarshallabletagName - The name of tag for the childchild - The child to be addedpublic void addCharacterData(java.lang.String cData)
addCharacterData in interface XMLMarshallablecData - The character data to be addedpublic void marshal(XMLOutputter output)
marshal in interface XMLMarshallableoutput - The XML output to marshall the object into