Class 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
    • 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()