MDL-71119 core_badges: Initialise scopes param in backpack-connect.php
commit7dd480dde2cb52bd9e340dc667fc1bded21e88fb
authorSara Arjona <sara@moodle.com>
Tue, 16 Mar 2021 11:32:20 +0000 (16 12:32 +0100)
committerSara Arjona <sara@moodle.com>
Wed, 14 Apr 2021 08:55:59 +0000 (14 10:55 +0200)
tree9ff0118c4bb07b9dfd0c3482b89beb059c5b0890
parent7811d7ace490672dcd6922d6b9c78b2a9a6d8313
MDL-71119 core_badges: Initialise scopes param in backpack-connect.php

The scopes parameter should be passed when creating the OAuth2 badges
client. As it is an optional parameter, when it's empty, it will
be initilised with the supported scopes for the backpack issuer.

It will happen, for instance, when a call is done to oauth2callback.php
because, as defined in RFC6749, OAuth2 authorization response only
supports code and state.
badges/backpack-connect.php