Class DefaultNonceFactory

  • All Implemented Interfaces:
    NonceFactory

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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String buildNonce​(io.micronaut.http.HttpRequest<?> request, io.micronaut.http.MutableHttpResponse response)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DefaultNonceFactory

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

      • buildNonce

        @Nonnull
        public java.lang.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.