KEYCLOAK-88

Reset expiration on AccessCode before sending to application
This commit is contained in:
Stian Thorgersen 2013-10-09 17:04:25 +01:00
parent dfcf46b056
commit 5ccb557f7c
2 changed files with 2 additions and 0 deletions

View file

@ -296,6 +296,7 @@ public class AccountService {
return Flows.forms(realm, request, uriInfo).setAccessCode(accessCode).setUser(user)
.forwardToAction(requiredActions.iterator().next());
} else {
accessCode.setExpiration((System.currentTimeMillis() / 1000) + realm.getAccessCodeLifespan());
return Flows.oauth(realm, request, uriInfo, authManager, tokenManager).redirectAccessCode(accessCode,
accessCode.getState(), accessCode.getRedirectUri());
}

View file

@ -544,6 +544,7 @@ public class TokenService {
return redirectAccessDenied(redirect, state);
}
accessCodeEntry.setExpiration((System.currentTimeMillis() / 1000) + realm.getAccessCodeLifespan());
return oauth.redirectAccessCode(accessCodeEntry, state, redirect);
}