public class OIDCIdentityProvider extends AbstractOAuth2IdentityProvider<OIDCIdentityProviderConfig>
| Modifier and Type | Class and Description |
|---|---|
protected class |
OIDCIdentityProvider.OIDCEndpoint |
AbstractOAuth2IdentityProvider.EndpointIdentityProvider.AuthenticationCallback| Modifier and Type | Field and Description |
|---|---|
static String |
ACCESS_TOKEN_EXPIRATION |
static String |
FEDERATED_ACCESS_TOKEN_RESPONSE |
static String |
FEDERATED_ID_TOKEN |
protected static org.jboss.logging.Logger |
logger |
static String |
OAUTH2_PARAMETER_PROMPT |
static String |
SCOPE_OPENID |
static String |
USER_INFO |
static String |
VALIDATED_ID_TOKEN |
ACCESS_DENIED, FEDERATED_ACCESS_TOKEN, FEDERATED_REFRESH_TOKEN, FEDERATED_TOKEN_EXPIRATION, mapper, OAUTH2_GRANT_TYPE_AUTHORIZATION_CODE, OAUTH2_GRANT_TYPE_REFRESH_TOKEN, OAUTH2_PARAMETER_ACCESS_TOKEN, OAUTH2_PARAMETER_CLIENT_ID, OAUTH2_PARAMETER_CLIENT_SECRET, OAUTH2_PARAMETER_CODE, OAUTH2_PARAMETER_GRANT_TYPE, OAUTH2_PARAMETER_REDIRECT_URI, OAUTH2_PARAMETER_RESPONSE_TYPE, OAUTH2_PARAMETER_SCOPE, OAUTH2_PARAMETER_STATEACCOUNT_LINK_URL, session| Constructor and Description |
|---|
OIDCIdentityProvider(KeycloakSession session,
OIDCIdentityProviderConfig config) |
| Modifier and Type | Method and Description |
|---|---|
void |
authenticationFinished(AuthenticationSessionModel authSession,
BrokeredIdentityContext context) |
void |
backchannelLogout(KeycloakSession session,
UserSessionModel userSession,
javax.ws.rs.core.UriInfo uriInfo,
RealmModel realm) |
protected void |
backchannelLogout(UserSessionModel userSession,
String idToken) |
Object |
callback(RealmModel realm,
IdentityProvider.AuthenticationCallback callback,
EventBuilder event) |
protected javax.ws.rs.core.UriBuilder |
createAuthorizationUrl(AuthenticationRequest request) |
protected javax.ws.rs.core.Response |
exchangeSessionToken(javax.ws.rs.core.UriInfo uriInfo,
ClientModel authorizedClient,
UserSessionModel tokenUserSession,
UserModel tokenSubject,
AccessToken token) |
protected javax.ws.rs.core.Response |
exchangeStoredToken(javax.ws.rs.core.UriInfo uriInfo,
ClientModel authorizedClient,
UserSessionModel tokenUserSession,
UserModel tokenSubject,
AccessToken token) |
protected BrokeredIdentityContext |
extractIdentity(AccessTokenResponse tokenResponse,
String accessToken,
JsonWebToken idToken) |
protected String |
getDefaultScopes() |
BrokeredIdentityContext |
getFederatedIdentity(String response) |
protected String |
getUserInfoUrl() |
protected String |
getUsernameClaimName() |
javax.ws.rs.core.Response |
keycloakInitiatedBrowserLogout(KeycloakSession session,
UserSessionModel userSession,
javax.ws.rs.core.UriInfo uriInfo,
RealmModel realm) |
protected void |
processAccessTokenResponse(BrokeredIdentityContext context,
AccessTokenResponse response) |
String |
refreshTokenForLogout(KeycloakSession session,
UserSessionModel userSession)
Returns access token response as a string from a refresh token invocation on the remote OIDC broker
|
protected JsonWebToken |
validateToken(String encodedToken) |
protected boolean |
verify(JWSInput jws) |
asJsonNode, doGetFederatedIdentity, exchangeTo, extractTokenFromResponse, getAccessTokenResponseParameter, getConfig, getJsonProperty, performLogin, retrieveTokenclose, exchangeErrorResponse, exchangeNotLinked, exchangeNotSupported, exchangeTokenExpired, exchangeUnsupportedRequiredType, export, getLinkingUrl, getMarshaller, importNewUser, preprocessFederatedIdentity, updateBrokeredUserprotected static final org.jboss.logging.Logger logger
public static final String OAUTH2_PARAMETER_PROMPT
public static final String SCOPE_OPENID
public static final String FEDERATED_ID_TOKEN
public static final String USER_INFO
public static final String FEDERATED_ACCESS_TOKEN_RESPONSE
public static final String VALIDATED_ID_TOKEN
public static final String ACCESS_TOKEN_EXPIRATION
public OIDCIdentityProvider(KeycloakSession session, OIDCIdentityProviderConfig config)
public Object callback(RealmModel realm, IdentityProvider.AuthenticationCallback callback, EventBuilder event)
callback in interface IdentityProvider<OIDCIdentityProviderConfig>callback in class AbstractOAuth2IdentityProvider<OIDCIdentityProviderConfig>public void backchannelLogout(KeycloakSession session, UserSessionModel userSession, javax.ws.rs.core.UriInfo uriInfo, RealmModel realm)
backchannelLogout in interface IdentityProvider<OIDCIdentityProviderConfig>backchannelLogout in class AbstractIdentityProvider<OIDCIdentityProviderConfig>protected void backchannelLogout(UserSessionModel userSession, String idToken)
public javax.ws.rs.core.Response keycloakInitiatedBrowserLogout(KeycloakSession session, UserSessionModel userSession, javax.ws.rs.core.UriInfo uriInfo, RealmModel realm)
keycloakInitiatedBrowserLogout in interface IdentityProvider<OIDCIdentityProviderConfig>keycloakInitiatedBrowserLogout in class AbstractIdentityProvider<OIDCIdentityProviderConfig>public String refreshTokenForLogout(KeycloakSession session, UserSessionModel userSession)
session - userSession - protected javax.ws.rs.core.UriBuilder createAuthorizationUrl(AuthenticationRequest request)
createAuthorizationUrl in class AbstractOAuth2IdentityProvider<OIDCIdentityProviderConfig>protected void processAccessTokenResponse(BrokeredIdentityContext context, AccessTokenResponse response)
protected javax.ws.rs.core.Response exchangeStoredToken(javax.ws.rs.core.UriInfo uriInfo,
ClientModel authorizedClient,
UserSessionModel tokenUserSession,
UserModel tokenSubject,
AccessToken token)
exchangeStoredToken in class AbstractOAuth2IdentityProvider<OIDCIdentityProviderConfig>protected javax.ws.rs.core.Response exchangeSessionToken(javax.ws.rs.core.UriInfo uriInfo,
ClientModel authorizedClient,
UserSessionModel tokenUserSession,
UserModel tokenSubject,
AccessToken token)
exchangeSessionToken in class AbstractOAuth2IdentityProvider<OIDCIdentityProviderConfig>public BrokeredIdentityContext getFederatedIdentity(String response)
getFederatedIdentity in class AbstractOAuth2IdentityProvider<OIDCIdentityProviderConfig>protected BrokeredIdentityContext extractIdentity(AccessTokenResponse tokenResponse, String accessToken, JsonWebToken idToken) throws IOException
IOExceptionprotected String getUsernameClaimName()
protected String getUserInfoUrl()
protected boolean verify(JWSInput jws)
protected JsonWebToken validateToken(String encodedToken)
public void authenticationFinished(AuthenticationSessionModel authSession, BrokeredIdentityContext context)
authenticationFinished in interface IdentityProvider<OIDCIdentityProviderConfig>authenticationFinished in class AbstractOAuth2IdentityProvider<OIDCIdentityProviderConfig>protected String getDefaultScopes()
getDefaultScopes in class AbstractOAuth2IdentityProvider<OIDCIdentityProviderConfig>Copyright © 2017 JBoss by Red Hat. All rights reserved.