Assign value to client
This commit is contained in:
parent
3968e78c87
commit
de86108bda
|
@ -28,15 +28,13 @@ public class UserUtils {
|
||||||
|
|
||||||
ClientInfo client = null;
|
ClientInfo client = null;
|
||||||
try{
|
try{
|
||||||
AuthorizationProvider.instance.get().getClient();
|
client = AuthorizationProvider.instance.get().getClient();
|
||||||
}catch(Throwable e) {
|
}catch(Throwable e) {
|
||||||
log.warn("Unable to get client info ",e);
|
log.warn("Unable to get client info ",e);
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO Actually get ROLES
|
|
||||||
Set<String> roles = new HashSet<>();
|
|
||||||
AuthenticatedUser toReturn =
|
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);
|
log.info("Current User is {} ",toReturn);
|
||||||
return toReturn;
|
return toReturn;
|
||||||
|
|
Loading…
Reference in New Issue