Skip to content

Commit

Permalink
logging for Moodle autologin
Browse files Browse the repository at this point in the history
  • Loading branch information
anhefti committed Dec 10, 2024
1 parent 94cfeef commit f91b3a9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,10 @@ public void commence(
.getAuthorizationContext(request.getSession());

// check first if we already have an active session if so, invalidate it first
if (authorizationContext.isLoggedIn()) {
authorizationContext.logout();
authorizationContext = authorizationContextHolder.getAuthorizationContext(request.getSession());
}
// if (authorizationContext.isLoggedIn()) {
// authorizationContext.logout();
// authorizationContext = authorizationContextHolder.getAuthorizationContext(request.getSession());
// }

if (authorizationContext.autoLogin(jwt)) {
forwardToEntryPoint(request, response, this.guiEntryPoint, true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -294,9 +294,9 @@ public boolean autoLogin(final String oneTimeToken) {
this.resource.setUsername(loginInfo.username);
this.resource.setPassword(loginInfo.userUUID);

this.restTemplate.getOAuth2ClientContext().setAccessToken(null);
this.restTemplate.getAccessToken();
//this.restTemplate.getOAuth2ClientContext().setAccessToken(loginInfo.login);
// this.restTemplate.getOAuth2ClientContext().setAccessToken(null);
// this.restTemplate.getAccessToken();
this.restTemplate.getOAuth2ClientContext().setAccessToken(loginInfo.login);

loginForward = loginInfo.login_forward;
return this.isLoggedIn();
Expand Down

0 comments on commit f91b3a9

Please sign in to comment.