10 Oracle Liberty SDK
Java開発者は、Oracle Liberty SDKを使用して、シングル・サインオン(SSO)およびフェデレーテッド・アイデンティティ管理(FIM)ソリューションを設計および開発することができます。このSDKは、Liberty Alliance ID-FF 1.1および1.2の仕様に準拠するシステムの開発と統合のあらゆる面の統一、単純化および拡張を目的としています。
Liberty Allianceは、個人および企業が貴重なアイデンティティ情報のプライバシやセキュリティを危険にさらすことなく、ほとんどすべてのトランザクションを実行できるようにすることを目標に設立されました。Liberty Allianceによって発行された仕様は、オープンなアイデンティティ・フェデレーション・フレームワークに基づいており、これにより、業務提携する企業は、組織をまたがるフェデレーテッド・ネットワーク・アイデンティティ・モデルに基づいた業務関係を形成できるようになります。
この章には次のトピックが含まれます:
10.1 Oracle Liberty SDKの機能と利点
Oracle Liberty SDK 1.1および1.2では、直観的でわかりやすいJava APIを使用することでソフトウェア開発の単純化が実現されています。このツールキットによって、Liberty Alliance仕様に準拠するソリューションの開発を支援するツール、情報およびサンプルが提供されます。また、ツールキットは、アプレット、アプリケーション、EJB、サーブレット、JSPなど、あらゆる既存のJavaソリューションに透過的に統合できます。
Oracle Liberty SDKは、次の機能を提供するPure Javaソリューションです。
-
Liberty Alliance ID-FFバージョン1.1および1.2仕様のサポート
-
Libertyベースのシングル・サインオンおよびフェデレーテッド・アイデンティティ・プロトコルのサポート
-
SAML 1.0/1.1仕様のサポート
関連項目:
Liberty Alliance仕様は、http://www.projectliberty.org/resources/specifications.php
を参照してください。
10.2 Oracle Liberty 1.1
Oracle Liberty 1.1は、Liberty Alliance ID-FF 1.1仕様に準拠しています。認証リクエスト/レスポンス、ログアウト・リクエスト/レスポンス、フェデレーション終了などの機能を提供するクラス、インタフェースおよびメソッドが含まれています。
この項では、Oracle Liberty 1.1の環境設定方法と使用方法、およびOracle Liberty 1.1のクラスとインタフェースについて説明します。次の項目が含まれます。
10.2.1 Oracle Liberty 1.1の環境設定
Oracle Liberty 1.1の環境を設定するには、Oracle Security Developer ToolsとJava Development Kit (JDK)をインストールし、必要なすべてのjarファイルおよびclassファイルへのCLASSPATH変数を設定します。
Oracle Security Developer Toolsは、Oracle WebLogic ServerとともにORACLE_HOME
にインストールされます。
10.2.1.1 Oracle Liberty 1.1のシステム要件の理解
Oracle Liberty 1.1を使用するには、システムにJava Development Kit (JDK)バージョン1.6以上が必要です。
CLASSPATH
環境変数には、必要なjarファイルおよびclassファイルすべてのフルパスとファイル名を指定してください。次の項目をCLASSPATH
に指定します。
-
osdt_core.jar
-
osdt_cert.jar
-
osdt_xmlsec.jar
-
osdt_saml.jar
-
org.jaxen_1.1.1.jar
ファイル(Oracle XML Securityディストリビューションに含まれるJaxen XPathエンジン) -
osdt_lib_v11.jar
ファイル
たとえば、CLASSPATH
は次のようになります。
%CLASSPATH%;%ORACLE_HOME%\modules\oracle.osdt_11.1.1\osdt_core.jar; %ORACLE_HOME%\modules\oracle.osdt_11.1.1\osdt_cert.jar; %ORACLE_HOME%\modules\oracle.osdt_11.1.1\osdt_xmlsec.jar; %ORACLE_HOME%\modules\oracle.osdt_11.1.1\osdt_saml.jar; %ORACLE_HOME%\modules\org.jaxen_1.1.1.jar; %ORACLE_HOME%\modules\oracle.osdt_11.1.1\osdt_lib_v11.jar;
関連項目:
10.2.2 Oracle Liberty 1.1のクラスとインタフェースの概要
Oracle Liberty SDK v. 1.1には、認証リクエスト/レスポンス、ログアウト・リクエスト/レスポンス、フェデレーション終了などの機能を提供するコア・クラスとインタフェースおよびサポート・クラスとインタフェースが含まれています。
この項では、Oracle Liberty SDK v. 1.1の有用なクラスとインタフェースの一部を示します。この項の内容は、次のとおりです。
10.2.2.1 コア・クラスとインタフェースの使用方法
Oracle Liberty SDK v. 1.1のコア・クラスおよびインタフェースにより、認証リクエストおよびレスポンス要素、ログアウト・リクエストおよびレスポンス要素、登録名識別子を作成できます。
この項には次のトピックが含まれます。
10.2.2.1.1 oracle.security.xmlsec.liberty.v11.AuthnRequestクラスの使用方法
このクラスは、Libertyプロトコル・スキーマのAuthnRequest
要素を表します。
次の例に、新しいAuthnRequest
要素を作成して文書に追加する方法を示します。
Document doc = Instance of org.w3c.dom.Document;
AuthnRequest authnRequest = new AuthnRequest(doc);
doc.getDocumentElement().appendChild(authnRequest);
次の例に、AuthnRequest
要素をXML文書から取得する方法を示します。
Document doc = Instance of org.w3c.dom.Document;
// Get list of all AuthnRequest elements in the document.
NodeList arList =
doc.getElementsByTagNameNS(LibertyURI.ns_liberty, "AuthnRequest");
if (arList.getLength() == 0)
System.err.println("No AuthnRequest elements found.");
// Convert each org.w3c.dom.Node object to an
// oracle.security.xmlsec.liberty.v11.AuthnRequest object and process
for (int s = 0, n = arList.getLength(); s < n; ++s)
{
AuthnRequest authnRequest =
new AuthnRequest((Element)arList.item(s));
// Process AuthnRequest element
...
}
10.2.2.1.2 oracle.security.xmlsec.liberty.v11.AuthnResponseクラスの使用方法
このクラスは、Libertyプロトコル・スキーマのAuthnResponse
要素を表します。
次の例に、新しいAuthnResponse
要素を作成して文書に追加する方法を示します。
Document doc = Instance of org.w3c.dom.Document;
AuthnResponse authnResponse = new AuthnResponse(doc);
doc.getDocumentElement().appendChild(authnResponse);
次の例に、AuthnResponse
要素をXML文書から取得する方法を示します。
Document doc = Instance of org.w3c.dom.Document;
// Get list of all AuthnResponse elements in the document.
NodeList arList =
doc.getElementsByTagNameNS(LibertyURI.ns_liberty, "AuthnResponse");
if (arList.getLength() == 0)
System.err.println("No AuthnResponse elements found.");
// Convert each org.w3c.dom.Node object to an
// oracle.security.xmlsec.liberty.v11.AuthnResponse object and process
for (int s = 0, n = arList.getLength(); s < n; ++s)
{
AuthnResponse authnResponse =
new AuthnResponse((Element)arList.item(s));
// Process AuthnResponse element
...
}
10.2.2.1.3 oracle.security.xmlsec.liberty.v11.FederationTerminationNotificationクラスの使用方法
このクラスは、Libertyプロトコル・スキーマのFederationTerminationNotification
要素を表します。
次の例に、新しいフェデレーション終了通知要素を作成して文書に追加する方法を示します。
Document doc = Instance of org.w3c.dom.Document; FederationTerminationNotification ftn = new FederationTerminationNotification(doc); doc.getDocumentElement().appendChild(ftn);
次の例に、フェデレーション終了通知要素をXML文書から取得する方法を示します。
Document doc = Instance of org.w3c.dom.Document;
// Get list of all FederationTerminationNotification elements in the document
NodeList ftnList = doc.getElementsByTagNameNS(LibertyURI.ns_liberty,
"FederationTerminationNotification");
if (ftnList.getLength() == 0)
System.err.println("No FederationTerminationNotification elements found.");
// Convert each org.w3c.dom.Node object to an
// oracle.security.xmlsec.liberty.v11.FederationTerminationNotification
// object and process
for (int s = 0, n = ftnList.getLength(); s < n; ++s)
{
FederationTerminationNotification ftn =
new FederationTerminationNotification((Element)ftnList.item(s));
// Process FederationTerminationNotification element
...
}
10.2.2.1.4 oracle.security.xmlsec.liberty.v11.LogoutRequestクラスの使用方法
このクラスは、Libertyプロトコル・スキーマのLogoutRequest
要素を表します。
次の例に、新しいLogoutRequest
要素を作成して文書に追加する方法を示します。
Document doc = Instance of org.w3c.dom.Document;
LogoutRequest lr = new LogoutRequest(doc);
doc.getDocumentElement().appendChild(lr);
次の例に、LogoutRequest
要素をXML文書から取得する方法を示します。
Document doc = Instance of org.w3c.dom.Document;
// Get list of all LogoutRequest elements in the document.
NodeList lrList = doc.getElementsByTagNameNS(LibertyURI.ns_liberty,
"LogoutRequest");
if (lrList.getLength() == 0)
System.err.println("No LogoutRequest elements found.");
// Convert each org.w3c.dom.Node object to an
// oracle.security.xmlsec.liberty.v11.LogoutRequest
// object and process
for (int s = 0, n = lrList.getLength(); s < n; ++s)
{
LogoutRequest lr = new LogoutRequest((Element)lrList.item(s));
// Process LogoutRequest element
...
}
10.2.2.1.5 oracle.security.xmlsec.liberty.v11.LogoutResponseクラスの使用方法
このクラスは、Libertyプロトコル・スキーマのLogoutResponse
要素を表します。
次の例に、新しいLogoutResponse
要素を作成して文書に追加する方法を示します。
Document doc = Instance of org.w3c.dom.Document;
LogoutResponse lr = new LogoutResponse(doc);
doc.getDocumentElement().appendChild(lr);
次の例に、LogoutResponse
要素をXML文書から取得する方法を示します。
Document doc = Instance of org.w3c.dom.Document;
// Get list of all LogoutResponse elements in the document.
NodeList lrList =
doc.getElementsByTagNameNS(LibertyURI.ns_liberty, "LogoutResponse");
if (lrList.getLength() == 0)
System.err.println("No LogoutResponse elements found.");
// Convert each org.w3c.dom.Node object to an
// oracle.security.xmlsec.liberty.v11.LogoutResponse
// object and process
for (int s = 0, n = lrList.getLength(); s < n; ++s)
{
LogoutResponse lr = new LogoutResponse((Element)lrList.item(s));
// Process LogoutResponse element
...
}
10.2.2.1.6 oracle.security.xmlsec.liberty.v11.RegisterNameIdentifierRequestクラスの使用方法
このクラスは、Libertyプロトコル・スキーマのRegisterNameIdentifierRequest
要素を表します。
次の例に、新しいRegisterNameIdentifierRequest
要素を作成して文書に追加する方法を示します。
Document doc = Instance of org.w3c.dom.Document;
RegisterNameIdentifierRequest rnir =
new RegisterNameIdentifierRequest(doc);
doc.getDocumentElement().appendChild(rnir);
次の例に、RegisterNameIdentifierRequest
要素をXML文書から取得する方法を示します。
Document doc = Instance of org.w3c.dom.Document;
// Get list of all RegisterNameIdentifierRequest elements in the document
NodeList rnirList = doc.getElementsByTagNameNS(LibertyURI.ns_liberty,
"RegisterNameIdentifierRequest");
if (rnirList.getLength() == 0)
System.err.println("No RegisterNameIdentifierRequest elements found.");
// Convert each org.w3c.dom.Node object to an
//oracle.security.xmlsec.liberty.v11.RegisterNameIdentifierRequest
// object and process
for (int s = 0, n = rnirList.getLength(); s < n; ++s)
{
RegisterNameIdentifierRequest rnir = new
RegisterNameIdentifierRequest((Element)rnirList.item(s));
// Process RegisterNameIdentifierRequest element
...
}
10.2.2.1.7 oracle.security.xmlsec.liberty.v11.RegisterNameIdentifierResponseクラスの使用方法
このクラスは、Libertyプロトコル・スキーマのRegisterNameIdentifierResponse
要素を表します。
次の例に、新しいRegisterNameIdentifierResponse
要素を作成して文書に追加する方法を示します。
Document doc = Instance of org.w3c.dom.Document;
RegisterNameIdentifierResponse rnir = new RegisterNameIdentifierResponse(doc);
doc.getDocumentElement().appendChild(rnir);
次の例に、RegisterNameIdentifierResponse
要素をXML文書から取得する方法を示します。
Document doc = Instance of org.w3c.dom.Document;
// Get list of all RegisterNameIdentifierResponse elements in the document
NodeList rnirList = doc.getElementsByTagNameNS(LibertyURI.ns_liberty,
"RegisterNameIdentifierResponse");
if (rnirList.getLength() == 0)
System.err.println("No RegisterNameIdentifierResponse elements found.");
// Convert each org.w3c.dom.Node object to an
// oracle.security.xmlsec.liberty.v11.RegisterNameIdentifierResponse
// object and process
for (int s = 0, n = rnirList.getLength(); s < n; ++s)
{
RegisterNameIdentifierResponse rnir = new
RegisterNameIdentifierResponse((Element)rnirList.item(s));
// Process RegisterNameIdentifierResponse element
...
}
10.2.2.2 サポート・クラスとインタフェースの使用方法
この項では、Oracle Liberty SDK v. 1.1のサポート・クラスとインタフェースについて説明します。
サポート・クラスとインタフェースを次に示します。
10.2.2.2.1 oracle.security.xmlsec.liberty.v11.LibertyInitializerクラスの使用方法
oracle.security.xmlsec.liberty.v11.LibertyInitializer
クラスは、Oracle Liberty SDKライブラリのロード時の初期化と構成を処理します。このクラスの静的なinitialize()
メソッドをコールしてから、Oracle Liberty SDKのAPIをコールする必要があります。
10.2.2.2.2 oracle.security.xmlsec.liberty.v11.LibertyURIインタフェース
oracle.security.xmlsec.liberty.v11.LibertyURI
インタフェースは、アルゴリズム、ネームスペースおよびオブジェクトのURI文字列定数を定義します。次のネーミング規則が使用されます。
-
アルゴリズムのURIは
alg_
で始まります。 -
ネームスペースのURIは
ns_
で始まります。 -
オブジェクト・タイプのURIは
obj_
で始まります。 -
LibertyプロファイルのネームスペースURIは
prof_
で始まります。
10.2.2.2.3 oracle.security.xmlsec.liberty.v11.ac.AuthenticationContextURIインタフェースの使用方法
oracle.security.xmlsec.liberty.v11.ac.AuthenticationContextURI
インタフェースは、アルゴリズム、ネームスペースおよびオブジェクトのURI文字列定数を定義します。次のネーミング規則が使用されます。
-
アルゴリズムのURIは
alg_
で始まります。 -
ネームスペースのURIは
ns_
で始まります。 -
オブジェクト・タイプのURIは
obj_
で始まります。
10.2.2.2.4 oracle.security.xmlsec.util.ac.AuthenticationContextStatementクラス
oracle.security.xmlsec.util.ac.AuthenticationContextStatement
クラスは、Liberty認証コンテキスト・スキーマの最上位レベルのAuthenticationContextStatement
要素を表す抽象クラスです。このクラスの各具体実装は、Liberty認証コンテキスト仕様で定義された各クラスを表します。
10.2.2.2.5 oracle.security.xmlsec.saml.SAMLURIインタフェース
oracle.security.xmlsec.saml.SAMLURI
インタフェースは、アルゴリズム、ネームスペースおよびオブジェクトのURI文字列定数を定義します。次のネーミング規則が使用されます。
-
SAML 1.0仕様に定義されているアクションのネームスペースURIは、
action_
で始まります。 -
SAML 1.0仕様に定義されている認証メソッドのネームスペースURIは、
authentication_method_
で始まります。 -
SAML 1.0仕様に定義されている確認メソッドのネームスペースURIは、
confirmation_method_
で始まります。 -
ネームスペースのURIは
ns_
で始まります。
10.2.3 Oracle Liberty 1.1のAPIリファレンス
Oracle Liberty SDK v1.1で利用可能なクラス、インタフェースおよびメソッドについては、『Oracle Fusion Middleware Oracle Security Developer Tools Java APIリファレンス』を参照してください。
このガイドには、次のリンクからアクセスできます。
Oracle Fusion Middleware Oracle Security Developer Tools Java APIリファレンス
10.3 Oracle Liberty 1.2
Oracle Liberty 1.2は、Liberty Alliance ID-FF 1.2仕様に準拠しています。環境を設定してOracle Liberty 1.2のクラスとインタフェースを使用することにより、仕様に準拠する機能を提供できます。
この項では、Oracle Liberty 1.2のクラスとインタフェース、およびOracle Liberty 1.2の環境設定方法と使用方法について説明します。
これらの項目が含まれます。
10.3.1 Oracle Liberty 1.2の環境設定
Oracle Liberty 1.2の環境を設定するには、Oracle Security Developer ToolsとJava Development Kit (JDK)をインストールし、必要なすべてのjarファイルおよびclassファイルへのCLASSPATH変数を設定します。
Oracle Security Developer Toolsは、Oracle WebLogic ServerとともにORACLE_HOME
にインストールされます。
Oracle Liberty 1.2を使用するには、システムにJava Development Kit (JDK)バージョン1.6以上が必要です。また、PATH
環境変数にJava binディレクトリが指定されていることを確認してください。
CLASSPATH
環境変数には、必要なjarファイルおよびclassファイルすべてのフルパスとファイル名を指定してください。次の項目をCLASSPATH
に指定します。
-
osdt_core.jar
-
osdt_cert.jar
-
osdt_xmlsec.jar
-
osdt_saml.jar
-
org.jaxen_1.1.1.jar
ファイル(Oracle XML Securityディストリビューションに含まれるJaxen XPathエンジン) -
osdt_lib_v12.jar
たとえば、classpathは次のようになります。
setenv CLASSPATH $CLASSPATH:$ORACLE_HOME/modules/oracle.osdt_11.1.1/osdt_core.jar: $ORACLE_HOME/modules/oracle.osdt_11.1.1/osdt_cert.jar: $ORACLE_HOME/modules/oracle.osdt_11.1.1/osdt_xmlsec.jar: $ORACLE_HOME/modules/oracle.osdt_11.1.1/osdt_saml.jar: $ORACLE_HOME/modules/org.jaxen_1.1.1.jar: $ORACLE_HOME/modules/oracle.osdt_11.1.1/osdt_lib_v12.jar
10.3.2 Oracle Liberty 1.2のクラスとインタフェースの概要
Oracle Liberty 1.2には、複数のコア・クラスとインタフェースおよびサポート・クラスとインタフェースが含まれています。Liberty 1.2の有用なクラスには、アサーション、リクエスト、レスポンス、認証リクエスト/レスポンスおよびその他が含まれます。
この項では、Oracle Liberty SDKバージョン1.2の有用なクラスとインタフェースの一部を示します。この項の内容は、次のとおりです。
10.3.2.1 コア・クラスとインタフェース
この項では、Oracle Liberty SDKバージョン1.2のコア・クラスとインタフェースについて説明します。
コア・クラスを次に示します。
10.3.2.1.1 oracle.security.xmlsec.saml.Assertionクラスの使用方法
oracle.security.xmlsec.saml.Assertion
クラスは、SAMLアサーション・スキーマのAssertion要素を表します。
次の例に、新しいアサーション要素を作成して文書に追加する方法を示します。
Document doc = Instance of org.w3c.dom.Document;
Assertion assertion = new Assertion(doc);
doc.getDocumentElement().appendChild(assertion);
次の例に、アサーション要素をXML文書から取得する方法を示します。
Document doc = Instance of org.w3c.dom.Document;
// Get list of all Assertion elements in the document
NodeList assrtList =
doc.getElementsByTagNameNS(SAMLURI.ns_saml, "Assertion");
if (assrtList.getLength() == 0)
System.err.println("No Assertion elements found.");
// Convert each org.w3c.dom.Node object to
// an oracle.security.xmlsec.saml.Assertion
// object and process
for (int s = 0, n = assrtList.getLength(); s < n; ++s)
{
Assertion assertion = new Assertion((Element)assrtList.item(s));
// Process Assertion element
...
}
10.3.2.1.2 oracle.security.xmlsec.samlp.Requestクラスの使用方法
oracle.security.xmlsec.samlp.Request
クラスは、SAMLプロトコル・スキーマのRequest
要素を表します。
次の例に、新しいRequest
要素を作成して文書に追加する方法を示します。
Document doc = Instance of org.w3c.dom.Document;
Request request = new Request(doc);
doc.getDocumentElement().appendChild(request);
次の例に、Request
要素をXML文書から取得する方法を示します。
Document doc = Instance of org.w3c.dom.Document;
// Get list of all Request elements in the document
NodeList reqList =
doc.getElementsByTagNameNS(SAMLURI.ns_samlp, "Request");
if (reqList.getLength() == 0)
System.err.println("No Request elements found.");
// Convert each org.w3c.dom.Node object to an
// oracle.security.xmlsec.samlp.Request
// object and process
for (int s = 0, n = reqList.getLength(); s < n; ++s)
{
Request request = new Request((Element)reqList.item(s));
// Process Request element
...
}
10.3.2.1.3 oracle.security.xmlsec.samlp.Responseクラスの使用方法
oracle.security.xmlsec.samlp.Response
クラスは、SAMLプロトコル・スキーマのResponse
要素を表します。
次の例に、新しい要素を作成して文書に追加する方法を示します。
Document doc = Instance of org.w3c.dom.Document;
Response response = new Response(doc);
doc.getDocumentElement().appendChild(response);
次の例に、Response
要素をXML文書から取得する方法を示します。
Document doc = Instance of org.w3c.dom.Document;
// Get list of all Response elements in the document
NodeList respList =
doc.getElementsByTagNameNS(SAMLURI.ns_samlp, "Response");
if (respList.getLength() == 0)
System.err.println("No Response elements found.");
// Convert each org.w3c.dom.Node object to an
// oracle.security.xmlsec.samlp.Response
// object and process
for (int s = 0, n = respList.getLength(); s < n; ++s)
{
Response response = new Response((Element)respList.item(s));
// Process Response element
...
}
10.3.2.1.4 oracle.security.xmlsec.liberty.v12.AuthnRequestクラスの使用方法
oracle.security.xmlsec.liberty.v12.AuthnRequest
クラスは、Libertyプロトコル・スキーマのAuthnRequest
要素を表します。
次の例に、新しい認証リクエスト要素を作成して文書に追加する方法を示します。
Document doc = Instance of org.w3c.dom.Document;
AuthnRequest authnRequest = new AuthnRequest(doc);
doc.getDocumentElement().appendChild(authnRequest);
次の例に、AuthnRequest
要素をXML文書から取得する方法を示します。
Document doc = Instance of org.w3c.dom.Document;
// Get list of all AuthnRequest elements in the document
NodeList arList = doc.getElementsByTagNameNS(LibertyURI.ns_liberty, "AuthnRequest");
if (arList.getLength() == 0)
System.err.println("No AuthnRequest elements found.");
// Convert each org.w3c.dom.Node object to
// an oracle.security.xmlsec.liberty.v12.AuthnRequest
// object and process
for (int s = 0, n = arList.getLength(); s < n; ++s)
{
AuthnRequest authnRequest = new AuthnRequest((Element)arList.item(s));
// Process AuthnRequest element
...
}
10.3.2.1.5 oracle.security.xmlsec.liberty.v12.AuthnResponseクラスの使用方法
oracle.security.xmlsec.liberty.v12.AuthnResponse
クラスは、Libertyプロトコル・スキーマのAuthnResponse
要素を表します。
次の例に、新しい認証レスポンス要素を作成して文書に追加する方法を示します。
Document doc = Instance of org.w3c.dom.Document;
AuthnResponse authnResponse = new AuthnResponse(doc);
doc.getDocumentElement().appendChild(authnResponse);
次の例に、AuthnResponse
要素をXML文書から取得する方法を示します。
Document doc = Instance of org.w3c.dom.Document;
// Get list of all AuthnResponse elements in the document.
NodeList arList =
doc.getElementsByTagNameNS(LibertyURI.ns_liberty, "AuthnResponse");
if (arList.getLength() == 0)
System.err.println("No AuthnResponse elements found.");
// Convert each org.w3c.dom.Node object to
// an oracle.security.xmlsec.liberty.v12.AuthnResponse
// object and process
for (int s = 0, n = arList.getLength(); s < n; ++s)
{
AuthnResponse authnResponse =
new AuthnResponse((Element)arList.item(s));
// Process AuthnResponse element
...
}
10.3.2.1.6 oracle.security.xmlsec.liberty.v12.FederationTerminationNotificationクラスの使用方法
oracle.security.xmlsec.liberty.v12.FederationTerminationNotification
クラスは、Libertyプロトコル・スキーマのFederationTerminationNotification
要素を表します。
次の例に、新しいフェデレーション終了通知要素を作成して文書に追加する方法を示します。
Document doc = Instance of org.w3c.dom.Document;
FederationTerminationNotification ftn =
new FederationTerminationNotification(doc);
doc.getDocumentElement().appendChild(ftn);
次の例に、フェデレーション終了通知要素をXML文書から取得する方法を示します。
Document doc = Instance of org.w3c.dom.Document;
// Get list of all FederationTerminationNotification elements in the document
NodeList ftnList = doc.getElementsByTagNameNS(LibertyURI.ns_liberty,
"FederationTerminationNotification");
if (ftnList.getLength() == 0)
System.err.println("No FederationTerminationNotification elements found.");
// Convert each org.w3c.dom.Node object to an
// oracle.security.xmlsec.liberty.v12.FederationTerminationNotification
// object and process
for (int s = 0, n = ftnList.getLength(); s < n; ++s)
{
FederationTerminationNotification ftn = new
FederationTerminationNotification((Element)ftnList.item(s));
// Process FederationTerminationNotification element
...
}
10.3.2.1.7 oracle.security.xmlsec.liberty.v12.LogoutRequestクラスの使用方法
oracle.security.xmlsec.liberty.v12.LogoutRequest
クラスは、Libertyプロトコル・スキーマのLogoutRequest
要素を表します。
次の例に、新しい要素を作成して文書に追加する方法を示します。
Document doc = Instance of org.w3c.dom.Document;
LogoutRequest lr = new LogoutRequest(doc);
doc.getDocumentElement().appendChild(lr);
次の例に、ログアウト・リクエスト要素をXML文書から取得する方法を示します。
Document doc = Instance of org.w3c.dom.Document;
// Get list of all LogoutRequest elements in the document
NodeList lrList =
doc.getElementsByTagNameNS(LibertyURI.ns_liberty, "LogoutRequest");
if (lrList.getLength() == 0)
System.err.println("No LogoutRequest elements found.");
// Convert each org.w3c.dom.Node object to
// an oracle.security.xmlsec.liberty.v12.LogoutRequest
// object and process
for (int s = 0, n = lrList.getLength(); s < n; ++s)
{
LogoutRequest lr = new LogoutRequest((Element)lrList.item(s));
// Process LogoutRequest element
...
}
10.3.2.1.8 oracle.security.xmlsec.liberty.v12.LogoutResponseクラスの使用方法
oracle.security.xmlsec.liberty.v12.LogoutResponse
クラスは、Libertyプロトコル・スキーマのLogoutResponse
要素を表します。
次の例に、新しいログアウト・レスポンス要素を作成して文書に追加する方法を示します。
Document doc = Instance of org.w3c.dom.Document;
LogoutResponse lr = new LogoutResponse(doc);
doc.getDocumentElement().appendChild(lr);
次の例に、ログアウト・レスポンス要素をXML文書から取得する方法を示します。
Document doc = Instance of org.w3c.dom.Document;
// Get list of all LogoutResponse elements in the document
NodeList lrList =
doc.getElementsByTagNameNS(LibertyURI.ns_liberty, "LogoutResponse");
if (lrList.getLength() == 0)
System.err.println("No LogoutResponse elements found.");
// Convert each org.w3c.dom.Node object to
// an oracle.security.xmlsec.liberty.v12.LogoutResponse
// object and process
for (int s = 0, n = lrList.getLength(); s < n; ++s)
{
LogoutResponse lr = new LogoutResponse((Element)lrList.item(s));
// Process LogoutResponse element
...
}
10.3.2.1.9 oracle.security.xmlsec.liberty.v12.RegisterNameIdentifierRequestクラスの使用方法
oracle.security.xmlsec.liberty.v12.RegisterNameIdentifierRequest
クラスは、Libertyプロトコル・スキーマのRegisterNameIdentifierRequest
要素を表します。
次の例に、新しいRegisterNameIdentifierRequest
要素を作成して文書に追加する方法を示します。
Document doc = Instance of org.w3c.dom.Document;
RegisterNameIdentifierRequest rnir = new RegisterNameIdentifierRequest(doc);
doc.getDocumentElement().appendChild(rnir);
次の例に、RegisterNameIdentifierRequest
要素をXML文書から取得する方法を示します。
Document doc = Instance of org.w3c.dom.Document;
// Get list of all
// RegisterNameIdentifierRequest elements
// in the document
NodeList rnirList =
doc.getElementsByTagNameNS(LibertyURI.ns_liberty,
"RegisterNameIdentifierRequest");
if (rnirList.getLength() == 0)
System.err.println("No RegisterNameIdentifierRequest elements found.");
// Convert each org.w3c.dom.Node object to a
// oracle.security.xmlsec.liberty.v12.RegisterNameIdentifierRequest
// object and process
for (int s = 0, n = rnirList.getLength(); s < n; ++s)
{
RegisterNameIdentifierRequest rnir =
new RegisterNameIdentifierRequest((Element)rnirList.item(s));
// Process RegisterNameIdentifierRequest element
...
}
10.3.2.1.10 oracle.security.xmlsec.liberty.v12.RegisterNameIdentifierResponseクラスの使用方法
oracle.security.xmlsec.liberty.v12.RegisterNameIdentifierResponse
クラスは、Libertyプロトコル・スキーマのRegisterNameIdentifierResponse
要素を表します。
次の例に、新しいRegisterNameIdentifierResponse
要素を作成して文書に追加する方法を示します。
Document doc = Instance of org.w3c.dom.Document;
RegisterNameIdentifierResponse rnir =
new RegisterNameIdentifierResponse(doc);
doc.getDocumentElement().appendChild(rnir);
次の例に、RegisterNameIdentifierResponse
要素をXML文書から取得する方法を示します。
Document doc = Instance of org.w3c.dom.Document;
// Get list of all RegisterNameIdentifierResponse elements in the document
NodeList rnirList =
doc.getElementsByTagNameNS(LibertyURI.ns_liberty,
"RegisterNameIdentifierResponse");
if (rnirList.getLength() == 0)
System.err.println("No RegisterNameIdentifierResponse elements found.");
// Convert each org.w3c.dom.Node object to an
// oracle.security.xmlsec.liberty.v12.RegisterNameIdentifierResponse
// object and process
for (int s = 0, n = rnirList.getLength(); s < n; ++s)
{
RegisterNameIdentifierResponse rnir = new
RegisterNameIdentifierResponse((Element)rnirList.item(s));
// Process RegisterNameIdentifierResponse element
...
}
10.3.2.2 サポート・クラスとインタフェース
この項では、Oracle Liberty SDKバージョン1.2のサポート・クラスとインタフェースについて説明します。
-
oracle.security.xmlsec.liberty.v12.LibertyInitializer
クラス -
oracle.security.xmlsec.liberty.v12.LibertyURI
インタフェース -
oracle.security.xmlsec.util.ac.AuthenticationContextStatement
クラス -
oracle.security.xmlsec.saml.SAMLInitializer
クラス -
oracle.security.xmlsec.saml.SAMLURI
インタフェース
10.3.2.2.1 oracle.security.xmlsec.liberty.v12.LibertyInitializerクラス
このクラスは、Oracle Liberty SDK 1.2ライブラリのロード時の初期化と構成を処理します。このクラスの静的なinitialize()
メソッドをコールしてから、Oracle Liberty SDK 1.2のAPIをコールする必要があります。
10.3.2.2.2 oracle.security.xmlsec.liberty.v12.LibertyURIインタフェース
このインタフェースは、アルゴリズム、ネームスペースおよびオブジェクトのURI文字列定数を定義します。
10.3.2.2.3 oracle.security.xmlsec.util.ac.AuthenticationContextStatementクラス
これは、Liberty認証コンテキスト・スキーマの最上位レベルのAuthenticationContextStatement
要素を表す抽象クラスです。このクラスの各具体実装は、Liberty認証コンテキスト仕様で定義された各クラスを表します。
10.3.2.2.4 oracle.security.xmlsec.saml.SAMLInitializerクラス
このクラスは、Oracle SAMLライブラリのロード時の初期化と構成を処理します。リリース1.1では、このクラスの静的なinitialize(int major, int minor)
メソッドをコールしてから、Oracle SAML Toolkit API for SAML 1.1をコールする必要があります。
10.3.2.2.5 oracle.security.xmlsec.saml.SAMLURIインタフェース
oracle.security.xmlsec.saml.SAMLURI
インタフェースは、アルゴリズム、ネームスペースおよびオブジェクトのURI文字列定数を定義します。次のネーミング規則が使用されます。
-
SAML 1.1仕様に定義されているアクションのネームスペースURIは、
action_
で始まります。 -
SAML 1.1仕様に定義されている認証メソッドのネームスペースURIは、
authentication_method_
で始まります。 -
SAML 1.1仕様に定義されている確認メソッドのネームスペースURIは、
confirmation_method_
で始まります。 -
ネームスペースのURIは
ns_
で始まります。
10.3.3 Oracle Liberty SDKリリース1.2のAPIリファレンス
Oracle Liberty SDK v1.2 APIで利用可能なクラス、インタフェースおよびメソッドについては、『Oracle Fusion Middleware Oracle Security Developer Tools Java APIリファレンス』を参照してください。
このガイドには、次のリンクからアクセスできます。
Oracle Fusion Middleware Oracle Security Developer Tools Java APIリファレンス