This repository has been archived by the owner on Apr 3, 2019. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(pkce): add PKCE support to the oauth server (#466) r=seanmonstar
- Loading branch information
Showing
20 changed files
with
656 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Firefox Accounts OAuth - PKCE Support | ||
|
||
> Proof Key for Code Exchange by OAuth Public Clients | ||
Firefox Accounts OAuth flow supports the [PKCE RFC7636](https://tools.ietf.org/html/rfc7636). | ||
This feature helps us authenticate clients such as WebExtensions and Native apps. | ||
Clients that do not have a server component or a secure way to store a `client_secret`. | ||
|
||
To better understand this protocol please read the [Proof Key for Code Exchange (RFC 7636) by Authlete Inc.](https://www.authlete.com/documents/article/pkce/index). | ||
|
||
Please see the [API](API.md) documentation that explains the support parameters - `code_challenge_method`, `code_challenge` and `code_verifier`. | ||
|
||
At this time Firefox Accounts requires you to use the `S256` flow, we do not support the `plain` code challenge method. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
-- Add `publicClient` column to the `clients` table. | ||
ALTER TABLE clients ADD COLUMN publicClient BOOLEAN DEFAULT FALSE NOT NULL AFTER canGrant; | ||
UPDATE clients SET publicClient=false; | ||
|
||
-- Add `codeChallengeMethod` and `codeChallenge` column to the `codes` table. | ||
ALTER TABLE codes | ||
ADD COLUMN codeChallengeMethod VARCHAR(256) AFTER offline, | ||
ADD COLUMN codeChallenge VARCHAR(256) AFTER codeChallengeMethod, | ||
ALGORITHM = INPLACE, LOCK = NONE; | ||
|
||
UPDATE dbMetadata SET value = '18' WHERE name = 'schema-patch-level'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
-- Drop `publicClient` column from the `clients` table. | ||
|
||
-- ALTER TABLE clients DROP COLUMN publicClient, | ||
-- ALGORITHM = INPLACE, LOCK = NONE; | ||
|
||
-- Drop `codeChallengeMethod` and `codeChallenge` column from the `codes` table. | ||
|
||
-- ALTER TABLE codes DROP COLUMN codeChallengeMethod, | ||
-- ALGORITHM = INPLACE, LOCK = NONE; | ||
|
||
-- ALTER TABLE codes DROP COLUMN codeChallenge, | ||
-- ALGORITHM = INPLACE, LOCK = NONE; | ||
|
||
-- UPDATE dbMetadata SET value = '17' WHERE name = 'schema-patch-level'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.