public static function is_valid_issuer(\core\oauth2\issuer $issuer) {
        $endpointwebdav = false;
        $endpointocs = false;
        $endpointtoken = false;
        $endpointauth = false;
        $endpointuserinfo = false;
        $endpoints = \core\oauth2\api::get_endpoints($issuer);
        foreach ($endpoints as $endpoint) {
            $name = $endpoint->get('name');
            switch ($name) {
                case 'webdav_endpoint':
                    $endpointwebdav = true;
                    break;
                case 'ocs_endpoint':
                    $endpointocs = true;
                    break;
                case 'token_endpoint':
                    $endpointtoken = true;
                    break;
                case 'authorization_endpoint':
                    $endpointauth = true;
                    break;
                case 'userinfo_endpoint':
                    $endpointuserinfo = true;
                    break;
            }
        }
        return $endpointwebdav && $endpointocs && $endpointtoken && $endpointauth && $endpointuserinfo;
    }
public static function is_valid_issuer(\core\oauth2\issuer $issuer) {
        $endpointwebdav = false;
        $endpointocs = false;
        $endpointtoken = false;
        $endpointauth = false;
        $endpointuserinfo = false;
        $endpoints = \core\oauth2\api::get_endpoints($issuer);
        foreach ($endpoints as $endpoint) {
            $name = $endpoint->get('name');
            switch ($name) {
                case 'webdav_endpoint':
                    $endpointwebdav = true;
                    break;
                case 'ocs_endpoint':
                    $endpointocs = true;
                    break;
                case 'token_endpoint':
                    $endpointtoken = true;
                    break;
                case 'authorization_endpoint':
                    $endpointauth = true;
                    break;
                case 'userinfo_endpoint':
                    $endpointuserinfo = true;
                    break;
            }
        }
        return $endpointwebdav && $endpointocs && $endpointtoken && $endpointauth && $endpointuserinfo;
    }
public static function is_valid_issuer ( \ core \ oauth2 \ issuer $ issuer ) { $ endpointwebdav = false ; $ endpointocs = false ; $ endpointtoken = false ; $ endpointauth = false ; $ endpointuserinfo = false ; $ endpoints = \ core \ oauth2 \ api :: get_endpoints ( $ issuer ) ; foreach ( $ endpoints as $ endpoint ) { $ name = $ endpoint -> get ( 'name' ) ; switch ( $ name ) { case 'webdav_endpoint' : $ endpointwebdav = true ; break ; case 'ocs_endpoint' : $ endpointocs = true ; break ; case 'token_endpoint' : $ endpointtoken = true ; break ; case 'authorization_endpoint' : $ endpointauth = true ; break ; case 'userinfo_endpoint' : $ endpointuserinfo = true ; break ; } } return $ endpointwebdav && $ endpointocs && $ endpointtoken && $ endpointauth && $ endpointuserinfo ; }
Check if an issuer provides all endpoints that are required by repository_nextcloud.
@param \core\oauth2\issuer $issuer An issuer.
@return bool True, if all endpoints exist; false otherwise.
Check if an issuer provides all endpoints that are required by repository_nextcloud .