-
Notifications
You must be signed in to change notification settings - Fork 111
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
Is it possible to use Authn as a library in any Go project? #179
Comments
Hi @frederikhors,
When you use one of the backend integration libraries, your application will automatically cache the public keys necessary to validate a token. They will only need one API call an hour, maybe, as keys rotate. It may be possible to run AuthN as a library, but I'm not sure what would distinguish AuthN vs any other in-process solution. The process isolation is the main benefit. |
How? Is there any docs?
There are no good in-process libraries for Go. |
Wow, I didn't realize that. What's your take on the Authboss library you linked originally? There aren't any docs for using AuthN as a library, and I haven't thought through the scenario enough to write them on the spot. However, I think you'll find the code is organized in a way that lets you reference the internals using standard Go import paths. You might look at importing the routing table, or the services used to implement business logic for HTTP handlers. Note that this would be a DIY path. I don't plan to officially support it, because the tradeoff in the security model doesn't appear to be worth optimizing away the API traffic that exists. |
Problems, like this.
Ok. Thanks. |
It would be amazing to use Authn as a library in any Go project (like does https://github.com/volatiletech/authboss), without the need to call another service on each API call.
Is this already possible?
The text was updated successfully, but these errors were encountered: