Class PrivateKeyJwtClientAuthenticationFilter.Builder<T extends PrivateKeyJwtClientAuthenticationFilter.Builder<T>>

java.lang.Object
org.forgerock.http.oauth2.PrivateKeyJwtClientAuthenticationFilter.Builder<T>
Type Parameters:
T - the type of Filter builder to build.
Direct Known Subclasses:
EncryptedPrivateKeyJwtClientAuthenticationFilter.Builder
Enclosing class:
PrivateKeyJwtClientAuthenticationFilter

public static class PrivateKeyJwtClientAuthenticationFilter.Builder<T extends PrivateKeyJwtClientAuthenticationFilter.Builder<T>> extends Object
Builder class for creating the PrivateKey Jwt ClientAuthentication Filter.
  • Field Details

  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • self

      protected T self()
      Returns this object, as its actual type.
      Returns:
      this object.
    • withClientId

      public T withClientId(String clientId)
      Sets the client id that will be used in the private key jwt.
      Parameters:
      clientId - The client id that will be used in the private key jwt.
      Returns:
      The builder.
    • withTokenEndpoint

      public T withTokenEndpoint(URI tokenEndpoint)
      Sets the token end point used to specify as the aud in the private key jwt.
      Parameters:
      tokenEndpoint - The token end point used to specify as the aud in the private key jwt.
      Returns:
      The builder.
    • withSecretsProvider

      @Deprecated(since="26.2.0", forRemoval=true) public T withSecretsProvider(SecretsProvider secretsProvider)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Please use SecretReference API instead. Will be removed in winter 2021 season.
      Sets the secrets provider to use to resolve keys where a Purpose is used.
      Parameters:
      secretsProvider - The secrets provider.
      Returns:
      The builder.
    • withSigningPurpose

      @Deprecated(since="26.2.0", forRemoval=true) public T withSigningPurpose(Purpose<SigningKey> signingPurpose)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Please use withSigningSecretReference(SecretReference) instead. Will be removed in winter 2021 season.
      Sets purpose to look up the signing key. Note that you should provide either the SecretReference (preferred) or both the signing Purpose and SecretsProvider, so that the signing key can be determined.
      Parameters:
      signingPurpose - The signing purpose.
      Returns:
      The builder.
    • withSigningSecretReference

      public T withSigningSecretReference(SecretReference<SigningKey> secretReference)
      Sets SecretReference to use as the signing key. Note that this is the preferred way of providing the signing secret reference, though you may alternatively provide both the signing Purpose and SecretsProvider.
      Parameters:
      secretReference - The secret reference used to sign the JWT.
      Returns:
      The builder.
    • withSigningAlgorithm

      public T withSigningAlgorithm(JwsAlgorithm signingAlgorithm)
      Sets algorithm used to sign the private key jwt.
      Parameters:
      signingAlgorithm - The algorithm used to sign the private key jwt.
      Returns:
      The builder.
    • withPrivateKeyJwtExpiryTime

      public T withPrivateKeyJwtExpiryTime(Duration privateKeyJwtExpiryTime)
      Sets duration after the jwt will expire.
      Parameters:
      privateKeyJwtExpiryTime - The duration after the jwt will expire.
      Returns:
      The builder.
    • withClock

      public T withClock(Clock clock)
      Sets the clock instance.
      Parameters:
      clock - The clock instance.
      Returns:
      The builder.
    • withClaims

      public T withClaims(Map<String,Object> claims)
      Sets any additional JWT claims, which may be overridden by claims created as part of creation of the private-key JWT.
      Parameters:
      claims - Any additional JWT claims.
      Returns:
      The builder.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • build

      Builds the PrivateKey Jwt ClientAuthentication Filter.
      Returns:
      The PrivateKey Jwt ClientAuthentication Filter.
    • buildSecretReferences

      @Deprecated(since="26.2.0", forRemoval=true) protected void buildSecretReferences()
      Deprecated, for removal: This API element is subject to removal in a future version.
      for removal with withSigningPurpose(Purpose). Will be removed in winter 2021 season.
      Set the signing secret reference in the builder based on supplied configuration, whether by direct provision of the SecretReference or via the SecretsProvider and Purpose. This method provides compatibility between these two ways of providing the signing secret reference.