File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
lib/Authentication/AuthTokens Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,8 @@ abstract class OIDCAuthToken implements IAuthentication
99 private $ userDetails = null ;
1010 private $ authorities = array ();
1111 private $ principal ;
12+ protected $ acceptedIssuers ;
13+ protected $ authRealm ;
1214
1315 /**
1416 * {@see IAuthentication::eraseCredentials()}
@@ -97,4 +99,17 @@ public static function isStateless()
9799 {
98100 return true ;
99101 }
102+
103+ /**
104+ * Set principal/User details from the session.
105+ */
106+ protected function setTokenFromSession ()
107+ {
108+ if (in_array ($ _SERVER ['OIDC_CLAIM_iss ' ], $ this ->acceptedIssuers , true )) {
109+ $ this ->principal = $ _SERVER ['REMOTE_USER ' ];
110+ $ this ->userDetails = array (
111+ 'AuthenticationRealm ' => array ($ this ->authRealm )
112+ );
113+ }
114+ }
100115}
You can’t perform that action at this time.
0 commit comments