generated from cfpb/open-source-project-template
-
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.
- Loading branch information
Showing
5 changed files
with
2 additions
and
10 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 |
---|---|---|
|
@@ -29,7 +29,7 @@ poetry run pytest | |
|
||
## API | ||
The API endpoints require authentication to access. The service uses the [regtech-api-commons](https://github.com/cfpb/regtech-api-commons) library to utilize OAuth2 authentication, currently using Keycloak. | ||
To use either endpoint, you must first get an access token from Keycloak. The service will then use the name and email attributes from the token to populate the Sender field in the email. | ||
To use either endpoint, you must first get an access token from Keycloak. The Contact Name and Email, derived from the Access Token, will be put into the body of the email. | ||
|
||
To get an access token, run the following curl command, using the Keycloak user you wish to test with (see [LOCAL_DEV_COMPOSE](https://github.com/cfpb/sbl-project/blob/main/LOCAL_DEV_COMPOSE.md) for launching Keycloak): | ||
|
||
|
@@ -70,7 +70,6 @@ http://localhost:8765/send | jq '.' | |
"subject": "Institution Profile Change", | ||
"body": "lei: 1234567890ABCDEFGHIJ\ninstitution_name_1: Fintech 1\ntin_1: 12-3456789\nrssd_1: 1234567", | ||
"from_addr": "[email protected]", | ||
"sender": "<Keycloak user> <<Keycloak email>>", | ||
"to": [ | ||
"[email protected]" | ||
], | ||
|
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 |
---|---|---|
|
@@ -67,7 +67,6 @@ def test_authed_endpoints( | |
"subject": "Institution Profile Change", | ||
"body": "lei: 1234567890ABCDEFGHIJ\ninstitution_name_1: Fintech 1\ntin_1: 12-3456789\nrssd_1: 1234567", | ||
"from_addr": "[email protected]", | ||
"sender": "Jane Doe <[email protected]>", | ||
"to": ["[email protected]"], | ||
"cc": None, | ||
"bcc": None, | ||
|
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 |
---|---|---|
|
@@ -60,7 +60,6 @@ def test_send_no_profile( | |
"subject": "[DEV BETA] SBL User Request for Institution Profile Change", | ||
"body": "Contact Email: [email protected]\nContact Name: \n\nlei: 1234567890ABCDEFGHIJ\ninstitution_name_1: Fintech 1\ntin_1: 12-3456789\nrssd_1: 1234567", | ||
"from_addr": "[email protected]", | ||
"sender": "[email protected]", | ||
"to": ["[email protected]"], | ||
"cc": None, | ||
"bcc": None, | ||
|
@@ -91,7 +90,6 @@ def test_send( | |
"subject": "[DEV BETA] SBL User Request for Institution Profile Change", | ||
"body": "Contact Email: [email protected]\nContact Name: Test User\n\nlei: 1234567890ABCDEFGHIJ\ninstitution_name_1: Fintech 1\ntin_1: 12-3456789\nrssd_1: 1234567", | ||
"from_addr": "[email protected]", | ||
"sender": "Test User <[email protected]>", | ||
"to": ["[email protected]"], | ||
"cc": None, | ||
"bcc": None, | ||
|