Class CIBARequest.Builder

    • Constructor Detail

      • Builder

        public Builder​(ClientAuthentication clientAuth,
                       Scope scope)
        Creates a new CIBA request builder.
        Parameters:
        clientAuth - The client authentication. Must not be null.
        scope - The requested scope. Must not be empty or null.
      • Builder

        public Builder​(ClientAuthentication clientAuth,
                       com.nimbusds.jwt.SignedJWT signedRequest)
        Creates a new CIBA signed request builder.
        Parameters:
        clientAuth - The client authentication. Must not be null.
        signedRequest - The signed request JWT. Must not be null.
      • Builder

        public Builder​(CIBARequest request)
        Creates a new CIBA request builder from the specified request.
        Parameters:
        request - The CIBA request. Must not be null.
    • Method Detail

      • clientNotificationToken

        public CIBARequest.Builder clientNotificationToken​(BearerAccessToken token)
        Sets the client notification token, required for the CIBA ping and push token delivery modes. Corresponds to the client_notification_token parameter.
        Parameters:
        token - The client notification token, null if not specified.
        Returns:
        This builder.
      • acrValues

        public CIBARequest.Builder acrValues​(List<ACR> acrValues)
        Sets the requested Authentication Context Class Reference values. Corresponds to the optional acr_values parameter.
        Parameters:
        acrValues - The requested ACR values, null if not specified.
        Returns:
        This builder.
      • loginHintTokenString

        public CIBARequest.Builder loginHintTokenString​(String loginHintTokenString)
        Sets the login hint token string, containing information identifying the end-user for whom authentication is being requested. Corresponds to the login_hint_token parameter.
        Parameters:
        loginHintTokenString - The login hint token string, null if not specified.
        Returns:
        This builder.
      • idTokenHint

        public CIBARequest.Builder idTokenHint​(com.nimbusds.jwt.JWT idTokenHint)
        Sets the ID Token hint, passed as a hint to identify the end-user for whom authentication is being requested. Corresponds to the id_token_hint parameter.
        Parameters:
        idTokenHint - The ID Token hint, null if not specified.
        Returns:
        This builder.
      • loginHint

        public CIBARequest.Builder loginHint​(String loginHint)
        Sets the login hint (email address, phone number, etc), about the end-user for whom authentication is being requested. Corresponds to the login_hint parameter.
        Parameters:
        loginHint - The login hint, null if not specified.
        Returns:
        This builder.
      • bindingMessage

        public CIBARequest.Builder bindingMessage​(String bindingMessage)
        Sets the human readable binding message for the display at the consumption and authentication devices. Corresponds to the binding_message parameter.
        Parameters:
        bindingMessage - The binding message, null if not specified.
        Returns:
        This builder.
      • userCode

        public CIBARequest.Builder userCode​(Secret userCode)
        Gets the user secret code (password, PIN, etc) to authorise the CIBA request with the authentication device. Corresponds to the user_code parameter.
        Parameters:
        userCode - The user code, null if not specified.
        Returns:
        This builder.
      • requestedExpiry

        public CIBARequest.Builder requestedExpiry​(Integer requestedExpiry)
        Sets the requested expiration for the auth_req_id. Corresponds to the requested_expiry parameter.
        Parameters:
        requestedExpiry - The required expiry (as positive integer), null if not specified.
        Returns:
        This builder.
      • customParameter

        public CIBARequest.Builder customParameter​(String name,
                                                   String... values)
        Sets a custom parameter.
        Parameters:
        name - The parameter name. Must not be null.
        values - The parameter values, null if not specified.
        Returns:
        This builder.
      • endpointURI

        public CIBARequest.Builder endpointURI​(URI uri)
        Sets the URI of the endpoint (HTTP or HTTPS) for which the request is intended.
        Parameters:
        uri - The endpoint URI, null if not specified.
        Returns:
        This builder.
      • build

        public CIBARequest build()
        Builds a new CIBA request.
        Returns:
        The CIBA request.