Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SIMPLYE-218 Passkey endpoints #18

Merged
merged 4 commits into from
Feb 27, 2024
Merged

SIMPLYE-218 Passkey endpoints #18

merged 4 commits into from
Feb 27, 2024

Conversation

jompu
Copy link
Contributor

@jompu jompu commented Feb 25, 2024

Description

Added endpoints to call "/passkey/register" endpoints at ekirjasto API on behalf of the enduser. Implementation was done so that it is easy to add more similar endpoints later.

Motivation and Context

The mobile client doesn't have ekirjasto token in usable form, "/passkey/register" endpoints requires those to authenticate requests.

See more at issue: SIMPLYE-218

How Has This Been Tested?

  • New unit tests for ekirjasto authentication were created. And tested manually with curl command.

Checklist

  • I have updated the documentation accordingly.
  • All new and existing tests passed.

@jompu jompu requested review from attemoi and Kaappihullu February 25, 2024 21:39
@jompu jompu removed the request for review from Kaappihullu February 26, 2024 06:22
@jompu jompu marked this pull request as ready for review February 26, 2024 06:39
@jompu jompu changed the title Passkey endpoints SIMPLYE-218 Passkey endpoints Feb 26, 2024
@attemoi attemoi requested a review from ttuovinen February 26, 2024 12:43
authorization is None
or authorization.token is None
or len(authorization.token) == 0
):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be just if not authorization or not authorization.token:

) = self.get_tokens(request.authorization)
if isinstance(delegate_token, ProblemDetail):
return delegate_token
elif delegate_token == None:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could be elif not delegate_token, also handling empty string.

Copy link
Contributor

@attemoi attemoi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a couple small suggestions, otherwise looks good.

@jompu jompu merged commit 2de18b4 into main Feb 27, 2024
19 checks passed
@jompu jompu deleted the passkey-endpoints branch February 29, 2024 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants