- java.lang.Object
-
- org.mule.oauth.client.internal.state.StateEncoder
-
public class StateEncoder extends Object
State parameter encoder. Allows to encode and decode an resourceOwnerId in the authentication request state parameter.- Since:
- 1.0
-
-
Field Summary
Fields Modifier and Type Field Description static StringON_COMPLETE_REDIRECT_TO_PARAM_NAMEstatic StringON_COMPLETE_REDIRECT_TO_PARAM_NAME_ASSIGNstatic StringRESOURCE_OWNER_PARAM_NAMEstatic StringRESOURCE_OWNER_PARAM_NAME_ASSIGN
-
Constructor Summary
Constructors Constructor Description StateEncoder(String originalState)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidencodeOnCompleteRedirectToInState(String onCompleteRedirectToValue)Creates and state value with the redirect url to send the user when the oauth dance is completevoidencodeResourceOwnerIdInState(String resourceOwnerId)Creates an state value with the resource owner id encoded in it.StringgetEncodedState()
-
-
-
Field Detail
-
RESOURCE_OWNER_PARAM_NAME
public static final String RESOURCE_OWNER_PARAM_NAME
- See Also:
- Constant Field Values
-
RESOURCE_OWNER_PARAM_NAME_ASSIGN
public static final String RESOURCE_OWNER_PARAM_NAME_ASSIGN
- See Also:
- Constant Field Values
-
ON_COMPLETE_REDIRECT_TO_PARAM_NAME
public static final String ON_COMPLETE_REDIRECT_TO_PARAM_NAME
- See Also:
- Constant Field Values
-
ON_COMPLETE_REDIRECT_TO_PARAM_NAME_ASSIGN
public static final String ON_COMPLETE_REDIRECT_TO_PARAM_NAME_ASSIGN
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
StateEncoder
public StateEncoder(String originalState)
-
-
Method Detail
-
encodeResourceOwnerIdInState
public void encodeResourceOwnerIdInState(String resourceOwnerId)
Creates an state value with the resource owner id encoded in it.- Parameters:
resourceOwnerId- the resourceOwnerId to encode
-
encodeOnCompleteRedirectToInState
public void encodeOnCompleteRedirectToInState(String onCompleteRedirectToValue)
Creates and state value with the redirect url to send the user when the oauth dance is complete- Parameters:
onCompleteRedirectToValue- the redirect url to encode
-
getEncodedState
public String getEncodedState()
-
-