Replies: 10 comments 14 replies
-
Thank You for sharing your example @tyzhnenko! I would like to add an example to the These days I am still focused on the implementation of a |
Beta Was this translation helpful? Give feedback.
-
I noticed that the imports are missing.
As well there appear to be some missing classes/functions:
Here are the dependencies that I have:
Can you help fix this? |
Beta Was this translation helpful? Give feedback.
-
Great, thank you. I think that I'm only down to two issues: I suspect that the change in library locations could be due to library versions, I'm trying to use 2.0a11. |
Beta Was this translation helpful? Give feedback.
-
Do you know if UUIDJSONEncode is part of BlackSheep v.1 or found somewhere else?
Thanks |
Beta Was this translation helpful? Give feedback.
-
I've added the bare minimum for these functions (seen below) to try to test this out, but I do not seem to be able to.
Assuming that I have all of this in a file named security.py I have this code to start the server:
The server starts, but when I go to http://127.0.0.1:8000 I get a message Do I need to complete all the methods and objects before I can test this out? |
Beta Was this translation helpful? Give feedback.
-
Yes that does it, thank you @tyzhnenko once again |
Beta Was this translation helpful? Give feedback.
-
I'll try to keep that in mind. I have this:
When I go to /api/message I get a 401, which is what I would expect. I see this code block:
In the OpenAPI view for this endpoint (/token), when I try it, I'm not prompted for any parameters in any way. |
Beta Was this translation helpful? Give feedback.
-
By changing |
Beta Was this translation helpful? Give feedback.
-
@tyzhnenko what data do I need to send to |
Beta Was this translation helpful? Give feedback.
-
Solved one problem: the refresh token issue. |
Beta Was this translation helpful? Give feedback.
-
For small projects developers sometimes want a simple way to provide auth endpoint to login users. I guess it makes sense to provide a package/module with simple user/password auth due to BlackSheep supporting auth only via external providers.
updated: add AppAuthProvider implementation
updated 2: add import, UUIDJSONEncode, BearerAuthentication implementation
Posible implementation here:
Beta Was this translation helpful? Give feedback.
All reactions