Class DefaultStateController
java.lang.Object
com.jagrosh.jdautilities.oauth2.state.DefaultStateController
- All Implemented Interfaces:
StateController
The default
StateController
implementation.- Author:
- John Grosh ([email protected])
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionconsumeState
(String state) Consumes a state to get the corresponding redirect URI.generateNewState
(String redirectUri) Generates a new state string using the provided redirect URI.
-
Constructor Details
-
DefaultStateController
public DefaultStateController()
-
-
Method Details
-
generateNewState
Description copied from interface:StateController
Generates a new state string using the provided redirect URI.- Specified by:
generateNewState
in interfaceStateController
- Parameters:
redirectUri
- The redirect URI that will be used with this state.- Returns:
- The state string.
-
consumeState
Description copied from interface:StateController
Consumes a state to get the corresponding redirect URI.Once this method is called for a specific state, it should return null for all future calls of that same state.
- Specified by:
consumeState
in interfaceStateController
- Parameters:
state
- The state.- Returns:
- The redirect URI, or
null
if the state does not exist.
-