|
7 | 7 | * [new AuthorizationCodeGrantType(options)](#new_AuthorizationCodeGrantType_new) |
8 | 8 | * [.handle(request, client)](#AuthorizationCodeGrantType+handle) |
9 | 9 | * [.getAuthorizationCode(request, client)](#AuthorizationCodeGrantType+getAuthorizationCode) ⇒ <code>Promise.<{user}></code> |
| 10 | + * [.verifyPKCE(request, code)](#AuthorizationCodeGrantType+verifyPKCE) |
10 | 11 | * [.validateRedirectUri(request, code)](#AuthorizationCodeGrantType+validateRedirectUri) |
11 | 12 | * [.revokeAuthorizationCode(code)](#AuthorizationCodeGrantType+revokeAuthorizationCode) |
12 | 13 | * [.saveToken(user, client, authorizationCode, requestedScope)](#AuthorizationCodeGrantType+saveToken) |
@@ -44,6 +45,23 @@ Get the authorization code. |
44 | 45 | | request | <code>Request</code> | |
45 | 46 | | client | <code>ClientData</code> | |
46 | 47 |
|
| 48 | +<a name="AuthorizationCodeGrantType+verifyPKCE"></a> |
| 49 | + |
| 50 | +### authorizationCodeGrantType.verifyPKCE(request, code) |
| 51 | +Verify PKCE code_verifier against the stored code_challenge. |
| 52 | + |
| 53 | +This is called from handle() AFTER the authorization code has been |
| 54 | +revoked, so that a failed verification attempt consumes the code |
| 55 | +and prevents online brute-force guessing. |
| 56 | + |
| 57 | +**Kind**: instance method of [<code>AuthorizationCodeGrantType</code>](#AuthorizationCodeGrantType) |
| 58 | +**See**: https://datatracker.ietf.org/doc/html/rfc7636#section-4.6 |
| 59 | + |
| 60 | +| Param | Type | |
| 61 | +| --- | --- | |
| 62 | +| request | <code>Request</code> | |
| 63 | +| code | <code>AuthorizationCodeData</code> | |
| 64 | + |
47 | 65 | <a name="AuthorizationCodeGrantType+validateRedirectUri"></a> |
48 | 66 |
|
49 | 67 | ### authorizationCodeGrantType.validateRedirectUri(request, code) |
|
0 commit comments