Package com.sun.identity.saml.protocol
Class AuthenticationQuery
- java.lang.Object
-
- com.sun.identity.saml.protocol.Query
-
- com.sun.identity.saml.protocol.SubjectQuery
-
- com.sun.identity.saml.protocol.AuthenticationQuery
-
public class AuthenticationQuery extends SubjectQuery
This concrete class extends from the abstract base classSubjectQuery. It represents the query for an authentication assertion. It corresponds to the<samlp:AuthenticationQueryType>in the SAML protocol schema.
-
-
Field Summary
Fields Modifier and Type Field Description protected StringauthMethod-
Fields inherited from class com.sun.identity.saml.protocol.SubjectQuery
subject
-
Fields inherited from class com.sun.identity.saml.protocol.Query
ATTRIBUTE_QUERY, AUTHENTICATION_QUERY, AUTHORIZATION_DECISION_QUERY, NOT_SUPPORTED_QUERY
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAuthenticationQuery()Default ConstructorAuthenticationQuery(Subject subject)Constructor.AuthenticationQuery(Subject subject, String authMethod)Constructor.AuthenticationQuery(Element element)This constructor is used to build an Authentication Query from a DOM tree that was built from the XML string.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetAuthenticationMethod()Returns theAuthenticationMethod.intgetQueryType()Returns the type of this query.StringtoString()Translates theAuthenticationQueryto an XML document String based on theAuthenticationQueryschema described above.StringtoString(boolean includeNS, boolean declareNS)Returns a String representation of the<samlp:AuthenticationQuery>element.-
Methods inherited from class com.sun.identity.saml.protocol.SubjectQuery
getSubject
-
-
-
-
Field Detail
-
authMethod
protected String authMethod
-
-
Constructor Detail
-
AuthenticationQuery
protected AuthenticationQuery()
Default Constructor
-
AuthenticationQuery
public AuthenticationQuery(Element element) throws SAMLException
This constructor is used to build an Authentication Query from a DOM tree that was built from the XML string.- Parameters:
element- the DOM tree element which contains an Authentication Query.- Throws:
SAMLException- when an error occurs.
-
AuthenticationQuery
public AuthenticationQuery(Subject subject, String authMethod) throws SAMLException
Constructor.- Parameters:
subject- the Subject of theAuthenticationQuery.authMethod- theAuthenticationMethodin string format. It could be null.- Throws:
SAMLException- if a SAML error occurs
-
AuthenticationQuery
public AuthenticationQuery(Subject subject) throws SAMLException
Constructor.- Parameters:
subject- The Subject of theAuthenticationQuery.- Throws:
SAMLException- if a SAML error occurs
-
-
Method Detail
-
getAuthenticationMethod
public String getAuthenticationMethod()
Returns theAuthenticationMethod.- Returns:
AuthenticationMethodin string format; or null if there is none.
-
getQueryType
public int getQueryType()
Returns the type of this query.- Specified by:
getQueryTypein classQuery- Returns:
Query.AUTHENTICATION_QUERY.
-
toString
public String toString()
Translates theAuthenticationQueryto an XML document String based on theAuthenticationQueryschema described above.
-
toString
public String toString(boolean includeNS, boolean declareNS)
Returns a String representation of the<samlp:AuthenticationQuery>element.
-
-