java.lang.Object
io.micronaut.security.oauth2.endpoint.authorization.state.JacksonStateSerDes
All Implemented Interfaces:
StateSerDes

@Requires(beans=io.micronaut.json.JsonMapper.class) @Singleton public class JacksonStateSerDes extends Object implements StateSerDes
Jackson based implementation for state serdes.
Since:
1.2.0
Author:
James Kleeh
  • Constructor Details

    • JacksonStateSerDes

      public JacksonStateSerDes(io.micronaut.json.JsonMapper jsonMapper)
      Parameters:
      jsonMapper - To serialize/de-serialize the state
      Since:
      3.3
  • Method Details

    • deserialize

      public State deserialize(String base64State)
      Description copied from interface: StateSerDes
      De-serializes the state string into a State object.
      Specified by:
      deserialize in interface StateSerDes
      Parameters:
      base64State - The state string
      Returns:
      The state, or null if the de-serialization encountered an error.
    • serialize

      public String serialize(State state)
      Description copied from interface: StateSerDes
      Serializes the state into a string for sending with the authorization redirect.
      Specified by:
      serialize in interface StateSerDes
      Parameters:
      state - The state object
      Returns:
      The serialized state, or null if the serialization encountered an error.