Subversion Repositories oidplus

Rev

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

Rev 1345 Rev 1367
Line 509... Line 509...
509
                        $tmp = null;
509
                        $tmp = null;
510
                        $silent_error = false;
510
                        $silent_error = false;
511
 
511
 
512
                        try {
512
                        try {
513
 
513
 
-
 
514
                                if (isset($_SERVER['REQUEST_URI'])) {
514
                                $rel_url = substr($_SERVER['REQUEST_URI'], strlen(OIDplus::webpath(null, OIDplus::PATH_RELATIVE_TO_ROOT)));
515
                                        $rel_url = substr($_SERVER['REQUEST_URI'], strlen(OIDplus::webpath(null, OIDplus::PATH_RELATIVE_TO_ROOT)));
515
                                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.
516
                                        $only_use_bearer = 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.
-
 
517
                                } else {
-
 
518
                                        $only_use_bearer = false;
-
 
519
                                }
-
 
520
 
-
 
521
                                if ($only_use_bearer) {
516
 
522
 
517
                                        // REST may only use Bearer Authentication
523
                                        // REST may only use Bearer Authentication
518
                                        $bearer = getBearerToken();
524
                                        $bearer = getBearerToken();
519
                                        if (!is_null($bearer)) {
525
                                        if (!is_null($bearer)) {
520
                                                $silent_error = false;
526
                                                $silent_error = false;