Class JacksonStateSerDes
- java.lang.Object
-
- io.micronaut.security.oauth2.endpoint.authorization.state.JacksonStateSerDes
-
- All Implemented Interfaces:
StateSerDes
@Singleton public class JacksonStateSerDes extends java.lang.Object implements StateSerDes
Jackson based implementation for state serdes.- Since:
- 1.2.0
-
-
Constructor Summary
Constructors Constructor Description JacksonStateSerDes(com.fasterxml.jackson.databind.ObjectMapper objectMapper)Deprecated.UseJacksonStateSerDes(JsonMapper)insteadJacksonStateSerDes(io.micronaut.json.JsonMapper jsonMapper)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Statedeserialize(java.lang.String base64State)De-serializes the state string into aStateobject.java.lang.Stringserialize(State state)Serializes the state into a string for sending with the authorization redirect.
-
-
-
Constructor Detail
-
JacksonStateSerDes
@Deprecated public JacksonStateSerDes(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
Deprecated.UseJacksonStateSerDes(JsonMapper)instead- Parameters:
objectMapper- To serialize/de-serialize the state
-
JacksonStateSerDes
@Inject public JacksonStateSerDes(io.micronaut.json.JsonMapper jsonMapper)
- Parameters:
jsonMapper- To serialize/de-serialize the state- Since:
- 3.3
-
-
Method Detail
-
deserialize
public State deserialize(java.lang.String base64State)
Description copied from interface:StateSerDesDe-serializes the state string into aStateobject.- Specified by:
deserializein interfaceStateSerDes- Parameters:
base64State- The state string- Returns:
- The state, or null if the de-serialization encountered an error.
-
serialize
public java.lang.String serialize(State state)
Description copied from interface:StateSerDesSerializes the state into a string for sending with the authorization redirect.- Specified by:
serializein interfaceStateSerDes- Parameters:
state- The state object- Returns:
- The serialized state, or null if the serialization encountered an error.
-
-