Subversion Repositories oidplus

Rev

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

Rev 1116 Rev 1300
Line 95... Line 95...
95
         * @return OIDplusAuthContentStoreSession|null
95
         * @return OIDplusAuthContentStoreSession|null
96
         */
96
         */
97
        public static function getActiveProvider()/*: ?OIDplusAuthContentStore*/ {
97
        public static function getActiveProvider()/*: ?OIDplusAuthContentStore*/ {
98
                static $contentProvider = null;
98
                static $contentProvider = null;
99
 
99
 
-
 
100
                $rel_url = substr($_SERVER['REQUEST_URI'], strlen(OIDplus::webpath(null, OIDplus::PATH_RELATIVE_TO_ROOT)));
-
 
101
                if (str_starts_with($rel_url, 'rest/')) { // <== TODO: Find a way how to move this into the plugin, since REST does not belong to the core. (Maybe some kind of "stateless mode" that is enabled by the REST plugin)
-
 
102
                        // For REST, we must only allow JWT from Bearer and nothing else! So disable cookies if we are accessing the REST plugin
-
 
103
                        return null;
-
 
104
                }
-
 
105
 
100
                if (!$contentProvider) {
106
                if (!$contentProvider) {
101
                        if (self::getSessionHandler()->isActive()) {
107
                        if (self::getSessionHandler()->isActive()) {
102
                                $contentProvider = new OIDplusAuthContentStoreSession();
108
                                $contentProvider = new OIDplusAuthContentStoreSession();
103
                        }
109
                        }
104
                }
110
                }