Class DefaultPkceFactory
java.lang.Object
io.micronaut.security.oauth2.endpoint.authorization.pkce.DefaultPkceFactory
- All Implemented Interfaces:
PkceFactory
Generates a Proof Key for Code Exchange and persists.
- Since:
- 3.9.0
- Author:
- Sergio del Amo
-
Constructor Summary
ConstructorDescriptionDefaultPkceFactory
(@NonNull List<PkceGenerator> generators, @NonNull PkcePersistence persistence) -
Method Summary
Modifier and TypeMethodDescription@NonNull Optional<PkceChallenge>
buildChallenge
(@NonNull io.micronaut.http.HttpRequest<?> request, @NonNull io.micronaut.http.MutableHttpResponse<?> response, @Nullable List<String> supportedChallengeMethods)
-
Constructor Details
-
DefaultPkceFactory
public DefaultPkceFactory(@NonNull @NonNull List<PkceGenerator> generators, @NonNull @NonNull PkcePersistence persistence)
-
-
Method Details
-
buildChallenge
@NonNull public @NonNull Optional<PkceChallenge> buildChallenge(@NonNull @NonNull io.micronaut.http.HttpRequest<?> request, @NonNull @NonNull io.micronaut.http.MutableHttpResponse<?> response, @Nullable @Nullable List<String> supportedChallengeMethods) - Specified by:
buildChallenge
in interfacePkceFactory
- Parameters:
request
- The original request prior redirectresponse
- The authorization redirect responsesupportedChallengeMethods
- Challenge methods supported by the authorization server- Returns:
- A state parameter. An opaque value used to maintain state between the request and the callback.
-