Package com.sun.identity.saml2.protocol
Interface RequestAbstract
-
- All Known Subinterfaces:
ArtifactResolve,AssertionIDRequest,AttributeQuery,AuthnQuery,AuthnRequest,LogoutRequest,ManageNameIDRequest,NameIDMappingRequest,SubjectQueryAbstract,XACMLAuthzDecisionQuery
- All Known Implementing Classes:
ArtifactResolveImpl,AssertionIDRequestImpl,AttributeQueryImpl,AuthnQueryImpl,AuthnRequestImpl,LogoutRequestImpl,ManageNameIDRequestImpl,NameIDMappingRequestImpl,RequestAbstractImpl,SubjectQueryAbstractImpl,XACMLAuthzDecisionQueryImpl
public interface RequestAbstractThis interface defines methods for setting and retrieving attributes and elements associated with a SAML request message used in SAML protocols.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringgetConsent()Returns the value of theConsentattribute.StringgetDestination()Returns the value of theDestinationattribute.ExtensionsgetExtensions()Returns theExtensionsObject.StringgetID()Returns the value of theIDattribute.DategetIssueInstant()Returns the value ofIssueInstantattribute.IssuergetIssuer()Returns theIssuerObject.StringgetSignature()Returns theSignatureObject as a string.StringgetVersion()Returns the value of theVersionattribute.booleanisMutable()Returns true if object is mutable.booleanisSignatureValid(Set<X509Certificate> verificationCerts)Return whether the signature is valid or not.booleanisSigned()Returns true if message is signed.voidmakeImmutable()Makes this object immutable.voidsetConsent(String consent)Sets the value of theConsentattribute.voidsetDestination(String destinationURI)Sets the value of theDestinationattribute.voidsetExtensions(Extensions extensions)Sets theExtensionsObject.voidsetID(String id)Sets the value of theIDattribute.voidsetIssueInstant(Date dateTime)Sets the value ofIssueInstantattribute.voidsetIssuer(Issuer nameID)Sets theIssuerobject.voidsetVersion(String version)Sets the value of theVersionattribute.voidsign(PrivateKey privateKey, X509Certificate cert)Signs the Request.StringtoXMLString()Returns a String representation of this Object.StringtoXMLString(boolean includeNSPrefix, boolean declareNS)Returns a String representation of this Object.
-
-
-
Method Detail
-
setIssuer
void setIssuer(Issuer nameID) throws SAML2Exception
Sets theIssuerobject.- Parameters:
nameID- the newIssuerobject.- Throws:
SAML2Exception- if the object is immutable.- See Also:
getIssuer()
-
getIssuer
Issuer getIssuer()
Returns theIssuerObject.- Returns:
- the
Issuerobject. - See Also:
setIssuer(Issuer)
-
getSignature
String getSignature()
Returns theSignatureObject as a string.- Returns:
- the
Signatureobject as a string.
-
sign
void sign(PrivateKey privateKey, X509Certificate cert) throws SAML2Exception
Signs the Request.- Parameters:
privateKey- Signing keycert- Certificate which contain the public key correlated to the signing key; It if is not null, then the signature will include the certificate; Otherwise, the signature will not include any certificate.- Throws:
SAML2Exception- if it could not sign the Request.
-
setExtensions
void setExtensions(Extensions extensions) throws SAML2Exception
Sets theExtensionsObject.- Parameters:
extensions- theExtensionsobject.- Throws:
SAML2Exception- if the object is immutable.- See Also:
getExtensions()
-
getExtensions
Extensions getExtensions()
Returns theExtensionsObject.- Returns:
- the
Extensionsobject. - See Also:
setExtensions(Extensions)
-
setID
void setID(String id) throws SAML2Exception
Sets the value of theIDattribute.- Parameters:
id- the new value ofIDattribute.- Throws:
SAML2Exception- if the object is immutable.- See Also:
getID()
-
getID
String getID()
Returns the value of theIDattribute.- Returns:
- the value of
IDattribute. - See Also:
setID(String)
-
setVersion
void setVersion(String version) throws SAML2Exception
Sets the value of theVersionattribute.- Parameters:
version- the value ofVersionattribute.- Throws:
SAML2Exception- if the object is immutable.- See Also:
getVersion()
-
getVersion
String getVersion()
Returns the value of theVersionattribute.- Returns:
- value of
Versionattribute. - See Also:
setVersion(String)
-
setIssueInstant
void setIssueInstant(Date dateTime) throws SAML2Exception
Sets the value ofIssueInstantattribute.- Parameters:
dateTime- new value of theIssueInstantattribute.- Throws:
SAML2Exception- if the object is immutable.- See Also:
getIssueInstant()
-
getIssueInstant
Date getIssueInstant()
Returns the value ofIssueInstantattribute.- Returns:
- value of the
IssueInstantattribute. - See Also:
setIssueInstant(Date)
-
setDestination
void setDestination(String destinationURI) throws SAML2Exception
Sets the value of theDestinationattribute.- Parameters:
destinationURI- new value ofDestinationattribute.- Throws:
SAML2Exception- if the object is immutable.- See Also:
getDestination()
-
getDestination
String getDestination()
Returns the value of theDestinationattribute.- Returns:
- the value of
Destinationattribute. - See Also:
setDestination(String)
-
setConsent
void setConsent(String consent) throws SAML2Exception
Sets the value of theConsentattribute.- Parameters:
consent- new value ofConsentattribute.- Throws:
SAML2Exception- if the object is immutable.- See Also:
getConsent()
-
getConsent
String getConsent()
Returns the value of theConsentattribute.- Returns:
- value of
Consentattribute. - See Also:
setConsent(String)
-
isSigned
boolean isSigned()
Returns true if message is signed.- Returns:
- true if message is signed.
-
isSignatureValid
boolean isSignatureValid(Set<X509Certificate> verificationCerts) throws SAML2Exception
Return whether the signature is valid or not.- Parameters:
verificationCerts- Certificates containing the public keys which may be used for signature verification; This certificate may also may be used to check against the certificate included in the signature.- Returns:
- true if the signature is valid; false otherwise.
- Throws:
SAML2Exception- if the signature could not be verified
-
toXMLString
String toXMLString() throws SAML2Exception
Returns a String representation of this Object.- Returns:
- a String representation of this Object.
- Throws:
SAML2Exception- if it could not create String object
-
toXMLString
String toXMLString(boolean includeNSPrefix, boolean declareNS) throws SAML2Exception
Returns a String representation of this Object.- Parameters:
includeNSPrefix- 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 this Object.
- Throws:
SAML2Exception- if it could not create String object.
-
makeImmutable
void makeImmutable()
Makes this object immutable.
-
isMutable
boolean isMutable()
Returns true if object is mutable.- Returns:
- true if object is mutable.
-
-