forked from gCubeSystem/common-smartgears-legacy
added roles to ExternalService client info
This commit is contained in:
parent
72a5e54edd
commit
a71d8d1fac
|
@ -2,6 +2,10 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
|
|||
|
||||
# Changelog for Common Smartgears
|
||||
|
||||
## [v3.1.5-SNAPSHOT] - 2022-04-20
|
||||
|
||||
- Added roles to ExternalService Info on request handler verification
|
||||
|
||||
## [v3.1.4] - 2022-03-29
|
||||
|
||||
- fixes issue [#23075]
|
||||
|
|
2
pom.xml
2
pom.xml
|
@ -11,7 +11,7 @@
|
|||
|
||||
<groupId>org.gcube.core</groupId>
|
||||
<artifactId>common-smartgears</artifactId>
|
||||
<version>3.1.4</version>
|
||||
<version>3.1.5-SNAPSHOT</version>
|
||||
<name>SmartGears</name>
|
||||
|
||||
<dependencyManagement>
|
||||
|
|
|
@ -146,8 +146,8 @@ public class RequestContextRetriever extends RequestHandler {
|
|||
if (!jwt.isExternalService())
|
||||
clientInfo = new UserInfo(jwt.getUsername(), jwt.getRoles(), jwt.getEmail(), jwt.getFirstName(), jwt.getLastName());
|
||||
else
|
||||
clientInfo = new ExternalServiceInfo(jwt.getUsername(), "unknown");
|
||||
|
||||
clientInfo = new ExternalServiceInfo(jwt.getUsername(), "unknown", jwt.getRoles());
|
||||
|
||||
log.info("caller type is {}",clientInfo.getType());
|
||||
AuthorizationProvider.instance.set(new Caller(clientInfo, "token"));
|
||||
|
||||
|
|
Loading…
Reference in New Issue