com.sun.identity.saml
クラス SAMLClient

java.lang.Object
  上位を拡張 com.sun.identity.saml.SAMLClient

public class SAMLClient
extends 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.


メソッドの概要
static void doWebArtifact(HttpServletRequest request, HttpServletResponse response, String target)
          This method is designed to do the SAML web-browser profile with Artifact.
static void doWebPOST(HttpServletRequest request, HttpServletResponse response, String target)
          This method is designed to do the SAML web-browser POST profile.
static Assertion getAssertionByArtifact(AssertionArtifact artifact)
          This method returns the Assertion for the corresponding artifact.
static Assertion getAssertionByArtifact(String artifact)
          This method returns the Assertion for the corresponding artifact.
 

メソッドの詳細

doWebArtifact

public static void doWebArtifact(HttpServletRequest request,
                                 HttpServletResponse response,
                                 String target)
                          throws SAMLException
This method is designed to do the SAML web-browser profile with Artifact. Once the browser (user) authenticated to OpenSSO, it can call this method to complete the single sign on to the target host and be redirected to the specified target site.

パラメータ:
request - HTTP Servlet Request
response - HTTP Servlet Response
target - A String representing the target URL
例外:
IOException - if an input or output exception occurs when redirecting to service URL
SAMLException - if SAML error occurs during the process

doWebPOST

public static void doWebPOST(HttpServletRequest request,
                             HttpServletResponse response,
                             String target)
                      throws SAMLException
This method is designed to do the SAML web-browser POST profile. Once the browser (user) authenticated to OpenSSO, it can call this method to complete the single sign on to the target host and be redirected to the target site.

パラメータ:
request - HTTP Servlet Request
response - HTTP Servlet Response
target - A String representing the target URL
例外:
IOException - if an input or output exception occurs when redirecting to service URL
SAMLException - if SAML error occurs during the process

getAssertionByArtifact

public static Assertion getAssertionByArtifact(AssertionArtifact artifact)
                                        throws 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.

パラメータ:
artifact - An AssertionArtifact representing the artifact
戻り値:
An Assertion corresponding to the artifact
例外:
IOException - if an input or output exception occurs when connecting to SAML service URL
SAMLException - if SAML error occurs during the process

getAssertionByArtifact

public static Assertion getAssertionByArtifact(String artifact)
                                        throws 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.

パラメータ:
artifact - A String representing the artifact
戻り値:
An Assertion corresponding to the artifact
例外:
IOException - if an input or output exception occurs when connecting to SAML service URL
SAMLException - if SAML error occurs during the process