Class RequestSecurityTokenResponse
- java.lang.Object
-
- com.sun.identity.wsfederation.profile.RequestSecurityTokenResponse
-
public class RequestSecurityTokenResponse extends Object
This class encapsulates the WS-Trust <RequestSecurityTokenResponse> element
-
-
Field Summary
Fields Modifier and Type Field Description protected StringappliesToprotected Stringissuerprotected Stringrecipientprotected RequestedSecurityTokentokenprotected booleanvalidprotected booleanvalidationDone
-
Constructor Summary
Constructors Constructor Description RequestSecurityTokenResponse(RequestedSecurityToken token)Creates a new instance of RequestSecurityTokenResponse (RSTR).RequestSecurityTokenResponse(RequestedSecurityToken token, String appliesTo)Creates a new instance of RequestSecurityTokenResponse (RSTR).RequestSecurityTokenResponse(Element root)Creates a new instance of RequestSecurityTokenResponse (RSTR) from a DOM Element
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetAppliesTo()This method returns the intended consumer of the RSTRRequestedSecurityTokengetRequestedSecurityToken()This method returns the component RequestedSecurityTokenstatic RequestSecurityTokenResponseparseXML(InputStream is)Returns RequestSecurityTokenResponse object based on the data in the input stream.static RequestSecurityTokenResponseparseXML(String xml)Returns RequestSecurityTokenResponse object based on the XML document received from server.StringtoString()This method marshalls the RSTR, returning a String comprising the textual XML representation.
-
-
-
Field Detail
-
valid
protected boolean valid
-
recipient
protected String recipient
-
validationDone
protected boolean validationDone
-
appliesTo
protected String appliesTo
-
issuer
protected String issuer
-
token
protected RequestedSecurityToken token
-
-
Constructor Detail
-
RequestSecurityTokenResponse
public RequestSecurityTokenResponse(RequestedSecurityToken token, String appliesTo)
Creates a new instance of RequestSecurityTokenResponse (RSTR).- Parameters:
token- the <RequestedSecurityToken> for the RSTRappliesTo- the consumer of the RSTR
-
RequestSecurityTokenResponse
public RequestSecurityTokenResponse(RequestedSecurityToken token)
Creates a new instance of RequestSecurityTokenResponse (RSTR).- Parameters:
token- the <RequestedSecurityToken> for the RSTR
-
RequestSecurityTokenResponse
public RequestSecurityTokenResponse(Element root) throws WSFederationException
Creates a new instance of RequestSecurityTokenResponse (RSTR) from a DOM Element- Parameters:
root- <RequestedSecurityToken> element- Throws:
WSFederationException- if an error occurs.
-
-
Method Detail
-
parseXML
public static RequestSecurityTokenResponse parseXML(String xml) throws WSFederationException
Returns RequestSecurityTokenResponse object based on the XML document received from server. This method is used primarily at the client side. The schema of the XML document is defined in WS-Trust.- Parameters:
xml- The RequestSecurityTokenResponse XML document String.- Returns:
- RequestSecurityTokenResponse object based on the XML document received from server.
- Throws:
WSFederationException- if XML parsing failed
-
parseXML
public static RequestSecurityTokenResponse parseXML(InputStream is) throws WSFederationException
Returns RequestSecurityTokenResponse object based on the data in the input stream. This method is used primarily at the client side. The schema of the XML document is defined in WS-Trust.- Parameters:
is- an InputStream- Returns:
- RequestSecurityTokenResponse object based on the XML document received from server.
- Throws:
WSFederationException- if XML parsing failed
-
getRequestedSecurityToken
public RequestedSecurityToken getRequestedSecurityToken()
This method returns the component RequestedSecurityToken- Returns:
- The RequestedSecurityToken contained in the RSTR.
-
getAppliesTo
public String getAppliesTo()
This method returns the intended consumer of the RSTR- Returns:
- The intended consumer of the RSTR.
-
-