+
Skip to content

Remove Google provider's override of exchangeExternalImpl to allow ex… #38450

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ public class GoogleIdentityProvider extends OIDCIdentityProvider implements Soci
public static final String AUTH_URL = "https://accounts.google.com/o/oauth2/v2/auth";
public static final String TOKEN_URL = "https://oauth2.googleapis.com/token";
public static final String PROFILE_URL = "https://openidconnect.googleapis.com/v1/userinfo";
public static final String JWKS_URL = "https://www.googleapis.com/oauth2/v3/certs";
public static final String DEFAULT_SCOPE = "openid profile email";

private static final String OIDC_PARAMETER_HOSTED_DOMAINS = "hd";
Expand All @@ -52,6 +53,7 @@ public GoogleIdentityProvider(KeycloakSession session, GoogleIdentityProviderCon
config.setAuthorizationUrl(AUTH_URL);
config.setTokenUrl(TOKEN_URL);
config.setUserInfoUrl(PROFILE_URL);
config.setJwksUrl(JWKS_URL);
}

@Override
Expand All @@ -73,24 +75,13 @@ protected String getUserInfoUrl() {
return uri;
}

@Override
protected boolean supportsExternalExchange() {
return true;
}

@Override
public boolean isIssuer(String issuer, MultivaluedMap<String, String> params) {
String requestedIssuer = params.getFirst(OAuth2Constants.SUBJECT_ISSUER);
if (requestedIssuer == null) requestedIssuer = issuer;
return requestedIssuer.equals(getConfig().getAlias());
}


@Override
protected BrokeredIdentityContext exchangeExternalImpl(EventBuilder event, MultivaluedMap<String, String> params) {
return exchangeExternalUserInfoValidationOnly(event, params);
}

@Override
protected UriBuilder createAuthorizationUrl(AuthenticationRequest request) {
UriBuilder uriBuilder = super.createAuthorizationUrl(request);
Expand Down
Loading
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载