Skip to content

scope

scope checks scopes in the parsed claims stored by a previous authentication middleware, usually session.

yaml
server:
  http:
    middlewares:
      require_write_scope:
        scope:
          scopes:
            - write:transactions
          methods:
            - POST
            - PUT
FieldDefaultDescription
scopesAny one listed scope is enough to pass. Empty means no scope check.
methodsallRestrict the check to these HTTP methods. Other methods continue.
noopfalseDisable the check and always continue.

Put session before scope in the router chain.