You are here

function oauth2_server_test_oauth2_server_default_scope in OAuth2 Server 8

Same name and namespace in other branches
  1. 7 tests/oauth2_server_test.module \oauth2_server_test_oauth2_server_default_scope()
  2. 2.0.x tests/modules/oauth2_server_test/oauth2_server_test.module \oauth2_server_test_oauth2_server_default_scope()

Implements hook_oauth2_server_default_scope().

File

tests/modules/oauth2_server_test/oauth2_server_test.module, line 23
Support module for OAuth2 Server testing.

Code

function oauth2_server_test_oauth2_server_default_scope(ServerInterface $server) {

  // Grant "basic" and "admin" scopes by default.
  if ($server
    ->id() == 'test_server') {
    return [
      'basic',
      'admin',
    ];
  }
}