feat(oauth): add support for Pushed Authorization Requests (RFC9126) (#1404)

Co-authored-by: Elias Schneider <login@eliasschneider.com>
This commit is contained in:
Thibault NORMAND
2026-06-02 14:02:12 +02:00
committed by GitHub
co-authored by Elias Schneider
parent 2eada149af
commit 68a5abdcca
27 changed files with 765 additions and 54 deletions
+8 -5
View File
@@ -24,7 +24,8 @@ class OidcService extends APIService {
codeChallengeMethod?: string,
reauthenticationToken?: string,
responseMode?: string,
prompt?: string
prompt?: string,
requestURI?: string
) => {
const res = await this.api.post('/oidc/authorize', {
scope,
@@ -35,19 +36,21 @@ class OidcService extends APIService {
codeChallengeMethod,
reauthenticationToken,
responseMode,
prompt
prompt,
requestURI
});
return res.data as AuthorizeResponse;
};
isAuthorizationRequired = async (clientId: string, scope: string) => {
isAuthorizationRequired = async (clientId: string, scope: string, requestURI?: string) => {
const res = await this.api.post('/oidc/authorization-required', {
scope,
clientId
clientId,
requestURI
});
return res.data.authorizationRequired as boolean;
return res.data as { authorizationRequired: boolean; scope: string };
};
listClients = async (options?: ListRequestOptions) => {
+1
View File
@@ -26,6 +26,7 @@ export type OidcClient = OidcClientMetaData & {
isPublic: boolean;
pkceEnabled: boolean;
requiresReauthentication: boolean;
requiresPushedAuthorizationRequests: boolean;
credentials?: OidcClientCredentials;
launchURL?: string;
isGroupRestricted: boolean;