Package com.sun.identity.saml.assertion
Class AuthenticationStatement
java.lang.Object
com.sun.identity.saml.assertion.Statement
com.sun.identity.saml.assertion.SubjectStatement
com.sun.identity.saml.assertion.AuthenticationStatement
The
AuthenticationStatement
element supplies a
statement by the issuer that its subject was authenticated by a
particular means at a particular time. The
AuthenticationStatement
element is of type
AuthenticationStatementType
, which extends the
SubjectStatementAbstractType
with the additional element and
attributes.-
Field Summary
Modifier and TypeFieldDescriptionprotected Date
protected String
protected List
protected SubjectLocality
Fields inherited from class com.sun.identity.saml.assertion.SubjectStatement
_subject
Fields inherited from class com.sun.identity.saml.assertion.Statement
ATTRIBUTE_STATEMENT, AUTHENTICATION_STATEMENT, AUTHORIZATION_DECISION_STATEMENT, NOT_SUPPORTED
-
Constructor Summary
ModifierConstructorDescriptionprotected
Default constructorAuthenticationStatement
(String authMethod, Date authInstant, Subject subject) ConstructsAuthentication statement
AuthenticationStatement
(String authMethod, Date authInstant, Subject subject, SubjectLocality subjectLocality, List authorityBinding) ConstructsAuthenticationStatement
AuthenticationStatement
(Element element) Constructs an authentication statement element from an existing XML block. -
Method Summary
Modifier and TypeMethodDescriptionprotected AuthorityBinding
createAuthorityBinding
(Element authorityBindingElement) protected Subject
createSubject
(Element subjectElement) protected SubjectLocality
createSubjectLocality
(Element subjectLocalityElement) ReturnsAuthenticationMethod
from authentication statementReturnsAuthenticationInstant
from authentication statement.Returns theAuthorityBinding
fromAuthenticationStatement
.int
Gets the real type of the Statement.Returns theSubjectLocality
fromAuthenticationStatement
boolean
setAuthenticaionMethod
(String authenticationmethod) SetsAuthenticationMethod
forAuthenticationStatement
.boolean
setAuthenticationInstant
(Date authenticationinstant) SetsAuthenticationInstant
forAuthenticationStatement
.boolean
setAuthorityBinding
(List authoritybinding) Sets theAuthorityBinding
forAuthenticationStatement
.boolean
setSubjectLocality
(SubjectLocality subjectlocality) Sets theSubjectLocality
forAuthenticationStatement
.toString()
Returns a String representation of the Authentication Statement.toString
(boolean includeNS, boolean declareNS) Returns a String representation of theAuthenticationStatement
Methods inherited from class com.sun.identity.saml.assertion.SubjectStatement
getSubject, setSubject
-
Field Details
-
_authenticationMethod
-
_authenticationInstant
-
_subjectLocality
-
_authorityBinding
-
-
Constructor Details
-
AuthenticationStatement
protected AuthenticationStatement()Default constructor -
AuthenticationStatement
Constructs an authentication statement element from an existing XML block.- Parameters:
element
- representing a DOM tree element.- Throws:
SAMLException
- if there is an error in the sender or in the element definition.
-
AuthenticationStatement
public AuthenticationStatement(String authMethod, Date authInstant, Subject subject) throws SAMLException ConstructsAuthentication statement
- Parameters:
authMethod
- (optional) A String specifies the type of authentication that took place.authInstant
- (optional) A String specifies the time at which the authentication took place.subject
- (required) A Subject object- Throws:
SAMLException
- if there is an error in the sender.
-
AuthenticationStatement
public AuthenticationStatement(String authMethod, Date authInstant, Subject subject, SubjectLocality subjectLocality, List authorityBinding) throws SAMLException ConstructsAuthenticationStatement
- Parameters:
authMethod
- (optional) A String specifies the type of authentication that took place.authInstant
- (optional) A String specifies the time at which the authentication that took place.subject
- (required) A Subject objectsubjectLocality
- (optional) ASubjectLocality
object.authorityBinding
- (optional) A List ofAuthorityBinding
objects.- Throws:
SAMLException
- if there is an error in the sender.
-
-
Method Details
-
getSubjectLocality
Returns theSubjectLocality
fromAuthenticationStatement
- Returns:
- The
SubjectLocality
object within the authentication statement.
-
setSubjectLocality
Sets theSubjectLocality
forAuthenticationStatement
.- Parameters:
subjectlocality
- TheSubjectLocality
object within theAuthenticationStatement
.- Returns:
- true if the operation is successful.
-
getAuthenticaionMethod
ReturnsAuthenticationMethod
from authentication statement- Returns:
- A String representing the authentication method of the authentication statement.
-
setAuthenticaionMethod
SetsAuthenticationMethod
forAuthenticationStatement
.- Parameters:
authenticationmethod
- input authentication method- Returns:
- true if the operation is successful. Otherwise return false.
-
getAuthenticationInstant
ReturnsAuthenticationInstant
from authentication statement.- Returns:
- The date/time when the authentication statement is created.
-
setAuthenticationInstant
SetsAuthenticationInstant
forAuthenticationStatement
.- Parameters:
authenticationinstant
- The date/time when the authentication statement is created.- Returns:
- true if the operation is successful.
-
getAuthorityBinding
Returns theAuthorityBinding
fromAuthenticationStatement
.- Returns:
- A list of the
AuthorityBinding
objects
-
setAuthorityBinding
Sets theAuthorityBinding
forAuthenticationStatement
.- Parameters:
authoritybinding
- A list of theAuthorityBinding
objects.- Returns:
- true if the operation is successful.
-
getStatementType
public int getStatementType()Gets the real type of the Statement. This method returns Statement.AUTHENTICATION_STATEMENT.- Specified by:
getStatementType
in classStatement
- Returns:
- an integer which is Statement.AUTHENTICATION_STATEMENT.
-
toString
Returns a String representation of the Authentication Statement. -
toString
Returns a String representation of theAuthenticationStatement
- Specified by:
toString
in classSubjectStatement
- Parameters:
includeNS
- Determines whether or not the namespace qualifier is prepended to the Element when converteddeclareNS
- Determines whether or not the namespace is declared within the Element.- Returns:
- A String representation of the
<saml:AuthenticationStatement>
element.
-
createSubject
- Throws:
SAMLException
-
createSubjectLocality
protected SubjectLocality createSubjectLocality(Element subjectLocalityElement) throws SAMLException - Throws:
SAMLException
-
createAuthorityBinding
protected AuthorityBinding createAuthorityBinding(Element authorityBindingElement) throws SAMLException - Throws:
SAMLException
-