クラス RelyingPartyRegistration


  • public final class RelyingPartyRegistration
    extends java.lang.Object
    構成済みの証明書利用者(別名サービスプロバイダー)とアサーティングパーティー(別名 ID プロバイダー)のペアを表します。

    各 RP/AP ペアは、任意の文字列である registrationId を使用して一意に識別されます。

    完全に構成された登録は次のようになります。

            String registrationId = "simplesamlphp";
    
            String relyingPartyEntityId = "{baseUrl}/saml2/service-provider-metadata/{registrationId}";
            String assertionConsumerServiceLocation = "{baseUrl}/login/saml2/sso/{registrationId}";
            Saml2X509Credential relyingPartySigningCredential = ...;
    
            String assertingPartyEntityId = "https://simplesaml-for-spring-saml.apps.pcfone.io/saml2/idp/metadata.php";
            String singleSignOnServiceLocation = "https://simplesaml-for-spring-saml.apps.pcfone.io/saml2/idp/SSOService.php";
            Saml2X509Credential assertingPartyVerificationCredential = ...;
    
    
            RelyingPartyRegistration rp = RelyingPartyRegistration.withRegistrationId(registrationId)
                            .entityId(relyingPartyEntityId)
                            .assertionConsumerServiceLocation(assertingConsumerServiceLocation)
                            .signingX509Credentials((c) -> c.add(relyingPartySigningCredential))
                            .assertingPartyDetails((details) -> details
                                    .entityId(assertingPartyEntityId));
                                    .singleSignOnServiceLocation(singleSignOnServiceLocation))
                                    .verifyingX509Credentials((c) -> c.add(assertingPartyVerificationCredential))
                            .build();
     
    導入:
    5.2
    • メソッドの詳細

      • getRegistrationId

        public java.lang.String getRegistrationId()
        この RP/AP ペアの一意の登録 ID を取得します
        戻り値:
        この RP/AP ペアの一意の登録 ID
      • getEntityId

        public java.lang.String getEntityId()
        証明書利用者の EntityID を取得します。

        証明書利用者の <EntityDescriptor EntityID="..." /> にある値に相当します

        この値には、使用する前に解決する必要のあるいくつかのプレースホルダーが含まれている場合があります。それらは baseUrlregistrationIdbaseSchemebaseHostbasePort です。

        戻り値:
        依存パーティの EntityID
        導入:
        5.4
      • getAssertionConsumerServiceLocation

        public java.lang.String getAssertionConsumerServiceLocation()
        AssertionConsumerService の場所を取得します。証明書利用者の <SPSSODescriptor> の <AssertionConsumerService Location="..." /> にある値に相当します。この値には、使用する前に解決する必要のあるいくつかのプレースホルダーが含まれている場合があります。それらは baseUrlregistrationIdbaseSchemebaseHostbasePort です。
        戻り値:
        AssertionConsumerService ロケーション
        導入:
        5.4
      • getAssertionConsumerServiceBinding

        public Saml2MessageBinding getAssertionConsumerServiceBinding()
        AssertionConsumerService バインディングを取得します。証明書利用者の <SPSSODescriptor> の <AssertionConsumerService Binding="..." /> にある値に相当します。
        戻り値:
        AssertionConsumerService バインディング
        導入:
        5.4
      • getSingleLogoutServiceBinding

        public Saml2MessageBinding getSingleLogoutServiceBinding()
        SingleLogoutService バインディングを入手する

        証明書利用者の <SPSSODescriptor> の <SingleLogoutService Binding="..." /> にある値に相当します。

        戻り値:
        SingleLogoutService バインディング
        導入:
        5.6
      • getSingleLogoutServiceLocation

        public java.lang.String getSingleLogoutServiceLocation()
        SingleLogoutService の場所を入手する

        証明書利用者の <SPSSODescriptor> の <SingleLogoutService Location="..." /> にある値に相当します。

        戻り値:
        SingleLogoutService ロケーション
        導入:
        5.6
      • getSingleLogoutServiceResponseLocation

        public java.lang.String getSingleLogoutServiceResponseLocation()
        SingleLogoutService レスポンス場所を入手する

        証明書利用者の <SPSSODescriptor> の <SingleLogoutService ResponseLocation="..." /> にある値に相当します。

        戻り値:
        SingleLogoutService レスポンス位置
        導入:
        5.6
      • getNameIdFormat

        public java.lang.String getNameIdFormat()
        NameID 形式を取得します。
        戻り値:
        NameID 形式
        導入:
        5.7
      • getDecryptionX509Credentials

        public java.util.Collection<Saml2X509Credential> getDecryptionX509Credentials()
        この証明書利用者に関連付けられている復号化 Saml2X509Credential の Collection を取得します
        戻り値:
        この依存パーティに関連付けられている復号化 Saml2X509Credential の Collection 
        導入:
        5.4
      • getSigningX509Credentials

        public java.util.Collection<Saml2X509Credential> getSigningX509Credentials()
        この証明書利用者に関連付けられている署名 Saml2X509Credential の Collection を取得します
        戻り値:
        この依存パーティに関連付けられている署名 Saml2X509Credential の Collection 
        導入:
        5.4
      • getAssertionConsumerServiceUrlTemplate

        @Deprecated
        public java.lang.String getAssertionConsumerServiceUrlTemplate()
        使用すべきではありません。
        代わりに getAssertionConsumerServiceLocation() を使用してください
        ACSURL 認証リクエストに含める必要のある URL テンプレートを返します。可能な変数は baseUrlregistrationIdbaseSchemebaseHostbasePort です。
        戻り値:
        変数の有無にかかわらず、ACS URL テンプレートを含む文字列
      • getProviderDetails

        @Deprecated
        public RelyingPartyRegistration.ProviderDetails getProviderDetails()
        使用すべきではありません。
        代わりに getAssertingPartyDetails() を使用してください
        ID プロバイダー SSO エンドポイント周辺の特定の構成を返します
        戻り値:
        IDP SSO エンドポイント構成
        導入:
        5.3
      • getLocalEntityIdTemplate

        @Deprecated
        public java.lang.String getLocalEntityIdTemplate()
        使用すべきではありません。
        代わりに getEntityId() を使用してください
        ローカルの証明書利用者またはサービスプロバイダーは、baseUrlregistrationIdbaseSchemebaseHostbasePort の可能な変数({baseUrl}/saml2/service-provider-metadata/{registrationId} など)に基づいてエンティティ ID を生成できます。
        戻り値:
        エンティティ ID またはエンティティ ID テンプレートを含む文字列
      • getCredentials

        @Deprecated
        public java.util.List<Saml2X509Credential> getCredentials()
        使用すべきではありません。
        すべての資格情報を取得する代わりに、適切な型を使用して正しい型を取得します
        証明書利用者 SP とアサーティングパーティ IDP との間のメッセージ交換で使用される構成済み資格情報のリストを返します。
        戻り値:
        資格情報のリスト
      • getVerificationCredentials

        @Deprecated
        public java.util.List<Saml2X509Credential> getVerificationCredentials()
        使用すべきではありません。
        代わりに {code #getAssertingPartyDetails()。getSigningX509Credentials()} を使用してください
        戻り値:
        Saml2X509Credential.Saml2X509CredentialType.VERIFICATION の資格情報のみを含むフィルターされたリスト。資格情報が見つからない空のリストを返します
      • withRegistrationId

        public static RelyingPartyRegistration.Builder withRegistrationId​(java.lang.String registrationId)
        既知の registrationId で RelyingPartyRegistration RelyingPartyRegistration.Builder を作成します
        パラメーター:
        registrationId - RelyingPartyRegistration の文字列識別子
        戻り値:
         RelyingPartyRegistration オブジェクトを作成する Builder