|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdiscovery.DiscoQuery
public class DiscoQuery
The DiscoQuery 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 org.w3c.dom.Node |
authenticationAssertionCopy
|
private java.lang.String |
authenticationIssuer
|
private static long |
MAX_TIME_DEVIATION
|
private javax.xml.soap.SOAPMessage |
message
|
private java.lang.String |
messageid
|
private java.lang.String |
reqServiceType
|
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 | |
---|---|
DiscoQuery(javax.xml.soap.SOAPMessage message)
The constructor tries to parse the body and the header of the SOAP message. |
Method Summary | |
---|---|
org.w3c.dom.Node |
getAuthenticationAssertion()
|
java.lang.String |
getMessageID()
|
java.lang.String |
getReqServiceType()
|
java.lang.String |
getResourceID()
|
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 service type and the resourceID. |
private void |
parseHead(javax.xml.soap.SOAPHeader node)
This method runs through all the nodes in the request body to find the nodes we need, which are the timestamp and the message token. |
private java.lang.String |
prepareAssertion(java.lang.String assertion)
This method removes extra spaces, line breaks and the signature element to make the assertion similar at all times when using it for signing and signature verification. |
private void |
processSecToken(org.w3c.dom.Node token,
int parsingDepth)
This method processes the security token to find if the assertion from the authentication service is correct. |
boolean |
sessionTimedOut()
|
java.lang.String |
toString()
Returns a string representation of this request. |
private void |
validateSignature(org.w3c.dom.Node signaturenode)
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 authenticationAssertion
private org.w3c.dom.Node authenticationAssertionCopy
private java.lang.String messageid
private java.lang.String resourceid
private java.lang.String userid
private java.lang.String reqServiceType
private java.lang.String authenticationIssuer
private javax.xml.soap.SOAPMessage message
Constructor Detail |
---|
public DiscoQuery(javax.xml.soap.SOAPMessage message) throws java.lang.Exception
message
- SOAPMessage The SOAPMessage containing the request
java.lang.Exception
- Thrown to show that the request parsing was unsuccessfulMethod Detail |
---|
private void parseBody(org.w3c.dom.Node node)
private void parseHead(javax.xml.soap.SOAPHeader node) throws java.lang.Exception
java.lang.Exception
private void processSecToken(org.w3c.dom.Node token, int parsingDepth) throws java.lang.Exception
java.lang.Exception
private java.lang.String prepareAssertion(java.lang.String assertion)
private void validateSignature(org.w3c.dom.Node signaturenode) throws java.lang.Exception
java.lang.Exception
public java.lang.String getUserID()
public java.lang.String getResourceID()
public java.lang.String getMessageID()
public java.util.Date getTimestamp()
public java.lang.String getReqServiceType()
public org.w3c.dom.Node getAuthenticationAssertion()
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 |