mirror of
https://github.com/bmlong137/alfresco-keycloak.git
synced 2025-09-10 14:11:09 +00:00
Minor ticket refresh / role permission improvements
This commit is contained in:
@@ -555,7 +555,8 @@ public class IDMClientImpl implements InitializingBean, IDMClient
|
||||
this.tokenLock.readLock().lock();
|
||||
try
|
||||
{
|
||||
if (this.token != null && (!this.token.canRefresh() || !this.token.shouldRefresh(this.deployment.getTokenMinimumTimeToLive())))
|
||||
if (this.token != null && this.token.isActive()
|
||||
&& (!this.token.canRefresh() || !this.token.shouldRefresh(this.deployment.getTokenMinimumTimeToLive())))
|
||||
{
|
||||
validToken = this.token.getToken();
|
||||
}
|
||||
@@ -570,7 +571,7 @@ public class IDMClientImpl implements InitializingBean, IDMClient
|
||||
this.tokenLock.writeLock().lock();
|
||||
try
|
||||
{
|
||||
if (this.token != null
|
||||
if (this.token != null && this.token.isActive()
|
||||
&& (!this.token.canRefresh() || !this.token.shouldRefresh(this.deployment.getTokenMinimumTimeToLive())))
|
||||
{
|
||||
validToken = this.token.getToken();
|
||||
|
@@ -32,11 +32,12 @@ function process(permissions)
|
||||
{
|
||||
// enhance permissionObj.authority to at least add displayName
|
||||
// may/will still look like a user in UI which only differentiates groups / users
|
||||
// UI does not display full authority name unless we include it in the displayName (different to authority picker)
|
||||
permissionObj.authority = {
|
||||
name : authority,
|
||||
fullName : authority,
|
||||
shortName : authority.substring(5),
|
||||
displayName : role.description || role.keycloakName
|
||||
displayName : (role.description || role.keycloakName) + ' (' + authority + ')'
|
||||
};
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user