-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
Description
| // TODO assign default domain, create one if none exists (call fomain getter/setter in adduser() |
accesstoken: $this->auth->fetch_token($request),
certs: $this->auth->get_jwks($this->settings['oidc'])
);
$this->logger->debug("auth.enforce: jwt", [
"ALL" => $token,
"SUB" => $token['claims']['sub']
]);
$user = $this->auth->getuser($token['claims']['sub']);
$this->logger->debug("auth.enforce: db", [ "USER" => $user ]);
if ($user === false) {
$this->logger->error( 'auth.enforce: adduser', [ "UUID" => $token['claims']['sub'] ]);
// TODO rework core_auth_user table to reference data from json
// TODO consider updating user info from id server - on login only?, cron job?
// TODO assign default domain, create one if none exists (call fomain getter/setter in adduser()
$this->auth->adduser($token['claims']);
}
} catch (\Exception $e) {
$this->logger->error( 'auth.enforce authentication failed', [ $e->getMessage() ]);