How to use keycloak-connect-graphql - 2 common examples

To help you get started, we’ve selected a few keycloak-connect-graphql examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github aerogear / datasync / packages / voyager-keycloak / src / KeycloakSecurityService.ts View on Github external
public async onSubscriptionConnect(connectionParams: any, webSocket: any, context: any): Promise<any> {
    const keycloakSubscriptionHandler = new KeycloakSubscriptionHandler({ keycloak: this.keycloak })
    const token = await keycloakSubscriptionHandler.onSubscriptionConnect(connectionParams, webSocket, context)
    const subscriptionContext = new KeycloakSubscriptionContext(token as any) // TODO fix type
    return {
      kauth: subscriptionContext,
      auth: subscriptionContext // keep backwards compatibility with voyager-server
    }
  }
}
github aerogear / datasync / packages / voyager-keycloak / src / KeycloakSecurityService.ts View on Github external
public async onSubscriptionConnect(connectionParams: any, webSocket: any, context: any): Promise<any> {
    const keycloakSubscriptionHandler = new KeycloakSubscriptionHandler({ keycloak: this.keycloak })
    const token = await keycloakSubscriptionHandler.onSubscriptionConnect(connectionParams, webSocket, context)
    const subscriptionContext = new KeycloakSubscriptionContext(token as any) // TODO fix type
    return {
      kauth: subscriptionContext,
      auth: subscriptionContext // keep backwards compatibility with voyager-server
    }
  }
}

keycloak-connect-graphql

Add Keycloak authentication and authorization to your GraphQL server.

Apache-2.0
Latest version published 2 years ago

Package Health Score

51 / 100
Full package analysis

Popular JavaScript code snippets

Find secure code to use in your application or website