Interface JwtAuthorizationBuilder<T extends JwtAuthorizationBuilder<T,A,U>,A,U>

Type Parameters:
T - - The implementation class for the builder
A - - The algorithm class that will be used for signing or validating the token.
U - - The output of the builder
All Known Implementing Classes:
JwtAuthorizationDecoder, JwtAuthorizationEncoder

public interface JwtAuthorizationBuilder<T extends JwtAuthorizationBuilder<T,A,U>,A,U>
A builder interface for implementing token authorization builders.
  • Field Details

  • Method Details

    • withSubject

      T withSubject(String subject)
      Sets the token subject.
      Parameters:
      subject - - the subject String
      Returns:
      the builder instance
    • withIssuer

      T withIssuer(String issuer)
      Sets the token issuer.
      Parameters:
      issuer - - the issuer String
      Returns:
      the builder instance
    • withAudience

      T withAudience(String audience)
      Sets the token audience.
      Parameters:
      audience - - the audience String
      Returns:
      the builder instance
    • withSigningAlgorithm

      T withSigningAlgorithm(A signingAlgorithm)
      Sets the signing algorithm for the token. The algorithm may depend on the token library.
      Parameters:
      signingAlgorithm - - the signing algorithm instance
      Returns:
      the builder instance
    • build

      U build()