Class DefaultNonceFactory

java.lang.Object
io.micronaut.security.oauth2.endpoint.nonce.DefaultNonceFactory
All Implemented Interfaces:
NonceFactory

@Requires(beans=NoncePersistence.class) @Singleton public class DefaultNonceFactory extends Object implements NonceFactory
Generates a random UUID nonce.
Since:
1.2.0
Author:
James Kleeh
  • Constructor Details

    • DefaultNonceFactory

      public DefaultNonceFactory(NoncePersistence noncePersistence)
      Parameters:
      noncePersistence - The nonce persistence mechanism
  • Method Details

    • buildNonce

      @NonNull public @NonNull String buildNonce(io.micronaut.http.HttpRequest<?> request, io.micronaut.http.MutableHttpResponse response)
      Specified by:
      buildNonce in interface NonceFactory
      Parameters:
      request - The login request
      response - The authorization redirect response
      Returns:
      A nonce. A String value used to associate a Client session with an ID Token, and to mitigate replay attacks.