Package org.wildfly.security.http.oidc
Class OidcRequestAuthenticator
- java.lang.Object
-
- org.wildfly.security.http.oidc.OidcRequestAuthenticator
-
public class OidcRequestAuthenticator extends Object
- Author:
- Bill Burke, Farah Juma
-
-
Field Summary
Fields Modifier and Type Field Description protected AuthChallenge
challenge
protected OidcClientConfiguration
deployment
protected OidcHttpFacade
facade
protected IDToken
idToken
protected String
idTokenString
protected String
refreshToken
protected RequestAuthenticator
reqAuthenticator
protected int
sslRedirectPort
protected String
strippedOauthParametersRequestUri
protected AccessToken
token
protected OidcTokenStore
tokenStore
protected String
tokenString
-
Constructor Summary
Constructors Constructor Description OidcRequestAuthenticator(RequestAuthenticator requestAuthenticator, OidcHttpFacade facade, OidcClientConfiguration deployment, int sslRedirectPort, OidcTokenStore tokenStore)
-
Method Summary
-
-
-
Field Detail
-
deployment
protected OidcClientConfiguration deployment
-
reqAuthenticator
protected RequestAuthenticator reqAuthenticator
-
sslRedirectPort
protected int sslRedirectPort
-
tokenStore
protected OidcTokenStore tokenStore
-
tokenString
protected String tokenString
-
idTokenString
protected String idTokenString
-
idToken
protected IDToken idToken
-
token
protected AccessToken token
-
facade
protected OidcHttpFacade facade
-
challenge
protected AuthChallenge challenge
-
refreshToken
protected String refreshToken
-
strippedOauthParametersRequestUri
protected String strippedOauthParametersRequestUri
-
-
Constructor Detail
-
OidcRequestAuthenticator
public OidcRequestAuthenticator(RequestAuthenticator requestAuthenticator, OidcHttpFacade facade, OidcClientConfiguration deployment, int sslRedirectPort, OidcTokenStore tokenStore)
-
-
Method Detail
-
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)
-
getError
protected String getError()
-
getCode
protected String getCode()
-
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
-
stripOauthParametersFromRedirect
private static String stripOauthParametersFromRedirect(String uri)
-
-