Class OidcRequestAuthenticator

java.lang.Object
org.wildfly.security.http.oidc.OidcRequestAuthenticator

public class OidcRequestAuthenticator extends Object
Author:
Bill Burke, Farah Juma
  • Field Details

  • Constructor Details

  • Method Details

    • getChallenge

      public AuthChallenge getChallenge()
    • getTokenString

      public String getTokenString()
    • getToken

      public AccessToken getToken()
    • 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()
    • getCookie

      protected OidcHttpFacade.Cookie getCookie(String cookieName)
    • getCookieValue

      protected String getCookieValue(String cookieName)
    • getError

      protected String getError()
    • getCode

      protected String getCode()
    • getRedirectUri

      protected String getRedirectUri(String state, String sessionRandomValueHash)
    • createOAuthRequest

      protected org.apache.http.client.utils.URIBuilder createOAuthRequest(org.apache.http.client.utils.URIBuilder redirectUriBuilder, String redirectUri, String state, List<org.apache.http.NameValuePair> forwardedQueryParams, String sessionRandomValueHash)
    • createRequestWithRequestParameter

      protected org.apache.http.client.utils.URIBuilder createRequestWithRequestParameter(String requestFormat, org.apache.http.client.utils.URIBuilder redirectUriBuilder, String redirectUri, String state, List<org.apache.http.NameValuePair> forwardedQueryParams, String sessionRandomValueHash) throws org.jose4j.lang.JoseException, IOException
      Throws:
      org.jose4j.lang.JoseException
      IOException
    • getSSLRedirectPort

      protected int getSSLRedirectPort()
    • getStateCode

      protected String getStateCode()
    • loginRedirect

      protected AuthChallenge loginRedirect()
    • checkStateCookie

      protected AuthChallenge checkStateCookie()
    • authenticate

      public Oidc.AuthOutcome authenticate()
    • challenge

      protected AuthChallenge challenge(int code, AuthenticationError.Reason reason, String description)
    • 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