generated from ghga-de/microservice-repository-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Show token when running dev launcher (#20)
- Loading branch information
Showing
8 changed files
with
347 additions
and
604 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
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
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
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 |
---|---|---|
|
@@ -50,14 +50,12 @@ | |
"email": "[email protected]", | ||
"title": "Dr.", | ||
"id": "[email protected]", | ||
"status": "active", | ||
} | ||
|
||
AUTH_CLAIMS_STEWARD = { | ||
"name": "Rod Steward", | ||
"email": "[email protected]", | ||
"id": "[email protected]", | ||
"status": "active", | ||
"role": "[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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,14 +16,29 @@ | |
|
||
"""Generate signing keys for testing""" | ||
|
||
from ghga_service_commons.utils.jwt_helpers import generate_jwk | ||
from ghga_service_commons.utils.jwt_helpers import ( | ||
generate_jwk, | ||
sign_and_serialize_token, | ||
) | ||
|
||
ARS_AUTH_KEY = generate_jwk().export(private_key=False) | ||
AUTH_CLAIMS_STEWARD = { | ||
"name": "Rod Steward", | ||
"email": "[email protected]", | ||
"id": "[email protected]", | ||
"role": "[email protected]", | ||
} | ||
|
||
AUTH_KEY_PAIR = generate_jwk() | ||
|
||
ARS_AUTH_KEY = AUTH_KEY_PAIR.export(private_key=False) | ||
|
||
TOKEN = sign_and_serialize_token(AUTH_CLAIMS_STEWARD, AUTH_KEY_PAIR) | ||
|
||
|
||
def print_auth_key_env() -> None: | ||
"""Print environment setting for the auth key.""" | ||
print(f"{ARS_AUTH_KEY=!r}") | ||
print("echo Bearer token:", TOKEN) | ||
|
||
|
||
if __name__ == "__main__": | ||
|