bshaffer / oauth2-server-php

A library for implementing an OAuth2 Server in php
http://bshaffer.github.io/oauth2-server-php-docs
MIT License
3.26k stars 950 forks source link

Setting scopes #1003

Open slatermater opened 3 years ago

slatermater commented 3 years ago

Hi,

I'm using the following code in an attempt to define custom scopes:

$defaultScope = 'supplier'; $supportedScopes = array( 'supplier', 'client', 'administrator' ); $memory = new OAuth2\Storage\Memory(array( 'default_scope' => $defaultScope, 'supported_scopes' => $supportedScopes )); $scopeUtil = new OAuth2\Scope($memory);

$server->setScopeUtil($scopeUtil);

However, when I execute the code no changes are made to the DB (I'm using mySQL) - receive no error.

Would really appreciate any help, the library is brilliant by the way.

Many thanks...