How to specify Auth0 scopes


#1

Hello,

I would like to specify the Auth0 scopes I use for my API.

Let’s said I have a security schema like this :

#%RAML 1.0 SecurityScheme
type: x-CUSTOM-AUTH
description: A basic authentification
describedBy:
  headers:
    Authorization:
      description: Used to send a valid access token (Bearer access_token)
      pattern: ^Bearer \w+\w.+\..+$
      example: Bearer ds.sdf.sdf
  responses:
    401:
      description: Bad or expired token.
    403:
      description: Access denied not valid privilege in ressource
settings:
  scopes: ["all:read", "all:write", "admin"]

What I want to do in my main raml file:

/examples:
     securedBy: [CUSTOM-AUTH : {scopes: ["all:read"]}]

The problem I got an error like this :

`The ‘all:write’ scope is not allowed for the ‘CUSTOM-AUTH’ security scheme. Allowed scopes are:

So any idea ?.`