forked from baron/baron-sso
Trusted RP 생성 흐름 테스트 추가
This commit is contained in:
@@ -12,6 +12,9 @@ export type Client = {
|
||||
scopes: string[];
|
||||
createdAt: string;
|
||||
clientSecret?: string;
|
||||
tokenEndpointAuthMethod?: string;
|
||||
jwksUri?: string;
|
||||
jwks?: Record<string, unknown> | string;
|
||||
metadata?: Record<string, unknown>;
|
||||
};
|
||||
|
||||
@@ -214,6 +217,9 @@ export async function installDevApiMock(page: Page, state: DevApiMockState) {
|
||||
status?: ClientStatus;
|
||||
redirectUris?: string[];
|
||||
scopes?: string[];
|
||||
tokenEndpointAuthMethod?: string;
|
||||
jwksUri?: string;
|
||||
jwks?: Record<string, unknown> | string;
|
||||
metadata?: Record<string, unknown>;
|
||||
}) || { name: "created app" };
|
||||
|
||||
@@ -223,6 +229,9 @@ export async function installDevApiMock(page: Page, state: DevApiMockState) {
|
||||
status: payload.status ?? "active",
|
||||
redirectUris: payload.redirectUris ?? [],
|
||||
scopes: payload.scopes ?? ["openid"],
|
||||
tokenEndpointAuthMethod: payload.tokenEndpointAuthMethod,
|
||||
jwksUri: payload.jwksUri,
|
||||
jwks: payload.jwks,
|
||||
metadata: payload.metadata ?? {},
|
||||
});
|
||||
|
||||
@@ -294,6 +303,9 @@ export async function installDevApiMock(page: Page, state: DevApiMockState) {
|
||||
type?: ClientType;
|
||||
scopes?: string[];
|
||||
redirectUris?: string[];
|
||||
tokenEndpointAuthMethod?: string;
|
||||
jwksUri?: string;
|
||||
jwks?: Record<string, unknown> | string;
|
||||
metadata?: Record<string, unknown>;
|
||||
}) || { name: "updated app" };
|
||||
const found = state.clients.find((client) => client.id === clientId);
|
||||
@@ -302,6 +314,15 @@ export async function installDevApiMock(page: Page, state: DevApiMockState) {
|
||||
if (payload.type) found.type = payload.type;
|
||||
if (payload.scopes) found.scopes = payload.scopes;
|
||||
if (payload.redirectUris) found.redirectUris = payload.redirectUris;
|
||||
if (payload.tokenEndpointAuthMethod !== undefined) {
|
||||
found.tokenEndpointAuthMethod = payload.tokenEndpointAuthMethod;
|
||||
}
|
||||
if (payload.jwksUri !== undefined) {
|
||||
found.jwksUri = payload.jwksUri;
|
||||
}
|
||||
if (payload.jwks !== undefined) {
|
||||
found.jwks = payload.jwks;
|
||||
}
|
||||
if (payload.metadata) found.metadata = payload.metadata;
|
||||
appendAuditLog("CLIENT_UPDATE", "UPDATE_CLIENT", clientId);
|
||||
return json(route, {
|
||||
|
||||
Reference in New Issue
Block a user