Authorize service-to-service calls and report every request from Phoenix or any Plug app. Add end_point_blank_elixir from Hex and two plugs.
Published on Hex.
# mix.exs
{:end_point_blank_elixir, "~> 0.12"}
Use the client ID and secret of an application environment you created in EndPointBlank.
EndPointBlank.configure(
client_id: System.fetch_env!("ENDPOINTBLANK_CLIENT_ID"),
client_secret: System.fetch_env!("ENDPOINTBLANK_CLIENT_SECRET"),
app_name: "orders-service",
environment: "production"
)
# lib/my_app_web/endpoint.ex
plug EndPointBlank.Plug.ReportInteraction
plug MyAppWeb.Router
Configure it in your application's start/2, before the endpoint starts. The ReportInteraction plug then reports every request and response.
pipeline :api do
plug :accepts, ["json"]
plug EndPointBlank.Plug.Authorized
end
Authorized checks every request in the pipeline against your grants before it reaches a controller.
The README covers every setting: masking rules, the authorization cache, authorizing outbound calls and the management API client. The quickstart walks through creating the application and credentials this page assumes.
Deprecate and retire versions without breaking customers.
Scoped, rotatable credentials for service-to-service calls.
Every call between services, searchable and reassembled.
Know which client is failing, before they tell you.
Invite client organizations and grant them API packages.
Sign up in under a minute. No credit card, no sales call.