From f21c89f95574998ed706777b0f19483515976d37 Mon Sep 17 00:00:00 2001 From: Creaous <68230846+Creaous@users.noreply.github.com> Date: Tue, 9 Apr 2024 19:02:24 +0930 Subject: [PATCH] feat: add deprecation notice and publish last version --- README.md | 52 ++++++++++++++++++++++++++++++++++++++++------------ package.json | 4 ++-- 2 files changed, 42 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 0566b2f..bf95fd8 100644 --- a/README.md +++ b/README.md @@ -3,34 +3,62 @@ ![NPM Downloads](https://img.shields.io/npm/dt/%40nexirift%2Fplugin-keycloak) # plugin-keycloak -A basic [GraphQL Yoga](https://github.com/dotansimha/graphql-yoga) plugin that adds functionality to authenticate users using the [Keycloak](https://www.keycloak.org/) service. + +A basic [GraphQL Yoga](https://github.com/dotansimha/graphql-yoga) plugin that +adds functionality to authenticate users using the +[Keycloak](https://www.keycloak.org/) service. + +## Deprecation Notice + +As of the 9th of April 2024, +[plugin-keycloak](https://github.com/Nexirift/plugin-keycloak) has been +deprecated, effective immediately. If you wish to use this package, please +switch to [plugin-oidc](https://github.com/Nexirift/plugin-oidc) as that will be +our new maintained version. The new plugin will have support for OpenID Connect +compatible clients meaning that you can use other services like +[Authentik](https://goauthentik.io). ## How does it work? -This plugin checks an access token which is a `Bearer` token on the `Authentication` header with the Keycloak server to verify if it's valid. Additionally, it passes back the response info, which includes information like the `preferred_username`, this can then be used in the GraphQL Yoga server to identify users. +This plugin checks an access token which is a `Bearer` token on the +`Authentication` header with the Keycloak server to verify if it's valid. +Additionally, it passes back the response info, which includes information like +the `preferred_username`, this can then be used in the GraphQL Yoga server to +identify users. ## BREAKING CHANGES -Starting from [v1.1.5](https://github.com/Nexirift/plugin-keycloak/releases/tag/1.1.5), we have removed the dependency of `keycloak-backend`. In addition, we have changed `ITokenContent` to `KeycloakToken`, please update these in your code. You can also see this [commit](https://github.com/Nexirift/plugin-keycloak-example/commit/6dcf3c9dc93351006b63005f7e398cc72fa84522) for changes. +Starting from +[v1.1.5](https://github.com/Nexirift/plugin-keycloak/releases/tag/1.1.5), we +have removed the dependency of `keycloak-backend`. In addition, we have changed +`ITokenContent` to `KeycloakToken`, please update these in your code. You can +also see this +[commit](https://github.com/Nexirift/plugin-keycloak-example/commit/6dcf3c9dc93351006b63005f7e398cc72fa84522) +for changes. ## Example -Please see [here](https://github.com/Nexirift/plugin-keycloak-example) for an example of how to use the project. +Please see [here](https://github.com/Nexirift/plugin-keycloak-example) for an +example of how to use the project. ## Disclaimer -We are working on trying to stop depending on so many dependencies. As part of this, we have copied some code from the keycloak-backend library. This project, at the time of writing, is using the MIT license. The files that were took were: +We are working on trying to stop depending on so many dependencies. As part of +this, we have copied some code from the keycloak-backend library. This project, +at the time of writing, is using the MIT license. The files that were took were: -- `Token.ts` -> `token.ts` -- `Keycloak.ts` -> `keycloak.ts` -- `Jwt.ts` -> `jwt.ts` +- `Token.ts` -> `token.ts` +- `Keycloak.ts` -> `keycloak.ts` +- `Jwt.ts` -> `jwt.ts` -We plan to adapt these files more as we change around our codebase. For example, the new scopes feature that was mentioned in issue [#2](https://github.com/Nexirift/plugin-keycloak/issues/2). +We plan to adapt these files more as we change around our codebase. For example, +the new scopes feature that was mentioned in issue +[#2](https://github.com/Nexirift/plugin-keycloak/issues/2). ## Credits Disclaimer: This plugin was based off of the plugin-jwt source code. -- [GraphQL Yoga](https://github.com/dotansimha/graphql-yoga) -- [Keycloak](https://www.keycloak.org/) -- [plugin-jwt](https://github.com/dotansimha/graphql-yoga/tree/main/packages/plugins/jwt) +- [GraphQL Yoga](https://github.com/dotansimha/graphql-yoga) +- [Keycloak](https://www.keycloak.org/) +- [plugin-jwt](https://github.com/dotansimha/graphql-yoga/tree/main/packages/plugins/jwt) diff --git a/package.json b/package.json index 1317128..1c164ed 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@nexirift/plugin-keycloak", - "version": "1.1.5", + "version": "1.1.6", "type": "commonjs", "description": "Plugin for GraphQL Yoga that adds Keycloak authentication and authorization.", "author": "Nexirift", @@ -30,4 +30,4 @@ "access": "public" }, "main": "dist/index.js" -} \ No newline at end of file +}