aerogear / keycloak-connect-graphql

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

feat: Use graphql-utils directly without users directly relying on it #94

Closed wtrocki closed 4 years ago

wtrocki commented 4 years ago

The motivation here is to use new and maintained tools package that is not attached to Apollo and minimize the amount of changes needed.

wtrocki commented 4 years ago

@machi1990 I will need your help to verify these changes.

I have done an update for both keycloak and graphql-tools and verified it with the graphback and data sync starter, but to be sure would you ming verifying this changes using basic.js and basic.ts examples.

See 1b7405d where I'm changing role. Manually changing role for the example app should give you something like:

"extensions": {
        "code": "INTERNAL_SERVER_ERROR",
        "exception": {
          "code": "FORBIDDEN",
          "stacktrace": [
            "Error: User is not authorized. Must have one of the following roles: [admin]",
            "    at /Users/wtrocki/Projects/sync/keycloak-connect-graphql/dist/directives/directiveResolvers.js:109:23",
wtrocki commented 4 years ago

Also we might need to replicate this changes to datasync starter (mainly keycloak bump and ovp. We are using there keycloak v3 which is ancient.

I;m going to do DataSync starter