pkce
- pkce
- ~getHashForCodeChallenge(method, verifier) ⇒
String|undefined - ~codeChallengeMatchesABNF(codeChallenge) ⇒
Boolean - ~isPKCERequest(grantType, codeVerifier) ⇒
boolean - ~isValidMethod(method) ⇒
boolean
- ~getHashForCodeChallenge(method, verifier) ⇒
pkce~getHashForCodeChallenge(method, verifier) ⇒ String | undefined
Return hash for code-challenge method-type.
Kind: inner method of pkce
| Param | Type | Description |
|---|---|---|
| method | String | the code challenge method |
| verifier | String | the code_verifier |
pkce~codeChallengeMatchesABNF(codeChallenge) ⇒ Boolean
Matches a code verifier (or code challenge) against the following criteria:
code-verifier = 43*128unreserved unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~" ALPHA = %x41-5A / %x61-7A DIGIT = %x30-39
Kind: inner method of pkce
See:: https://datatracker.ietf.org/doc/html/rfc7636#section-4.1
| Param | Type |
|---|---|
| codeChallenge | String |
pkce~isPKCERequest(grantType, codeVerifier) ⇒ boolean
Check if the request is a PCKE request. We assume PKCE if grant type is 'authorization_code' and code verifier is present.
Kind: inner method of pkce
| Param | Type |
|---|---|
| grantType | String |
| codeVerifier | String |
pkce~isValidMethod(method) ⇒ boolean
Checks if the code challenge method is one of the supported methods 'sha256' or 'plain'
Kind: inner method of pkce
| Param | Type |
|---|---|
| method | String |