Class 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
    • 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 interface StateValidator
        Parameters:
        request - The HTTP Request
        state - The state value returned by the authorization server
        Throws:
        InvalidStateException - If the state validation failed