|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.xml.ws.security.trust.WSTrustElementFactory
public abstract class WSTrustElementFactory
A Factory for creating the WS-Trust schema elements, and marshalling/un-marshalling them
The default Implementation classes for all these WS-Trust schema Elements would assume that JAXB Bindings were generated for ws-trust.xsd schema in a particular fixed namespace/package. The default implementation classes for all these WS-Trust Element Interfaces would hence wrap the schema generated classes.
An STS Service can create a RequestSecurityToken from the JAXBBean(i.e RequestSecurityTokenType) it receives, as an SEI method parameter, in the following manner
RequestSecurityTokenType tok=...//obtained as JAXWS SEI method paramater ObjectFactory factory = new ObjectFactory(); JAXBElement<RequestSecurityTokenType> rst= factory.createRequestSecurityToken(tok); WSTrustElementFactory fact= .. RequestSecurityToken requestSecurityToken= fact.createRSTFrom(rst);
To get back a JAXB Bean from an instance of RequestSecurityToken the following can be done
JAXBElement<RequestSecurityTokenType> elem = fact.toJAXBElement(requestSecurityToken); RequestSecurityTokenType tok = elem.getValue();
Constructor Summary | |
---|---|
WSTrustElementFactory()
|
Method Summary | |
---|---|
abstract BinarySecret |
createBinarySecret(byte[] rawValue,
java.lang.String type)
Create a BinarySecret |
abstract BinarySecret |
createBinarySecret(org.w3c.dom.Element elem)
Create a BinarySecret |
abstract CancelTarget |
createCancelTarget(SecurityTokenReference str)
|
abstract Claims |
createClaims(org.w3c.dom.Element elem)
|
abstract DirectReference |
createDirectReference(java.lang.String valueType,
java.lang.String uri)
|
abstract Entropy |
createEntropy(BinarySecret secret)
Create an Entropy with a BinarySecret |
abstract Entropy |
createEntropy(com.sun.xml.ws.security.EncryptedKey key)
Create an Entropy with an xenc:EncryptedKey |
abstract IssuedTokens |
createIssuedTokens(RequestSecurityTokenResponseCollection issuedTokens)
Create a wst:IssuedTokens object |
abstract KeyIdentifier |
createKeyIdentifier(java.lang.String valueType,
java.lang.String encodingType)
|
abstract Lifetime |
createLifetime(com.sun.xml.ws.security.wsu10.AttributedDateTime created,
com.sun.xml.ws.security.wsu10.AttributedDateTime expires)
Create a Lifetime. |
abstract OnBehalfOf |
createOnBehalfOf(com.sun.xml.ws.security.Token oboToken)
|
abstract RenewTarget |
createRenewTarget(SecurityTokenReference str)
|
abstract RequestedAttachedReference |
createRequestedAttachedReference(SecurityTokenReference str)
Create a RequestedAttachedReference. |
abstract RequestedProofToken |
createRequestedProofToken()
Create a RequestedProofToken. |
abstract RequestedSecurityToken |
createRequestedSecurityToken()
|
abstract RequestedSecurityToken |
createRequestedSecurityToken(com.sun.xml.ws.security.Token token)
Create a RequestedSecurityToken. |
abstract RequestedUnattachedReference |
createRequestedUnattachedReference(SecurityTokenReference str)
Create a RequestedUnattachedReference. |
abstract RequestSecurityToken |
createRST()
Create an Empty RST |
abstract RequestSecurityToken |
createRSTForCancel(java.net.URI requestType,
CancelTarget target)
Create an RST for Token Cancellation |
abstract RequestSecurityToken |
createRSTForIssue(java.net.URI tokenType,
java.net.URI requestType,
java.net.URI context,
com.sun.xml.ws.policy.impl.bindings.AppliesTo scopes,
Claims claims,
Entropy entropy,
Lifetime lifetime)
Create an RST for Issue from the given arguments Any of the arguments can be null since they are all optional, but one of tokenType and AppliesTo must be present |
abstract RequestSecurityToken |
createRSTForRenew(java.net.URI tokenType,
java.net.URI requestType,
java.net.URI context,
RenewTarget target,
AllowPostdating apd,
Renewing renewingInfo)
Create an RST for a Renewal Request |
abstract RequestSecurityToken |
createRSTForValidate(java.net.URI tokenType,
java.net.URI requestType)
Create an RST for Token Validation |
abstract RequestSecurityToken |
createRSTFrom(org.w3c.dom.Element elem)
create an RST from DOM Element |
abstract RequestSecurityToken |
createRSTFrom(javax.xml.bind.JAXBElement elem)
create an RST from JAXBElement |
abstract RequestSecurityToken |
createRSTFrom(javax.xml.transform.Source src)
create an RST from a Source |
abstract RequestSecurityTokenResponse |
createRSTR()
Create an Empty RSTR |
abstract RequestSecurityTokenResponseCollection |
createRSTRC(java.util.List<RequestSecurityTokenResponse> rstrs)
|
abstract RequestSecurityTokenResponseCollection |
createRSTRCollectionForIssue(java.net.URI tokenType,
java.net.URI context,
RequestedSecurityToken token,
com.sun.xml.ws.policy.impl.bindings.AppliesTo scopes,
RequestedAttachedReference attachedRef,
RequestedUnattachedReference unattachedRef,
RequestedProofToken proofToken,
Entropy entropy,
Lifetime lifetime)
Create a collection of RequestSecurityTokenResponse(s) |
abstract RequestSecurityTokenResponseCollection |
createRSTRCollectionFrom(org.w3c.dom.Element elem)
Create RSTR Collection from Element |
abstract RequestSecurityTokenResponseCollection |
createRSTRCollectionFrom(javax.xml.bind.JAXBElement elem)
create an RSTR Collection from JAXBElement |
abstract RequestSecurityTokenResponseCollection |
createRSTRCollectionFrom(javax.xml.transform.Source src)
Create RSTR Collection from Source |
abstract RequestSecurityTokenResponse |
createRSTRForCancel()
Create an RSTR for a Successful Token Cancellation |
abstract RequestSecurityTokenResponse |
createRSTRForIssue(java.net.URI tokenType,
java.net.URI context,
RequestedSecurityToken token,
com.sun.xml.ws.policy.impl.bindings.AppliesTo scopes,
RequestedAttachedReference attachedRef,
RequestedUnattachedReference unattachedRef,
RequestedProofToken proofToken,
Entropy entropy,
Lifetime lifetime)
create an RSTR for Issue from the given arguments Any of the arguments can be null since they are all optional, but one of RequestedSecurityToken or RequestedProofToken should be returned |
abstract RequestSecurityTokenResponse |
createRSTRForRenew(java.net.URI tokenType,
java.net.URI context,
RequestedSecurityToken token,
RequestedAttachedReference attachedReference,
RequestedUnattachedReference unattachedRef,
RequestedProofToken proofToken,
Entropy entropy,
Lifetime lifetime)
Create an RSTR for a Renewal Response |
abstract RequestSecurityTokenResponse |
createRSTRForValidate(java.net.URI tokenType,
RequestedSecurityToken token,
Status status)
create an RSTR for validate request. |
abstract RequestSecurityTokenResponse |
createRSTRFrom(org.w3c.dom.Element elem)
create an RSTR from DOM Element |
abstract RequestSecurityTokenResponse |
createRSTRFrom(javax.xml.bind.JAXBElement elem)
create an RSTR from JAXBElement |
abstract RequestSecurityTokenResponse |
createRSTRFrom(javax.xml.transform.Source src)
create an RSTR from a Source |
abstract SecondaryParameters |
createSecondaryParameters()
Create SecondaryParameters |
abstract SecurityTokenReference |
createSecurityTokenReference(javax.xml.bind.JAXBElement elem)
|
abstract SecurityTokenReference |
createSecurityTokenReference(Reference ref)
|
abstract Status |
createStatus(java.lang.String code,
java.lang.String reason)
|
abstract UseKey |
createUseKey(com.sun.xml.ws.security.Token token,
java.lang.String sig)
|
abstract ValidateTarget |
createValidateTarget(com.sun.xml.ws.security.Token token)
|
static javax.xml.bind.JAXBContext |
getContext()
|
static javax.xml.bind.JAXBContext |
getContext(WSTrustVersion wstVer)
|
static WSTrustElementFactory |
newInstance()
|
static WSTrustElementFactory |
newInstance(WSSCVersion wsscVer)
|
static WSTrustElementFactory |
newInstance(WSTrustVersion wstVer)
|
abstract org.w3c.dom.Element |
toElement(BaseSTSRequest request)
|
abstract org.w3c.dom.Element |
toElement(BaseSTSResponse response)
|
abstract org.w3c.dom.Element |
toElement(BinarySecret binarySecret)
Marshal an BinarySecret to a DOM Element |
abstract org.w3c.dom.Element |
toElement(BinarySecret binarySecret,
org.w3c.dom.Document doc)
Marshal an BinarySecret to a DOM Element. |
abstract org.w3c.dom.Element |
toElement(RequestSecurityToken rst)
Marshal an RST to a DOM Element. |
abstract org.w3c.dom.Element |
toElement(RequestSecurityTokenResponse rstr)
Marshal an RSTR to DOM Element |
abstract org.w3c.dom.Element |
toElement(RequestSecurityTokenResponseCollection rstrCollection)
Marshal an RSTR Collection to a DOM Element |
abstract org.w3c.dom.Element |
toElement(RequestSecurityTokenResponse rstr,
org.w3c.dom.Document doc)
|
abstract org.w3c.dom.Element |
toElement(SecurityTokenReference str,
org.w3c.dom.Document doc)
Marshal an STR to a DOM Element. |
abstract javax.xml.bind.JAXBElement |
toJAXBElement(BaseSTSRequest request)
|
abstract javax.xml.bind.JAXBElement |
toJAXBElement(BaseSTSResponse response)
|
abstract javax.xml.bind.JAXBElement |
toJAXBElement(RequestSecurityToken rst)
convert an RST to a JAXBElement |
abstract javax.xml.bind.JAXBElement |
toJAXBElement(RequestSecurityTokenResponse rstr)
convert an RSTR to a JAXBElement |
abstract javax.xml.bind.JAXBElement |
toJAXBElement(RequestSecurityTokenResponseCollection rstrCollection)
convert an RSTR Collection to a JAXBElement |
abstract javax.xml.bind.JAXBElement |
toJAXBElement(SecurityTokenReference str)
convert an SecurityTokenReference to a JAXBElement |
abstract javax.xml.transform.Source |
toSource(BaseSTSRequest request)
|
abstract javax.xml.transform.Source |
toSource(BaseSTSResponse response)
|
abstract javax.xml.transform.Source |
toSource(RequestSecurityToken rst)
Marshal an RST to a Source. |
abstract javax.xml.transform.Source |
toSource(RequestSecurityTokenResponse rstr)
Marshal an RSTR to a Source |
abstract javax.xml.transform.Source |
toSource(RequestSecurityTokenResponseCollection rstrCollection)
Marshal an RSTR Collection to a Source |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WSTrustElementFactory()
Method Detail |
---|
public static javax.xml.bind.JAXBContext getContext()
public static javax.xml.bind.JAXBContext getContext(WSTrustVersion wstVer)
public static WSTrustElementFactory newInstance()
public static WSTrustElementFactory newInstance(WSTrustVersion wstVer)
public static WSTrustElementFactory newInstance(WSSCVersion wsscVer)
public abstract RequestSecurityToken createRSTForIssue(java.net.URI tokenType, java.net.URI requestType, java.net.URI context, com.sun.xml.ws.policy.impl.bindings.AppliesTo scopes, Claims claims, Entropy entropy, Lifetime lifetime) throws WSTrustException
WSTrustException
public abstract RequestSecurityTokenResponse createRSTRForIssue(java.net.URI tokenType, java.net.URI context, RequestedSecurityToken token, com.sun.xml.ws.policy.impl.bindings.AppliesTo scopes, RequestedAttachedReference attachedRef, RequestedUnattachedReference unattachedRef, RequestedProofToken proofToken, Entropy entropy, Lifetime lifetime) throws WSTrustException
WSTrustException
public abstract RequestSecurityTokenResponseCollection createRSTRCollectionForIssue(java.net.URI tokenType, java.net.URI context, RequestedSecurityToken token, com.sun.xml.ws.policy.impl.bindings.AppliesTo scopes, RequestedAttachedReference attachedRef, RequestedUnattachedReference unattachedRef, RequestedProofToken proofToken, Entropy entropy, Lifetime lifetime) throws WSTrustException
WSTrustException
public abstract IssuedTokens createIssuedTokens(RequestSecurityTokenResponseCollection issuedTokens)
public abstract Entropy createEntropy(BinarySecret secret)
public abstract Entropy createEntropy(com.sun.xml.ws.security.EncryptedKey key)
public abstract SecondaryParameters createSecondaryParameters()
public abstract BinarySecret createBinarySecret(byte[] rawValue, java.lang.String type)
public abstract BinarySecret createBinarySecret(org.w3c.dom.Element elem) throws WSTrustException
WSTrustException
public abstract UseKey createUseKey(com.sun.xml.ws.security.Token token, java.lang.String sig)
public abstract OnBehalfOf createOnBehalfOf(com.sun.xml.ws.security.Token oboToken)
public abstract ValidateTarget createValidateTarget(com.sun.xml.ws.security.Token token)
public abstract Status createStatus(java.lang.String code, java.lang.String reason)
public abstract Lifetime createLifetime(com.sun.xml.ws.security.wsu10.AttributedDateTime created, com.sun.xml.ws.security.wsu10.AttributedDateTime expires)
public abstract RequestedProofToken createRequestedProofToken()
public abstract RequestedSecurityToken createRequestedSecurityToken(com.sun.xml.ws.security.Token token)
public abstract RequestedSecurityToken createRequestedSecurityToken()
public abstract DirectReference createDirectReference(java.lang.String valueType, java.lang.String uri)
public abstract KeyIdentifier createKeyIdentifier(java.lang.String valueType, java.lang.String encodingType)
public abstract SecurityTokenReference createSecurityTokenReference(Reference ref)
public abstract RequestedAttachedReference createRequestedAttachedReference(SecurityTokenReference str)
public abstract RequestedUnattachedReference createRequestedUnattachedReference(SecurityTokenReference str)
public abstract RequestSecurityToken createRSTForRenew(java.net.URI tokenType, java.net.URI requestType, java.net.URI context, RenewTarget target, AllowPostdating apd, Renewing renewingInfo)
public abstract RequestSecurityTokenResponse createRSTRForRenew(java.net.URI tokenType, java.net.URI context, RequestedSecurityToken token, RequestedAttachedReference attachedReference, RequestedUnattachedReference unattachedRef, RequestedProofToken proofToken, Entropy entropy, Lifetime lifetime) throws WSTrustException
WSTrustException
public abstract RenewTarget createRenewTarget(SecurityTokenReference str)
public abstract CancelTarget createCancelTarget(SecurityTokenReference str)
public abstract RequestSecurityToken createRSTForCancel(java.net.URI requestType, CancelTarget target)
public abstract RequestSecurityTokenResponse createRSTRForCancel()
public abstract RequestSecurityToken createRSTForValidate(java.net.URI tokenType, java.net.URI requestType)
TODO: Not clear from Spec whether the Token to be validated is ever sent ? TODO: There is a mention of special case where a SOAPEnvelope may be specified as a security token if the requestor desires the envelope to be validated.
public abstract RequestSecurityTokenResponse createRSTRForValidate(java.net.URI tokenType, RequestedSecurityToken token, Status status)
public abstract RequestSecurityTokenResponseCollection createRSTRC(java.util.List<RequestSecurityTokenResponse> rstrs)
public abstract RequestSecurityToken createRST()
public abstract RequestSecurityTokenResponse createRSTR()
public abstract RequestSecurityToken createRSTFrom(javax.xml.transform.Source src)
public abstract RequestSecurityToken createRSTFrom(org.w3c.dom.Element elem)
public abstract RequestSecurityTokenResponse createRSTRFrom(javax.xml.transform.Source src)
public abstract RequestSecurityTokenResponse createRSTRFrom(org.w3c.dom.Element elem)
public abstract RequestSecurityTokenResponseCollection createRSTRCollectionFrom(javax.xml.transform.Source src)
public abstract RequestSecurityTokenResponseCollection createRSTRCollectionFrom(org.w3c.dom.Element elem)
public abstract Claims createClaims(org.w3c.dom.Element elem) throws WSTrustException
WSTrustException
public abstract RequestSecurityToken createRSTFrom(javax.xml.bind.JAXBElement elem)
NOTE: an STS Implementor can call
JAXBElement<RequestSecurityTokenType> elem= ObjectFactory.createRequestSecurityToken(<JAXBBean for RST>)The JAXBBean for RST is the one generated from the ws-trust.xsd schema The default implementation expects the packagename of the generated JAXB Beans to be fixed.
public abstract RequestSecurityTokenResponse createRSTRFrom(javax.xml.bind.JAXBElement elem)
NOTE: an STS Implementor can call
JAXBElement<RequestSecurityTokenResponseType> elem= ObjectFactory.createRequestSecurityTokenResponse(<JAXBBean for RSTR>);The <JAXBBean for RSTR> is the one generated from the ws-trust.xsd schema The default implementation expects the packagename of the generated JAXB Beans to be fixed.
public abstract RequestSecurityTokenResponseCollection createRSTRCollectionFrom(javax.xml.bind.JAXBElement elem)
NOTE: an STS Implementor can call
JAXBElement<RequestSecurityTokenResponseCollectionType> elem= ObjectFactory.createRequestSecurityTokenResponseCollection(<JAXBBean for RSTR Collection>The <JAXBBean for RSTR Collection> is the one generated from the ws-trust.xsd schema The default implementation expects the packagename of the generated JAXB Beans to be fixed.
public abstract SecurityTokenReference createSecurityTokenReference(javax.xml.bind.JAXBElement elem)
public abstract javax.xml.bind.JAXBElement toJAXBElement(BaseSTSRequest request)
public abstract javax.xml.bind.JAXBElement toJAXBElement(BaseSTSResponse response)
public abstract javax.xml.bind.JAXBElement toJAXBElement(SecurityTokenReference str)
public abstract javax.xml.bind.JAXBElement toJAXBElement(RequestSecurityToken rst)
public abstract javax.xml.bind.JAXBElement toJAXBElement(RequestSecurityTokenResponse rstr)
public abstract javax.xml.bind.JAXBElement toJAXBElement(RequestSecurityTokenResponseCollection rstrCollection)
public abstract javax.xml.transform.Source toSource(BaseSTSRequest request)
public abstract javax.xml.transform.Source toSource(BaseSTSResponse response)
public abstract javax.xml.transform.Source toSource(RequestSecurityToken rst)
Note: Useful for Dispatch Client implementations
public abstract javax.xml.transform.Source toSource(RequestSecurityTokenResponse rstr)
Note: Useful for STS implementations which are JAXWS Providers
public abstract javax.xml.transform.Source toSource(RequestSecurityTokenResponseCollection rstrCollection)
Note: Useful for STS implementations which are JAXWS Providers
public abstract org.w3c.dom.Element toElement(BaseSTSRequest request)
public abstract org.w3c.dom.Element toElement(BaseSTSResponse response)
public abstract org.w3c.dom.Element toElement(RequestSecurityToken rst)
Note: Useful for Dispatch Client implementations
public abstract org.w3c.dom.Element toElement(RequestSecurityTokenResponse rstr)
Note: Useful for STS implementations which are JAXWS Providers
public abstract org.w3c.dom.Element toElement(RequestSecurityTokenResponse rstr, org.w3c.dom.Document doc)
public abstract org.w3c.dom.Element toElement(RequestSecurityTokenResponseCollection rstrCollection)
Note: Useful for STS implementations which are JAXWS Providers
public abstract org.w3c.dom.Element toElement(BinarySecret binarySecret)
Note: Useful for STS implementations which are JAXWS Providers
public abstract org.w3c.dom.Element toElement(SecurityTokenReference str, org.w3c.dom.Document doc)
Note: Useful for Dispatch Client implementations
public abstract org.w3c.dom.Element toElement(BinarySecret binarySecret, org.w3c.dom.Document doc)
Note: Useful for Dispatch Client implementations
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |