Assign value to client

This commit is contained in:
Fabio Sinibaldi 2022-05-05 14:15:02 +02:00
parent 3968e78c87
commit de86108bda
1 changed files with 2 additions and 4 deletions

View File

@ -28,15 +28,13 @@ public class UserUtils {
ClientInfo client = null;
try{
AuthorizationProvider.instance.get().getClient();
client = AuthorizationProvider.instance.get().getClient();
}catch(Throwable e) {
log.warn("Unable to get client info ",e);
}
//TODO Actually get ROLES
Set<String> roles = new HashSet<>();
AuthenticatedUser toReturn =
new AuthenticatedUser(client,roles, AccessTokenProvider.instance.get(),SecurityTokenProvider.instance.get(),context);
new AuthenticatedUser(client,new HashSet<>(client.getRoles()), AccessTokenProvider.instance.get(),SecurityTokenProvider.instance.get(),context);
log.info("Current User is {} ",toReturn);
return toReturn;