|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectloanfund.ServiceRequest
public class ServiceRequest
The ServiceRequest is used to parse the request and save the information that we need to verify the validity of the message and to find the information needed in the response.
Field Summary | |
---|---|
private org.w3c.dom.Node |
authenticationAssertion
|
private java.lang.String |
authenticationIssuer
|
private org.w3c.dom.Node |
authorizationAssertion
|
private java.lang.String |
authorizationIssuer
|
private java.lang.String |
language
|
private static long |
MAX_TIME_DEVIATION
|
private javax.xml.soap.SOAPMessage |
message
|
private java.lang.String |
messageid
|
private java.lang.String |
resourceid
|
private static long |
SESSION_TIME_TO_LIVE
|
private java.util.Date |
sessiontimeout
|
private java.util.Date |
timestamp
|
private java.lang.String |
userid
|
Constructor Summary | |
---|---|
ServiceRequest(javax.xml.soap.SOAPMessage message)
The constructor tries to parse the body and the header of the SOAP message. |
Method Summary | |
---|---|
java.lang.String |
getLanguage()
|
java.lang.String |
getMessageID()
|
java.util.Date |
getTimestamp()
|
java.lang.String |
getUserID()
|
private void |
parseBody(org.w3c.dom.Node node)
This method runs through all the nodes in the request body to find the nodes we need, which are the language and resourceID. |
private void |
parseHeader(javax.xml.soap.SOAPHeader header)
This method parses the header of the message and checks the timestamp for possible replay of messages. |
private java.lang.String |
prepareAssertion(java.lang.String assertion,
boolean removeOnlySecond)
This method removes extra spaces, line breaks, wrong namespaces and the signature element to make the assertion similar at all times when using it for signing and signature verification. |
private void |
processAuthenticationToken(org.w3c.dom.Node token,
int parsingDebth)
This method processes the authentication assertion that was in the header. |
private void |
processAuthorizationToken(org.w3c.dom.Node token,
int parsingDebth)
This method processes the authorisation assertion that was in the header. |
boolean |
sessionTimedOut()
|
java.lang.String |
toString()
Returns a string representation of this request. |
private void |
validateSignature(org.w3c.dom.Node signaturenode,
boolean authentication)
This method validates the signature and throws an Exception if there is something wrong, to indicate that an invalid assertion and that we should not proceed with creating a response. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private static final long MAX_TIME_DEVIATION
private static final long SESSION_TIME_TO_LIVE
private java.util.Date sessiontimeout
private java.util.Date timestamp
private org.w3c.dom.Node authorizationAssertion
private org.w3c.dom.Node authenticationAssertion
private javax.xml.soap.SOAPMessage message
private java.lang.String authenticationIssuer
private java.lang.String authorizationIssuer
private java.lang.String language
private java.lang.String messageid
private java.lang.String resourceid
private java.lang.String userid
Constructor Detail |
---|
public ServiceRequest(javax.xml.soap.SOAPMessage message) throws ServiceRequestException
message
- SOAPMessage The SOAPMessage containing the request
ServiceRequestException
- Thrown to show that the request parsing was unsuccessfulMethod Detail |
---|
private void parseHeader(javax.xml.soap.SOAPHeader header) throws javax.xml.soap.SOAPException, ServiceRequestException, java.security.GeneralSecurityException
javax.xml.soap.SOAPException
ServiceRequestException
java.security.GeneralSecurityException
private void processAuthorizationToken(org.w3c.dom.Node token, int parsingDebth) throws javax.xml.soap.SOAPException, ServiceRequestException, java.security.GeneralSecurityException
javax.xml.soap.SOAPException
ServiceRequestException
java.security.GeneralSecurityException
private void processAuthenticationToken(org.w3c.dom.Node token, int parsingDebth) throws javax.xml.soap.SOAPException, ServiceRequestException, java.security.GeneralSecurityException
javax.xml.soap.SOAPException
ServiceRequestException
java.security.GeneralSecurityException
private java.lang.String prepareAssertion(java.lang.String assertion, boolean removeOnlySecond)
private void validateSignature(org.w3c.dom.Node signaturenode, boolean authentication) throws java.security.GeneralSecurityException
java.security.GeneralSecurityException
private void parseBody(org.w3c.dom.Node node) throws javax.xml.soap.SOAPException
javax.xml.soap.SOAPException
public java.lang.String getLanguage()
public java.lang.String getUserID()
public java.lang.String getMessageID()
public java.util.Date getTimestamp()
public boolean sessionTimedOut()
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |