Skip to content
This repository has been archived by the owner on Oct 14, 2024. It is now read-only.

NOISSUE - Generate Invitation Key #87

Conversation

rodneyosodo
Copy link
Member

What does this do?

This commit adds the functionality to generate an invitation key in the auth service. The invitationKey function is responsible for generating the key and issuing an access token. It sets the key type, expiration time, and subject based on the user's domain. The generated access token is returned as part of the response.

The invitationKey function is called in the Issue function when the key type is InvitationKey. This allows for the generation of invitation keys when needed.

This feature enhances the functionality of the auth service by enabling the generation of invitation keys for user invitations.

Which issue(s) does this PR fix/relate to?

No issue

List any changes that modify/break current functionality

None

Have you included tests for your changes?

Not yet

Did you document any new/modified functionality?

No

Notes

Replacement of #80

@rodneyosodo rodneyosodo force-pushed the 11-27-feat_auth_Add_invitation_key_generation branch 5 times, most recently from a26f92d to 951aa55 Compare November 29, 2023 17:44
This commit adds the functionality to generate an invitation key in the auth service. The `invitationKey` function is responsible for generating the key and issuing an access token. It sets the key type, expiration time, and subject based on the user's domain. The generated access token is returned as part of the response.

The `invitationKey` function is called in the `Issue` function when the key type is InvitationKey. This allows for the generation of invitation keys when needed.

This feature enhances the functionality of the auth service by enabling the generation of invitation keys for user invitations.

Signed-off-by: Rodney Osodo <[email protected]>
The invitation duration in the auth service has been corrected to 7 days (7 * 24 * time.Hour) instead of 24 hours.

Signed-off-by: Rodney Osodo <[email protected]>
@rodneyosodo rodneyosodo force-pushed the 11-27-feat_auth_Add_invitation_key_generation branch from 951aa55 to 41a6832 Compare November 30, 2023 16:39
Copy link

codecov bot commented Nov 30, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

❗ No coverage uploaded for pull request base (main@94c5a36). Click here to learn what that means.

❗ Current head 41a6832 differs from pull request most recent head f9b1529. Consider uploading reports for the commit f9b1529 to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #87   +/-   ##
=======================================
  Coverage        ?   44.06%           
=======================================
  Files           ?       19           
  Lines           ?      817           
  Branches        ?        0           
=======================================
  Hits            ?      360           
  Misses          ?      443           
  Partials        ?       14           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Configure invitation duration by envionment variables. The default is `168h` which is 1 week.
@dborovcanin dborovcanin merged commit 94cfadc into absmach:main Dec 1, 2023
8 of 15 checks passed
@rodneyosodo rodneyosodo deleted the 11-27-feat_auth_Add_invitation_key_generation branch December 12, 2023 17:07
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants