Temporary disabling exchange for offline token since with new keycloak original token should be issued with `offline` scope to work and has still to be inroduced the possibility to do it

This commit is contained in:
Mauro Mugnaini 2024-05-03 12:13:41 +02:00
parent 899cf13afd
commit eabd708631
Signed by: mauro.mugnaini
GPG Key ID: 2440CFD0EB321EA8
2 changed files with 17 additions and 17 deletions

View File

@ -720,22 +720,22 @@ public class DefaultKeycloakClient implements KeycloakClient {
null);
}
@Override
public TokenResponse exchangeTokenForOfflineToken(String context, String oidcAccessToken, String clientId,
String clientSecret, String audience) throws KeycloakClientException {
// @Override
// public TokenResponse exchangeTokenForOfflineToken(String context, String oidcAccessToken, String clientId,
// String clientSecret, String audience) throws KeycloakClientException {
//
// return exchangeTokenForOfflineToken(getTokenEndpointURL(getRealmBaseURL(context)), oidcAccessToken, clientId,
// clientSecret, audience);
// }
return exchangeTokenForOfflineToken(getTokenEndpointURL(getRealmBaseURL(context)), oidcAccessToken, clientId,
clientSecret, audience);
}
@Override
public TokenResponse exchangeTokenForOfflineToken(URL tokenURL, String oidcAccessToken, String clientId,
String clientSecret, String audience) throws IllegalArgumentException, KeycloakClientException {
// ModelUtils.getAccessTokenFrom(oidcTokenResponse).getScope().
return exchangeToken(tokenURL, oidcAccessToken, clientId, clientSecret, audience, REFRESH_TOKEN_TOKEN_TYPE,
OFFLINE_ACCESS_SCOPE);
}
// @Override
// public TokenResponse exchangeTokenForOfflineToken(URL tokenURL, String oidcAccessToken, String clientId,
// String clientSecret, String audience) throws IllegalArgumentException, KeycloakClientException {
//
// // ModelUtils.getAccessTokenFrom(oidcTokenResponse).getScope().
// return exchangeToken(tokenURL, oidcAccessToken, clientId, clientSecret, audience, REFRESH_TOKEN_TOKEN_TYPE,
// OFFLINE_ACCESS_SCOPE);
// }
/**
* Queries from the OIDC server an exchanged token by using provided access token, for the given audience (context),

View File

@ -650,8 +650,8 @@ public interface KeycloakClient {
// TokenResponse exchangeTokenForOfflineToken(URL tokenURL, String oidcAccessToken, String clientId,
// String clientSecret, String audience) throws IllegalArgumentException, KeycloakClientException;
TokenResponse exchangeTokenForOfflineToken(String context, String oidcAccessToken, String clientId,
String clientSecret, String audience) throws IllegalArgumentException, KeycloakClientException;
// TokenResponse exchangeTokenForOfflineToken(String context, String oidcAccessToken, String clientId,
// String clientSecret, String audience) throws IllegalArgumentException, KeycloakClientException;
/**
* Introspects an access token against the Keycloak server.