-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor Configuration & Authentication Unit Tests (#8)
* #7 major refactor of authorization and token verification * #7 token verification unit tests * #7 cleaning up so that a bunch of stuff is placed inside the encrypted credentials. * #7 updated the README to include information about the secrets that are expected for DEVELOPMENT & PRODUCTION environments.
- Loading branch information
Showing
18 changed files
with
498 additions
and
105 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
[*] | ||
charset=utf-8 | ||
end_of_line=lf | ||
insert_final_newline=true | ||
indent_style=space | ||
indent_size=2 | ||
|
||
[*.scss] | ||
indent_style=space | ||
indent_size=2 | ||
|
||
[{*.yml,*.yaml}] | ||
indent_style=space | ||
indent_size=2 | ||
|
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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1 +1 @@ | ||
HhizsWaU5RfbC43XVL+XCPoBH6VisLZSWKms1RT9BjeIeapwPJ5rYUNyqOw6evT1z+b0+epXTACuz6rjy5LkRm6imxd/kd7CE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Ngq4UoULDyS83hcECl0mYz3gQIeLDPXlIXbPjZZ+ZsVZ3Itj2zOT2VQM4j5LRHD547xeNTyTp3QP2/PSa3M9zZQJHiWOGeFGs0f040IlIXa0WoKB7jmQDQxkzNDYt3zjSgIOmflteCZnNAlMMRgmgOP8BYagjxfQhV+PX8/tAuefng8McxewjszBXjHguvGsbDHgiadBwTmLL54iCUDY9ODjEt7bYWXnRD9whtG/Jz4jXREQM8Y0/rMvJXF8NB+F5NeLKTl0U+MRdNE1/TwmHwfUsNnw1p5hofcBUBGAgMWLTE8kWQxPni+Jyd87/EwvS6ZhSoeWJGFJ5HeQgAJ9T6tLT6fm2nGTqWV25mWOrAs7tQ5dilrNhHEk5S7l/rGI/82jCY95hNUuaKGr3tN/oxENU/gYA4Nz4v3Yh1JoGKyc29Y/qxHgHWA7T9nOXT72I7IDXlslfq2F51pQyZaRd3p/kLBvqx6LUKHB1uzebUY2ehXSglnu6r29op9mil8ooS1PGMv9WFXVvD+Xi5kUXFAWHEGUAuZirqmqZA0cLdd7+XJ6xnulCDGZcECarxtvqEKxDLYlZZ/pwy22iNAebHZUeEb7ZeQC/T5nrzli1IEtJtCwI7RbIa4/ZE5M=--AbM22LPCmnqIhi2V--ia58uQ89MN6sPuhNkrBfKQ== |
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,14 @@ | ||
# frozen_string_literal: true | ||
|
||
Ermahgerd.configure do |config| | ||
if Rails.env.test? | ||
# Cognito Token Verification Configuration | ||
# ------------------------------------------------------------------------------------------------------------------ | ||
|
||
# The id token's audience | ||
config.token_aud = 'ermahgerd' | ||
|
||
# The id token's issuer | ||
config.token_iss = 'https://cognito-idp.ca-central-1.amazonaws.com/ca-central-1_exampleXyZ' | ||
end | ||
end |
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 |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
User.seed_once( | ||
:email, | ||
{ | ||
email: '[email protected]', | ||
email: 'dan.nelson@cybertooth.io', | ||
first_name: 'Dan', | ||
last_name: 'Nelson', | ||
nickname: 'Hollywood', | ||
|
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 |
---|---|---|
@@ -1,8 +1,14 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'ermahgerd/authorizer' | ||
require 'ermahgerd/configuration' | ||
require 'ermahgerd/current_user' | ||
require 'ermahgerd/errors' | ||
|
||
# The Ermahgerd module has a bunch of constants and configuration elements found within. | ||
# There are also a number of very reusable concerns and classes that can be used throughout this project, or | ||
# copied into another project. | ||
module Ermahgerd | ||
HEADER_AUTHORIZATION = 'Authorization' | ||
HEADER_IDENTIFICATION = 'Identification' | ||
end |
Oops, something went wrong.