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 Summary
-
Method Summary
Modifier and TypeMethodDescription@NonNull String
buildNonce
(io.micronaut.http.HttpRequest<?> request, io.micronaut.http.MutableHttpResponse response)
-
Constructor Details
-
DefaultNonceFactory
- 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 interfaceNonceFactory
- Parameters:
request
- The login requestresponse
- 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.
-