Skip to content

Commit ceeb545

Browse files
committed
Store user in session cache
1 parent 0a4d2bd commit ceeb545

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/VerifierServer/OAuth2Authenticator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,12 +238,12 @@ public function getToken(
238238
public function getUser(): ?object
239239
{
240240
if (isset($this->user)) {
241-
return $this->user;
241+
return $this->sessions[$this->endpoint_name][$this->requesting_ip]['user'] = $this->user;
242242
}
243243
if (! isset($this->issuer, $this->userinfo_endpoint, $this->access_token)) {
244244
return null;
245245
}
246-
return $this->user = $this->apiRequest("{$this->issuer}{$this->userinfo_endpoint}");
246+
return $this->sessions[$this->endpoint_name][$this->requesting_ip]['user'] = $this->user = $this->apiRequest("{$this->issuer}{$this->userinfo_endpoint}");
247247
}
248248

249249
public function isAuthed(): bool

0 commit comments

Comments
 (0)