Class DefaultStateValidator
- java.lang.Object
-
- io.micronaut.security.oauth2.endpoint.authorization.state.validation.DefaultStateValidator
-
- All Implemented Interfaces:
StateValidator
@Singleton public class DefaultStateValidator extends java.lang.Object implements StateValidator
State validator implementation. Relies on a state persistence bean.- Since:
- 1.2.0
- Author:
- James Kleeh
-
-
Constructor Summary
Constructors Constructor Description DefaultStateValidator(StatePersistence statePersistence)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
validate(io.micronaut.http.HttpRequest<?> request, State state)
Validates the provided state.
-
-
-
Constructor Detail
-
DefaultStateValidator
public DefaultStateValidator(StatePersistence statePersistence)
- Parameters:
statePersistence
- The state persistence bean
-
-
Method Detail
-
validate
public void validate(@Nonnull io.micronaut.http.HttpRequest<?> request, @Nullable State state) throws InvalidStateException
Description copied from interface:StateValidator
Validates the provided state.- Specified by:
validate
in interfaceStateValidator
- Parameters:
request
- The HTTP Requeststate
- The state value returned by the authorization server- Throws:
InvalidStateException
- If the state validation failed
-
-