Package org.wildfly.security.http.oidc
Class OidcRequestAuthenticator
java.lang.Object
org.wildfly.security.http.oidc.OidcRequestAuthenticator
- Author:
- Bill Burke, Farah Juma
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AuthChallengeprotected OidcClientConfigurationprotected OidcHttpFacadeprotected IDTokenprotected Stringprotected Stringprotected RequestAuthenticatorprotected intprotected Stringprotected AccessTokenprotected OidcTokenStoreprotected String -
Constructor Summary
ConstructorsConstructorDescriptionOidcRequestAuthenticator(RequestAuthenticator requestAuthenticator, OidcHttpFacade facade, OidcClientConfiguration deployment, int sslRedirectPort, OidcTokenStore tokenStore) -
Method Summary
Modifier and TypeMethodDescriptionprotected AuthChallengechallenge(int code, AuthenticationError.Reason reason, String description) protected AuthChallengeprotected org.apache.http.client.utils.URIBuildercreateOAuthRequest(org.apache.http.client.utils.URIBuilder redirectUriBuilder, String redirectUri, String state, List<org.apache.http.NameValuePair> forwardedQueryParams, String sessionRandomValueHash) protected org.apache.http.client.utils.URIBuildercreateRequestWithRequestParameter(String requestFormat, org.apache.http.client.utils.URIBuilder redirectUriBuilder, String redirectUri, String state, List<org.apache.http.NameValuePair> forwardedQueryParams, String sessionRandomValueHash) protected StringgetCode()protected OidcHttpFacade.Cookieprotected StringgetCookieValue(String cookieName) protected StringgetError()protected StringgetRedirectUri(String state, String sessionRandomValueHash) protected Stringprotected intprotected StringgetToken()protected booleanprotected AuthChallengeprotected AuthChallengeresolveCode(String code) Start or continue the oauth login process.voidsetIDToken(IDToken idToken) voidsetIDTokenString(String idTokenString) voidsetStrippedOauthParametersRequestUri(String strippedOauthParametersRequestUri)
-
Field Details
-
deployment
-
reqAuthenticator
-
sslRedirectPort
protected int sslRedirectPort -
tokenStore
-
tokenString
-
idTokenString
-
idToken
-
token
-
facade
-
challenge
-
refreshToken
-
strippedOauthParametersRequestUri
-
-
Constructor Details
-
OidcRequestAuthenticator
public OidcRequestAuthenticator(RequestAuthenticator requestAuthenticator, OidcHttpFacade facade, OidcClientConfiguration deployment, int sslRedirectPort, OidcTokenStore tokenStore)
-
-
Method Details
-
getChallenge
-
getTokenString
-
getToken
-
getRefreshToken
-
getIDTokenString
-
setIDTokenString
-
getIDToken
-
setIDToken
-
getStrippedOauthParametersRequestUri
-
setStrippedOauthParametersRequestUri
-
getRequestUrl
-
isRequestSecure
protected boolean isRequestSecure() -
getCookie
-
getCookieValue
-
getError
-
getCode
-
getRedirectUri
-
createOAuthRequest
-
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.JoseExceptionIOException
-
getSSLRedirectPort
protected int getSSLRedirectPort() -
getStateCode
-
loginRedirect
-
checkStateCookie
-
authenticate
-
challenge
-
resolveCode
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
-