BtrzAuth v0.10.1 API Reference
Modules
BtrzAuth is the authentication api for the Betterez Elixir APIs
This pipeline will check the x-api-key header is sent and load the implemented resource in conn.private[:application]
This pipeline will check the x-api-key header and also the token with the private key or the configured main and secondary secret keys in case the token could be an internal one, then ensure authenticated and load the implemented resource in conn.private[:application]
Looks for and validates a token found in the x-api-key
header requesting the accounts service to verify the token and saving the resource in conn.private[:application]
Looks for and validates that the passed keys
features are present in the saved claims under conn.private
using BtrzAuth.Guardian.Plug.current_claims(conn)
It depends on BtrzAuth.Plug.VerifyApiKey
, looks for a token in the Authorization
header and verify it using first the account’s private key, if not valid, then main and secondary secrets provided by your app for internal token cases
InternalTokenToken will generate tokens for internal services authentication
UserToken will generate tokens for users authentication