Fixing token generation for clientId
This commit is contained in:
parent
79b6527057
commit
1199570e57
4
pom.xml
4
pom.xml
|
@ -156,6 +156,10 @@
|
|||
<groupId>org.gcube.common</groupId>
|
||||
<artifactId>gxHTTP</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.gcube.common</groupId>
|
||||
<artifactId>keycloak-client</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.gcube.core</groupId>
|
||||
|
|
|
@ -55,9 +55,9 @@ public class Constants {
|
|||
}
|
||||
|
||||
private static TokenResponse getJWTAccessToken() throws Exception {
|
||||
String contextToAuthorise = SecretManagerProvider.instance.get().getContext();
|
||||
Entry<String,String> entry = getClientIdAndClientSecret(contextToAuthorise);
|
||||
TokenResponse tr = KeycloakClientFactory.newInstance().queryUMAToken(contextToAuthorise, entry.getKey(), entry.getValue(), null, null);
|
||||
String context = SecretManagerProvider.instance.get().getContext();
|
||||
Entry<String,String> entry = getClientIdAndClientSecret(context);
|
||||
TokenResponse tr = KeycloakClientFactory.newInstance().queryUMAToken(context, entry.getKey(), entry.getValue(), context, null);
|
||||
return tr;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue