Class OAuthRequestAuthenticator


  • public class OAuthRequestAuthenticator
    extends Object
    Version:
    $Revision: 1 $
    Author:
    Bill Burke
    • Method Detail

      • getTokenString

        public String getTokenString()
      • getRefreshToken

        public String getRefreshToken()
      • getIdTokenString

        public String getIdTokenString()
      • setIdTokenString

        public void setIdTokenString​(String idTokenString)
      • getIdToken

        public IDToken getIdToken()
      • setIdToken

        public void setIdToken​(IDToken idToken)
      • getStrippedOauthParametersRequestUri

        public String getStrippedOauthParametersRequestUri()
      • setStrippedOauthParametersRequestUri

        public void setStrippedOauthParametersRequestUri​(String strippedOauthParametersRequestUri)
      • getRequestUrl

        protected String getRequestUrl()
      • isRequestSecure

        protected boolean isRequestSecure()
      • getCookieValue

        protected String getCookieValue​(String cookieName)
      • getQueryParamValue

        protected String getQueryParamValue​(String paramName)
      • getError

        protected String getError()
      • getCode

        protected String getCode()
      • getRedirectUri

        protected String getRedirectUri​(String state)
      • sslRedirectPort

        protected int sslRedirectPort()
      • getStateCode

        protected String getStateCode()
      • resolveCode

        protected AuthChallenge resolveCode​(String code)
        Start or continue the oauth login process.

        if code query parameter is not present, then browser is redirected to authUrl. The redirect URL will be the URL of the current request.

        If code query parameter is present, then an access token is obtained by invoking a secure request to the codeUrl. If the access token is obtained, the browser is again redirected to the current request URL, but any OAuth protocol specific query parameters are removed.

        Returns:
        null if an access token was obtained, otherwise a challenge is returned
      • stripOauthParametersFromRedirect

        protected String stripOauthParametersFromRedirect()
        strip out unwanted query parameters and redirect so bookmarks don't retain oauth protocol bits