Skip to content

Commit

Permalink
fix: Add revocation_endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
anku255 committed Aug 8, 2024
1 parent aa0d86c commit ec1aa28
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ async function getOpenIdDiscoveryConfiguration(apiImplementation, options, userC
authorization_endpoint: result.authorization_endpoint,
token_endpoint: result.token_endpoint,
userinfo_endpoint: result.userinfo_endpoint,
revocation_endpoint: result.revocation_endpoint,
subject_types_supported: result.subject_types_supported,
id_token_signing_alg_values_supported: result.id_token_signing_alg_values_supported,
response_types_supported: result.response_types_supported,
Expand Down
1 change: 1 addition & 0 deletions lib/build/recipe/openid/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export default class OpenIdRecipeWrapper {
authorization_endpoint: string;
token_endpoint: string;
userinfo_endpoint: string;
revocation_endpoint: string;
subject_types_supported: string[];
id_token_signing_alg_values_supported: string[];
response_types_supported: string[];
Expand Down
1 change: 1 addition & 0 deletions lib/build/recipe/openid/recipeImplementation.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ function getRecipeInterface(config, jwtRecipeImplementation, appInfo) {
authorization_endpoint: apiBasePath + constants_2.AUTH_PATH,
token_endpoint: apiBasePath + constants_2.TOKEN_PATH,
userinfo_endpoint: apiBasePath + constants_2.USER_INFO_PATH,
revocation_endpoint: apiBasePath + constants_2.REVOKE_TOKEN_PATH,
subject_types_supported: ["public"],
id_token_signing_alg_values_supported: ["RS256"],
response_types_supported: ["code", "id_token", "id_token token"],
Expand Down
2 changes: 2 additions & 0 deletions lib/build/recipe/openid/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ export declare type APIInterface = {
authorization_endpoint: string;
token_endpoint: string;
userinfo_endpoint: string;
revocation_endpoint: string;
subject_types_supported: string[];
id_token_signing_alg_values_supported: string[];
response_types_supported: string[];
Expand All @@ -86,6 +87,7 @@ export declare type RecipeInterface = {
authorization_endpoint: string;
token_endpoint: string;
userinfo_endpoint: string;
revocation_endpoint: string;
subject_types_supported: string[];
id_token_signing_alg_values_supported: string[];
response_types_supported: string[];
Expand Down
1 change: 1 addition & 0 deletions lib/build/recipe/session/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ export default class SessionWrapper {
authorization_endpoint: string;
token_endpoint: string;
userinfo_endpoint: string;
revocation_endpoint: string;
subject_types_supported: string[];
id_token_signing_alg_values_supported: string[];
response_types_supported: string[];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export default async function getOpenIdDiscoveryConfiguration(
authorization_endpoint: result.authorization_endpoint,
token_endpoint: result.token_endpoint,
userinfo_endpoint: result.userinfo_endpoint,
revocation_endpoint: result.revocation_endpoint,
subject_types_supported: result.subject_types_supported,
id_token_signing_alg_values_supported: result.id_token_signing_alg_values_supported,
response_types_supported: result.response_types_supported,
Expand Down
3 changes: 2 additions & 1 deletion lib/ts/recipe/openid/recipeImplementation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { RecipeInterface as JWTRecipeInterface, JsonWebKey } from "../jwt/types"
import NormalisedURLPath from "../../normalisedURLPath";
import { GET_JWKS_API } from "../jwt/constants";
import { NormalisedAppinfo, UserContext } from "../../types";
import { AUTH_PATH, TOKEN_PATH, USER_INFO_PATH } from "../oauth2provider/constants";
import { AUTH_PATH, REVOKE_TOKEN_PATH, TOKEN_PATH, USER_INFO_PATH } from "../oauth2provider/constants";

export default function getRecipeInterface(
config: TypeNormalisedInput,
Expand All @@ -39,6 +39,7 @@ export default function getRecipeInterface(
authorization_endpoint: apiBasePath + AUTH_PATH,
token_endpoint: apiBasePath + TOKEN_PATH,
userinfo_endpoint: apiBasePath + USER_INFO_PATH,
revocation_endpoint: apiBasePath + REVOKE_TOKEN_PATH,
subject_types_supported: ["public"],
id_token_signing_alg_values_supported: ["RS256"],
response_types_supported: ["code", "id_token", "id_token token"],
Expand Down
2 changes: 2 additions & 0 deletions lib/ts/recipe/openid/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ export type APIInterface = {
authorization_endpoint: string;
token_endpoint: string;
userinfo_endpoint: string;
revocation_endpoint: string;
subject_types_supported: string[];
id_token_signing_alg_values_supported: string[];
response_types_supported: string[];
Expand All @@ -104,6 +105,7 @@ export type RecipeInterface = {
authorization_endpoint: string;
token_endpoint: string;
userinfo_endpoint: string;
revocation_endpoint: string;
subject_types_supported: string[];
id_token_signing_alg_values_supported: string[];
response_types_supported: string[];
Expand Down
1 change: 1 addition & 0 deletions test/with-typescript/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1596,6 +1596,7 @@ Session.init({
token_endpoint: "http://localhost:3000/auth/oauth2/token",
authorization_endpoint: "http://localhost:3000/auth/oauth2/auth",
userinfo_endpoint: "http://localhost:3000/auth/oauth2/userinfo",
revocation_endpoint: "http://localhost:3000/auth/oauth2/revoke",
id_token_signing_alg_values_supported: [],
response_types_supported: [],
subject_types_supported: [],
Expand Down

0 comments on commit ec1aa28

Please sign in to comment.