Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F117767362
D5634.1775233747.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
2 KB
Referenced Files
None
Subscribers
None
D5634.1775233747.diff
View Options
diff --git a/src/app/Auth/IdentityEntity.php b/src/app/Auth/IdentityEntity.php
--- a/src/app/Auth/IdentityEntity.php
+++ b/src/app/Auth/IdentityEntity.php
@@ -41,6 +41,12 @@
$claims['email'] = $this->user->email;
}
+ if (in_array('profile', $scopes)) {
+ $claims['profile'] = [
+ 'name' => $this->user->name(true)
+ ];
+ }
+
// Short living password for IMAP/SMTP
// We use same TTL as for the OAuth tokens, so clients can get a new password on token refresh
if (in_array('auth.token', $scopes)) {
@@ -53,6 +59,21 @@
$claims['uuid'] = (string)($this->user->getSetting('uid') ?: $this->user->id);
}
+ // TODO set groups information
+ // if (in_array('groups', $scopes)) {
+ // $claims['groups'] = ['testgroup1', 'testgroup2'];
+ // // $claims['groups'] = [
+ // // [
+ // // 'gid' => 'gid1',
+ // // 'displayname' => 'testgroup1'
+ // // ],
+ // // [
+ // // 'gid' => 'gid2',
+ // // 'displayname' => 'testgroup2'
+ // // ],
+ // // ];
+ // }
+
return $claims;
}
}
diff --git a/src/config/openid.php b/src/config/openid.php
--- a/src/config/openid.php
+++ b/src/config/openid.php
@@ -10,12 +10,13 @@
'tokens_can' => [
'openid' => 'Enable OpenID Connect',
'email' => 'Information about your email address',
- // 'profile' => 'Information about your profile',
+ 'profile' => 'Information about your profile',
// 'phone' => 'Information about your phone numbers',
// 'address' => 'Information about your address',
// 'login' => 'See your login information',
'auth.token' => 'Kolab authentication token',
'uuid' => 'User unique identifier',
+ 'groups' => 'User groups',
],
],
@@ -30,6 +31,7 @@
// 'company_phone',
// 'company_email',
// ],
+ 'groups' => ['groups'],
'auth.token' => [
'auth.token',
],
diff --git a/src/resources/lang/en/auth.php b/src/resources/lang/en/auth.php
--- a/src/resources/lang/en/auth.php
+++ b/src/resources/lang/en/auth.php
@@ -22,6 +22,8 @@
'claim.auth.token' => "Have read and write access to all your data",
'claim.openid' => "See your email/id via a standard authorization token (OIDC)",
'claim.uuid' => "See your unique user identifier",
+ 'claim.groups' => "See your user groups",
+ 'claim.profile' => "See your profile",
'error.password' => "Invalid password",
'error.password-expired' => "Expired password",
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Apr 3, 4:29 PM (18 h, 2 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18819024
Default Alt Text
D5634.1775233747.diff (2 KB)
Attached To
Mode
D5634: Prepared display name & groups in oidc
Attached
Detach File
Event Timeline