public function checkRestrictedGrantType($client_id, $grant_type)
    {
        $client = $this->getClientDetails($client_id);

        if (!$client) {
            return false;
        }

        if (empty($client['grant_types'])) {
            return true;
        }

        if (in_array($grant_type, $client['grant_types'])) {
            return true;
        }

        return false;
    }
public function checkRestrictedGrantType($client_id, $grant_type)
    {
        $client = $this->getClientDetails($client_id);

        if (!$client) {
            return false;
        }

        if (empty($client['grant_types'])) {
            return true;
        }

        if (in_array($grant_type, $client['grant_types'])) {
            return true;
        }

        return false;
    }
public function checkRestrictedGrantType ( $ client_id , $ grant_type ) { $ client = $ this -> getClientDetails ( $ client_id ) ; if ( ! $ client ) { return false ; } if ( empty ( $ client [ 'grant_types' ] ) ) { return true ; } if ( in_array ( $ grant_type , $ client [ 'grant_types' ] ) ) { return true ; } return false ; }
Check restricted grant types of corresponding client identifier.

If you want to restrict clients to certain grant types, override this
function.

@param $client_id
Client identifier to be check with.
@param $grant_type
Grant type to be check with

@return
TRUE if the grant type is supported by this client identifier, and
FALSE if it isn't.

@ingroup oauth2_section_4
Check restricted grant types of corresponding client identifier .