java.lang.Object
io.micronaut.security.oauth2.endpoint.authorization.state.validation.DefaultStateValidator
All Implemented Interfaces:
StateValidator

@Singleton public class DefaultStateValidator extends Object implements StateValidator
State validator implementation. Relies on a state persistence bean.
Since:
1.2.0
Author:
James Kleeh
  • Constructor Details

    • DefaultStateValidator

      public DefaultStateValidator(StatePersistence statePersistence)
      Parameters:
      statePersistence - The state persistence bean
  • Method Details

    • validate

      public void validate(@NonNull @NonNull io.micronaut.http.HttpRequest<?> request, @Nullable @Nullable State state) throws InvalidStateException
      Description copied from interface: StateValidator
      Validates the provided state.
      Specified by:
      validate in interface StateValidator
      Parameters:
      request - The HTTP Request
      state - The state value returned by the authorization server
      Throws:
      InvalidStateException - If the state validation failed