com.sun.identity.saml
Class SAMLClient
java.lang.Object
|
+--com.sun.identity.saml.SAMLClient
- public class SAMLClient
- extends java.lang.Object
The class SAMLClient
provides interfaces
to do Web and POST profile as specified by SAML specification. It
also provides methods to get Assertions based on Artifacts.
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
doWebArtifact
public static void doWebArtifact(HttpServletRequest request,
HttpServletResponse response,
java.lang.String target)
throws java.io.IOException,
SAMLException
- This method is designed to do the SAML web-browser profile with Artifact.
Once the browser (user) authenticated to Identity Server,
it can call this method to
complete the single sign on to the target host and be redirected to the
specified target site.
- Parameters:
request
- HttpServletRequestresponse
- HttpServletResponsetarget
- A String representing the target URL
doWebPOST
public static void doWebPOST(HttpServletRequest request,
HttpServletResponse response,
java.lang.String target)
throws java.io.IOException,
SAMLException
- This method is designed to do the SAML web-browser POST profile.
Once the browser (user) authenticated to Identity Server,
it can call this method
to complete the single sign on to the target host and be redirected to the
target site.
- Parameters:
request
- HttpServletRequestresponse
- HttpServletResponsetarget
- A String representing the target URL
getAssertionByArtifact
public static Assertion getAssertionByArtifact(AssertionArtifact artifact)
throws java.io.IOException,
SAMLException
- This method returns the Assertion for the corresponding artifact. It sends
an ArtifactQuery SAML message to the destination identified by the source
ID in the artifact and returns the Assertion contained in the SAML response
message.
- Parameters:
artifact
- An AssertionArtifact representing the artifact- Returns:
- An Assertion corresponding to the artifact
getAssertionByArtifact
public static Assertion getAssertionByArtifact(java.lang.String artifact)
throws java.io.IOException,
SAMLException
- This method returns the Assertion for the corresponding artifact. It sends
an ArtifactQuery SAML message to the destination identified by the source
ID in the artifact and returns the Assertion contained in the SAML
response message.
- Parameters:
artifact
- A String representing the artifact- Returns:
- An Assertion corresponding to the artifact