Subversion Repositories oidplus

Rev

Rev 570 | Rev 576 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 570 Rev 571
Line 22... Line 22...
22
class OIDplusAuthContentStoreJWT extends OIDplusAuthContentStoreDummy {
22
class OIDplusAuthContentStoreJWT extends OIDplusAuthContentStoreDummy {
23
 
23
 
24
        // Individual functions
24
        // Individual functions
25
 
25
 
26
        public function loadJWT($jwt) {
26
        public function loadJWT($jwt) {
-
 
27
                \Firebase\JWT\JWT::$leeway = 60; // leeway in seconds
27
                if (OIDplus::getPkiStatus()) {
28
                if (OIDplus::getPkiStatus()) {
28
                        $pubKey = OIDplus::config()->getValue('oidplus_public_key');
29
                        $pubKey = OIDplus::config()->getValue('oidplus_public_key');
29
                        $this->content = (array) \Firebase\JWT\JWT::decode($jwt, $pubKey, array('RS256', 'RS384', 'RS512'));
30
                        $this->content = (array) \Firebase\JWT\JWT::decode($jwt, $pubKey, array('RS256', 'RS384', 'RS512'));
30
                } else {
31
                } else {
31
                        $key = OIDplus::baseConfig()->getValue('SERVER_SECRET', '');
32
                        $key = OIDplus::baseConfig()->getValue('SERVER_SECRET', '');