aerogear / keycloak-connect-graphql

Add Keyloak Authentication and Authorization to your GraphQL server.
Apache License 2.0
155 stars 22 forks source link

Implementation to return error codes #77

Closed wtrocki closed 4 years ago

wtrocki commented 4 years ago

Motivation

Return error codes for all programatic errors

Possible error codes:

Verification

Sample app should return extra value now:

{
   "errors":[
      {
        "message":"User is not authorized. Must have one of the following roles: [admin]",
        "code": "FORBIDDEN"
      }
   ]
}
wtrocki commented 4 years ago

Going to adjust tests after review is finished