|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.geant.edugain.base.Response
public abstract class Response
Defines a generic eduGAIN class for responses. The class will be extended depending on the type of response: Authentication, Attributes, Authorization or Home Location.
| Field Summary | |
|---|---|
protected java.lang.String |
additionalData
Any other data the Authentication Service is willing to include. |
protected java.net.URI |
consumerId
The component identifier for the consumer of the response. |
static javax.xml.namespace.QName |
EDUGAIN_NAMESPACE_RESULT_ACCEPTED
The request was accepted |
static javax.xml.namespace.QName |
EDUGAIN_NAMESPACE_RESULT_CONNECT_TO
Connect to... |
static javax.xml.namespace.QName |
EDUGAIN_NAMESPACE_RESULT_DENY
The request was denied |
static javax.xml.namespace.QName |
EDUGAIN_NAMESPACE_RESULT_EXPIRED_MESSAGE
The validity time of the content of the message has expired. |
static javax.xml.namespace.QName |
EDUGAIN_NAMESPACE_RESULT_FAULT
Fault |
static javax.xml.namespace.QName |
EDUGAIN_NAMESPACE_RESULT_INCOMPATIBLE_VERSIONS
The version of the message is incompatible with the version of the service. |
static javax.xml.namespace.QName |
EDUGAIN_NAMESPACE_RESULT_INSUFFICIENT_DATA
Not enough data to perform the authentication operation |
static javax.xml.namespace.QName |
EDUGAIN_NAMESPACE_RESULT_INVALID_CREDENTIALS
The provided credentials were invalid |
static javax.xml.namespace.QName |
EDUGAIN_NAMESPACE_RESULT_MALFORMED_MESSAGE
Error in the structure or codification of the message |
static javax.xml.namespace.QName |
EDUGAIN_NAMESPACE_RESULT_REDIRECT_USER_TO
The user must be redirected to... |
static javax.xml.namespace.QName |
EDUGAIN_NAMESPACE_RESULT_TRUST_ERROR
Error checking the authenticity of the message |
static javax.xml.namespace.QName |
EDUGAIN_NAMESPACE_RESULT_UNKNOWN_HOMESITE
The homesite provided (or guessed by the HLS) is unknown |
protected java.lang.String |
errorMessage
Extra information about the error. |
protected javax.xml.namespace.QName |
errorReason
One of the possible error types taken into account in the system (see below) |
protected java.lang.String |
inResponseTo
A reference to the RequestID contained in the input message of the operation. |
protected java.util.ArrayList<java.net.URI> |
interfaces
A list of (possible) interfaces associated with a CONNECT_TO result |
protected java.util.Date |
issued
The instant this response was issued |
protected org.apache.log4j.Logger |
log
Generic logger attribute. |
protected java.util.Date |
notBefore
The date after this response will be valid |
protected java.util.Date |
notOnOrAfter
The date after this response will no longer be valid |
protected java.net.URI |
producerId
The component identifier for the producer of the response. |
private java.security.SecureRandom |
random
A secure random number generator |
protected java.lang.String |
responseID
A reference (internally generated by the responder) for this operation to be used in further interactions regarding the request. |
protected javax.xml.namespace.QName |
result
The result of the request. |
protected java.lang.String |
resultMessage
Extra information about the error. |
protected java.lang.Object |
samlObject
The OpenSAML object associated with this response. |
protected boolean |
strictMode
According to the eduGAIN Trust Fabric: |
protected Validator |
validator
The validator used to verify any response. |
| Constructor Summary | |
|---|---|
Response()
Creates a new instance of Response |
|
| Method Summary | |
|---|---|
void |
addInterface(java.net.URI iface)
Returns the list of interfaces associated with a ConnectTo result. |
protected void |
fromSAML(java.lang.Object obj)
Fill this Response with a SAML Document. |
abstract void |
fromSAML(org.opensaml.saml2.core.Response response)
Fill this Response with a SAML 2 Response |
abstract void |
fromSAML(org.opensaml.SAMLResponse response)
Fill this Response with a SAMLResponse. |
void |
generateResponseID()
Sets a randomly generated id for this request operation to be used in further interactions regarding this request. |
java.lang.String |
getAdditionalData()
Gets additional data |
java.net.URI |
getConsumerId()
Gets the component identifier for the eduGAIN component consuming this response . |
java.lang.String |
getInResponseTo()
Gets the identifier of the query being responded |
java.util.ArrayList<java.net.URI> |
getInterfaces()
Returns the list of interfaces associated with a ConnectTo result. |
java.util.Date |
getIssued()
Returns the date this response was issued |
java.util.Date |
getNotBefore()
Gets the date before this response should not be used |
java.util.Date |
getNotOnOrAfter()
Gets the date after this response should not be used |
java.net.URI |
getProducerId()
Gets the component identifier for the eduGAIN component producing this response . |
java.lang.String |
getResponseID()
Gets the identifier for this result |
javax.xml.namespace.QName |
getResult()
Gets the status code of this response |
java.lang.String |
getResultMessage()
Gets the message associated with the result. |
boolean |
isStrict()
Check if this Response is in strict mode. |
void |
setAdditionalData(java.lang.String data)
Sets additional data |
void |
setConsumerId(java.net.URI consumerId)
Sets the component identifier for the eduGAIN component consuming this response. |
void |
setInResponseTo(java.lang.String id)
Sets the identifier of the query being responded |
void |
setInterfaces(java.util.ArrayList<java.net.URI> list)
Returns the list of interfaces associated with a ConnectTo result. |
void |
setIssued(java.util.Date issued)
Sets the date this response is being issued (Issue Instant) |
void |
setNotBefore(java.util.Date notBefore)
Sets the date before this response should not be used |
void |
setNotOnOrAfter(java.util.Date notOnOrAfter)
Sets the date after this response should not be used |
void |
setProducerId(java.net.URI producerId)
Sets the component identifier for the eduGAIN component producing this response. |
void |
setResponseID(java.lang.String id)
Sets a reference for this request operation to be used in further interactions regarding this request. |
void |
setResult(javax.xml.namespace.QName code)
Sets the result code for the response |
void |
setResultMessage(java.lang.String resultMessage)
Sets the message associated with the result. |
void |
setStrict(boolean mode)
Set this Response in strict mode. |
void |
setValidator(Validator v)
Sets the Validator to use for every eduGAIN trust fabric operation. |
byte[] |
toBase64()
Marshalls this Response into its base 64 representation. |
abstract java.lang.Object |
toSAML()
Converts this response object into a SAML response. |
java.lang.String |
toString()
Marshalls this Response into its string representation. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private java.security.SecureRandom random
protected org.apache.log4j.Logger log
protected java.lang.String responseID
protected java.net.URI producerId
protected java.net.URI consumerId
protected java.lang.String inResponseTo
protected javax.xml.namespace.QName result
The result of the request. Possible values are:
protected java.lang.String resultMessage
protected java.util.Date issued
protected java.util.Date notBefore
protected java.util.Date notOnOrAfter
public static final javax.xml.namespace.QName EDUGAIN_NAMESPACE_RESULT_ACCEPTED
public static final javax.xml.namespace.QName EDUGAIN_NAMESPACE_RESULT_DENY
public static final javax.xml.namespace.QName EDUGAIN_NAMESPACE_RESULT_CONNECT_TO
public static final javax.xml.namespace.QName EDUGAIN_NAMESPACE_RESULT_REDIRECT_USER_TO
public static final javax.xml.namespace.QName EDUGAIN_NAMESPACE_RESULT_INSUFFICIENT_DATA
public static final javax.xml.namespace.QName EDUGAIN_NAMESPACE_RESULT_INVALID_CREDENTIALS
public static final javax.xml.namespace.QName EDUGAIN_NAMESPACE_RESULT_UNKNOWN_HOMESITE
public static final javax.xml.namespace.QName EDUGAIN_NAMESPACE_RESULT_FAULT
protected java.util.ArrayList<java.net.URI> interfaces
protected java.lang.String additionalData
Any other data the Authentication Service is willing to include. Possible purposes of these data are to provide additional logging and diagnostic information, or information relevant to the requesting resource, and any assumptions on their format is out of scope of this document.
This element is mapped to StatusDetail element which is unsupported in OpenSAML1, so for this version of the library, additionalData is unused.
protected javax.xml.namespace.QName errorReason
public static final javax.xml.namespace.QName EDUGAIN_NAMESPACE_RESULT_TRUST_ERROR
public static final javax.xml.namespace.QName EDUGAIN_NAMESPACE_RESULT_MALFORMED_MESSAGE
public static final javax.xml.namespace.QName EDUGAIN_NAMESPACE_RESULT_EXPIRED_MESSAGE
public static final javax.xml.namespace.QName EDUGAIN_NAMESPACE_RESULT_INCOMPATIBLE_VERSIONS
protected java.lang.String errorMessage
protected java.lang.Object samlObject
protected boolean strictMode
According to the eduGAIN Trust Fabric:
XML Signatures MUST be used in the following SAML constructs:
AuthenticationStatement
and (optionally) several SAML AttributeStatement in response
to an eduGAIN AuthenticationRequest.XML Signatures SHOULD be used in the following SAML constructs:
AttributeStatement in
response to an eduGAIN AttributeRequest.
protected Validator validator
| Constructor Detail |
|---|
public Response()
throws BaseException
BaseException| Method Detail |
|---|
public boolean isStrict()
public void setStrict(boolean mode)
mode - True if this Response should be strict, False else.public void setValidator(Validator v)
v - The custom Validator to use.public void setResponseID(java.lang.String id)
id - The response ID.public void generateResponseID()
public java.lang.String getResponseID()
public void setInResponseTo(java.lang.String id)
id - The identifierpublic java.lang.String getInResponseTo()
inResponseTo identifierpublic void setResult(javax.xml.namespace.QName code)
code - A valid result code (as thefined above)public javax.xml.namespace.QName getResult()
public java.util.ArrayList<java.net.URI> getInterfaces()
public void setInterfaces(java.util.ArrayList<java.net.URI> list)
list - The list of interfaces.public void addInterface(java.net.URI iface)
iface - An string array with the list of interfaces.public void setAdditionalData(java.lang.String data)
public java.lang.String getAdditionalData()
public java.net.URI getProducerId()
public void setProducerId(java.net.URI producerId)
producerId - An URN following eduGAIN component naming conventions.public java.net.URI getConsumerId()
public void setConsumerId(java.net.URI consumerId)
consumerId - An URN following eduGAIN component naming conventions.public java.lang.String getResultMessage()
public void setResultMessage(java.lang.String resultMessage)
resultMessage - The messagepublic java.util.Date getIssued()
public void setIssued(java.util.Date issued)
issued - The issue instantpublic java.util.Date getNotBefore()
public void setNotBefore(java.util.Date notBefore)
notBefore - The date when this response will be validpublic java.util.Date getNotOnOrAfter()
public void setNotOnOrAfter(java.util.Date notOnOrAfter)
notOnOrAfter - The date when this response won't be valid
protected void fromSAML(java.lang.Object obj)
throws BaseException
obj - The SAML response.
BaseException
public abstract void fromSAML(org.opensaml.SAMLResponse response)
throws BaseException
response - The SAML response.
BaseException
public abstract void fromSAML(org.opensaml.saml2.core.Response response)
throws BaseException
BaseException
public abstract java.lang.Object toSAML()
throws BaseException
SAMLResponse or a
Response, depending on the SAML version
eduGAIN is configured to use.
BaseExceptionpublic java.lang.String toString()
toString in class java.lang.Objectpublic byte[] toBase64()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||