add oauth app connected
This commit is contained in:
@@ -62,6 +62,20 @@ export function normalizeAuthorizeQuery(query: Record<string, unknown>): Normali
|
||||
};
|
||||
}
|
||||
|
||||
export function normalizeConsentQuery(query: Record<string, unknown>) {
|
||||
const clientId = readString(query.clientId) ?? readString(query.client_id);
|
||||
const scope = readString(query.scope) ?? 'openid profile';
|
||||
const redirectUri = readString(query.redirectUri) ?? readString(query.redirect_uri);
|
||||
const state = readString(query.state);
|
||||
const nonce = readString(query.nonce);
|
||||
|
||||
if (!clientId) {
|
||||
throw new BadRequestException('Укажите client_id');
|
||||
}
|
||||
|
||||
return { clientId, scope, redirectUri, state, nonce };
|
||||
}
|
||||
|
||||
export function normalizeTokenBody(body: Record<string, unknown>): NormalizedTokenBody {
|
||||
const grantType = readString(body.grantType) ?? readString(body.grant_type);
|
||||
const clientId = readString(body.clientId) ?? readString(body.client_id);
|
||||
|
||||
Reference in New Issue
Block a user