Class S256PkceGenerator
java.lang.Object
io.micronaut.security.oauth2.endpoint.authorization.pkce.S256PkceGenerator
- All Implemented Interfaces:
io.micronaut.core.naming.Named
,io.micronaut.core.order.Ordered
,PkceGenerator
@Named("S256")
@Singleton
@Requires(condition=Sha256Condition.class)
public class S256PkceGenerator
extends Object
implements PkceGenerator
SHA-256 based PKCE Generator.
- Since:
- 3.9.0
- Author:
- Sergio del Amo
- See Also:
-
Field Details
-
ORDER
-
CODE_CHALLENGE_METHOD_S256
- See Also:
-
-
Constructor Details
-
S256PkceGenerator
- Parameters:
codeVerifierGenerator
- Code Verifier generator
-
-
Method Details
-
getName
- Specified by:
getName
in interfaceio.micronaut.core.naming.Named
-
getOrder
public int getOrder()- Specified by:
getOrder
in interfaceio.micronaut.core.order.Ordered
-
supportsAny
- Specified by:
supportsAny
in interfacePkceGenerator
- Parameters:
codeChallengeMethods
- Code Challenge methods- Returns:
- Whether the PKCE Generator supports any of the supplied code challenge methods.
-
generate
- Specified by:
generate
in interfacePkceGenerator
- Returns:
- Generates a
Pkce
.
-
hash
- Parameters:
value
- Value to be hashed- Returns:
- a hash build with algorithm SHA-256
-