File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ public function getCurrentAccessToken()
4343 /**
4444 * @return string
4545 */
46- public function getApplicationType ()
46+ public function getApplicationType (): string
4747 {
4848 return $ this ->getAuthContextVar ('application_type ' );
4949 }
@@ -85,4 +85,9 @@ public function setAuthorizationContext(array $auth_context)
8585 $ this ->auth_context = $ auth_context ;
8686 return $ this ;
8787 }
88+
89+ public function getCurrentUserEmail (): ?string
90+ {
91+ return $ this ->getAuthContextVar (IResourceServerContext::UserEmail);
92+ }
8893}
Original file line number Diff line number Diff line change 66 */
77interface IResourceServerContext {
88
9+ const UserId = 'user_id ' ;
10+ const UserFirstName = 'user_first_name ' ;
11+ const UserLastName = 'user_last_name ' ;
12+ const UserEmail = 'user_email ' ;
13+ const UserEmailVerified = 'user_email_verified ' ;
14+
15+ const ApplicationType_Service = 'SERVICE ' ;
16+
917 /**
1018 * returns given scopes for current request
1119 * @return array
@@ -45,5 +53,11 @@ public function setAuthorizationContext(array $auth_context);
4553 /**
4654 * @return string
4755 */
48- public function getApplicationType ();
56+ public function getApplicationType ():string ;
57+
58+
59+ /**
60+ * @return string|null
61+ */
62+ public function getCurrentUserEmail ():?string ;
4963}
You can’t perform that action at this time.
0 commit comments