mirror of
https://github.com/elyby/accounts-frontend.git
synced 2025-02-09 18:35:39 +05:30
Resolves #41. Add support for code_challenge
param
This commit is contained in:
parent
fdef4a33bf
commit
beb3927f78
@ -44,6 +44,8 @@ export interface OauthAuthCodeFlowParams {
|
|||||||
responseType: string;
|
responseType: string;
|
||||||
state: string;
|
state: string;
|
||||||
scope: string;
|
scope: string;
|
||||||
|
code_challenge?: string;
|
||||||
|
code_challenge_method?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface OauthDeviceCodeFlowParams {
|
export interface OauthDeviceCodeFlowParams {
|
||||||
|
@ -30,6 +30,8 @@ describe('OAuthState', () => {
|
|||||||
response_type: 'response_type',
|
response_type: 'response_type',
|
||||||
description: 'description',
|
description: 'description',
|
||||||
scope: 'scope1 scope2',
|
scope: 'scope1 scope2',
|
||||||
|
code_challenge: 'code_challenge',
|
||||||
|
code_challenge_method: 'S256',
|
||||||
prompt: 'none',
|
prompt: 'none',
|
||||||
login_hint: '1',
|
login_hint: '1',
|
||||||
state: 'state',
|
state: 'state',
|
||||||
@ -50,6 +52,8 @@ describe('OAuthState', () => {
|
|||||||
responseType: query.response_type,
|
responseType: query.response_type,
|
||||||
scope: query.scope,
|
scope: query.scope,
|
||||||
state: query.state,
|
state: query.state,
|
||||||
|
code_challenge: query.code_challenge,
|
||||||
|
code_challenge_method: query.code_challenge_method,
|
||||||
},
|
},
|
||||||
description: query.description,
|
description: query.description,
|
||||||
prompt: query.prompt,
|
prompt: query.prompt,
|
||||||
|
@ -14,6 +14,8 @@ export default class InitOAuthAuthCodeFlowState extends AbstractState {
|
|||||||
responseType: query.get('response_type')!,
|
responseType: query.get('response_type')!,
|
||||||
scope: (query.get('scope') || '').replace(/,/g, ' '),
|
scope: (query.get('scope') || '').replace(/,/g, ' '),
|
||||||
state: query.get('state')!,
|
state: query.get('state')!,
|
||||||
|
code_challenge: query.get('code_challenge') || undefined,
|
||||||
|
code_challenge_method: query.get('code_challenge_method') || undefined,
|
||||||
},
|
},
|
||||||
description: query.get('description')!,
|
description: query.get('description')!,
|
||||||
prompt: query.get('prompt')!,
|
prompt: query.get('prompt')!,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user