|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuk.ac.soton.itinnovation.grid.comms.wstrust.WSTrustUtils
public class WSTrustUtils
Useful methods for dealing with WS-Trust services.
| Constructor Summary | |
|---|---|
WSTrustUtils()
|
|
| Method Summary | |
|---|---|
static Document |
createIssuanceResponse(String resourceID,
X509Certificate user,
int expiryTime,
Key privateKey,
URL serviceAddress)
Create the WS-Trust response document for token issuance (containing a SAML assertion). |
static Element |
createTokenSourcePolicy(org.apache.axis.message.addressing.EndpointReferenceType sourceEPR)
|
static Document |
createValidationResponse(String code,
String reason)
Create a RequestSecurityTokenResponse for a status validation. |
static void |
ensureValidationSuccessful(Document response)
Process a WS-Trust validation response. |
static Element |
getSecurityTokenFromResponse(Document requestSecurityTokenResponse)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WSTrustUtils()
| Method Detail |
|---|
public static Document createIssuanceResponse(String resourceID,
X509Certificate user,
int expiryTime,
Key privateKey,
URL serviceAddress)
resourceID - the UUID of the membership groupuser - the certificate of the user we are making the assertion aboutexpiryTime - how long the token is valid till (milliseconds)privateKey - the private key of the service making the assertionserviceAddress - the address of the service making the assertion
public static Document createValidationResponse(String code,
String reason)
code - should be WSTrust.WSTRUST_STATUS_VALID or WSTrust.WSTRUST_STATUS_INVALIDreason - a human-readable reason, or null
public static void ensureValidationSuccessful(Document response)
throws TokenInvalidException
response - from a validation operation
TokenInvalidException - if the response code is not WSTrust.WSTRUST_STATUS_VALIDpublic static Element getSecurityTokenFromResponse(Document requestSecurityTokenResponse)
public static Element createTokenSourcePolicy(org.apache.axis.message.addressing.EndpointReferenceType sourceEPR)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||