Class RelyingPartyRegistration.Builder

  • Enclosing class:
    RelyingPartyRegistration

    public static final class RelyingPartyRegistration.Builder
    extends java.lang.Object
    • Method Detail

      • registrationId

        public RelyingPartyRegistration.Builder registrationId​(java.lang.String id)
        Sets the registrationId template. Often be used in URL paths
        Parameters:
        id - registrationId for this object, should be unique
        Returns:
        this object
      • entityId

        public RelyingPartyRegistration.Builder entityId​(java.lang.String entityId)
        Set the relying party's EntityID. Equivalent to the value found in the relying party's <EntityDescriptor EntityID="..."/> This value may contain a number of placeholders. They are baseUrl, registrationId, baseScheme, baseHost, and basePort.
        Parameters:
        entityId - the relying party's EntityID
        Returns:
        the RelyingPartyRegistration.Builder for further configuration
        Since:
        5.4
      • assertionConsumerServiceLocation

        public RelyingPartyRegistration.Builder assertionConsumerServiceLocation​(java.lang.String assertionConsumerServiceLocation)
        Set the AssertionConsumerService Location.

        Equivalent to the value found in <AssertionConsumerService Location="..."/> in the relying party's <SPSSODescriptor>

        This value may contain a number of placeholders. They are baseUrl, registrationId, baseScheme, baseHost, and basePort.

        Parameters:
        assertionConsumerServiceLocation - the AssertionConsumerService location
        Returns:
        the RelyingPartyRegistration.Builder for further configuration
        Since:
        5.4
      • singleLogoutServiceResponseLocation

        public RelyingPartyRegistration.Builder singleLogoutServiceResponseLocation​(java.lang.String singleLogoutServiceResponseLocation)
        Set the SingleLogoutService Response Location

        Equivalent to the value found in <SingleLogoutService ResponseLocation="..."/> in the relying party's <SPSSODescriptor>.

        Parameters:
        singleLogoutServiceResponseLocation - the SingleLogoutService Response Location
        Returns:
        the RelyingPartyRegistration.Builder for further configuration
        Since:
        5.6
      • credentials

        @Deprecated
        public RelyingPartyRegistration.Builder credentials​(java.util.function.Consumer<java.util.Collection<Saml2X509Credential>> credentials)
        Deprecated.
        Use signingX509Credentials or decryptionX509Credentials instead for relying party keys or RelyingPartyRegistration.AssertingPartyDetails.Builder.verificationX509Credentials or RelyingPartyRegistration.AssertingPartyDetails.Builder.encryptionX509Credentials for asserting party keys
        Modifies the collection of Saml2X509Credential objects used in communication between IDP and SP For example: Saml2X509Credential credential = ...; return RelyingPartyRegistration.withRegistrationId("id") .credentials((c) -> c.add(credential)) ... .build();
        Parameters:
        credentials - - a consumer that can modify the collection of credentials
        Returns:
        this object
      • assertionConsumerServiceUrlTemplate

        @Deprecated
        public RelyingPartyRegistration.Builder assertionConsumerServiceUrlTemplate​(java.lang.String assertionConsumerServiceUrlTemplate)
        Deprecated.
        Use assertionConsumerServiceLocation instead.
        Assertion Consumer Service URL template. It can contain variables baseUrl, registrationId, baseScheme, baseHost, and basePort.
        Parameters:
        assertionConsumerServiceUrlTemplate - the Assertion Consumer Service URL template (i.e. "{baseUrl}/login/saml2/sso/{registrationId}".
        Returns:
        this object
      • remoteIdpEntityId

        @Deprecated
        public RelyingPartyRegistration.Builder remoteIdpEntityId​(java.lang.String entityId)
        Deprecated.
        use #assertingPartyDetails(Consumer<AssertingPartyDetails.Builder >)
        Sets the entityId for the remote asserting party, the Identity Provider.
        Parameters:
        entityId - the IDP entityId
        Returns:
        this object
      • idpWebSsoUrl

        @Deprecated
        public RelyingPartyRegistration.Builder idpWebSsoUrl​(java.lang.String url)
        Deprecated.
        use #assertingPartyDetails(Consumer<AssertingPartyDetails.Builder >)
        Sets the SSO URL for the remote asserting party, the Identity Provider.
        Parameters:
        url - - a URL that accepts authentication requests via REDIRECT or POST bindings
        Returns:
        this object
      • localEntityIdTemplate

        @Deprecated
        public RelyingPartyRegistration.Builder localEntityIdTemplate​(java.lang.String template)
        Deprecated.
        Use entityId instead
        Sets the local relying party, or Service Provider, entity Id template. can generate it's entity ID based on possible variables of baseUrl, registrationId, baseScheme, baseHost, and basePort, for example {baseUrl}/saml2/service-provider-metadata/{registrationId}
        Parameters:
        template - the entity id
        Returns:
        a string containing the entity ID or entity ID template
      • build

        public RelyingPartyRegistration build()
        Constructs a RelyingPartyRegistration object based on the builder configurations
        Returns:
        a RelyingPartyRegistration instance