Authentication
Authentication establishes which of your customers an agent represents. Your API relies on knowing who it is serving before it shares personal information, acts on an account or applies the permissions a customer holds, and authentication provides that same certainty for requests made by agents as it has for customers who use your website or app directly.
It is configured once for your business, as part of your integration in the Mitu dashboard, and applies to every agent that connects. You decide which tools require a customer and which are open to anyone, so public information stays freely available while anything personal remains protected.
Authentication methods
Customer keys are always available alongside the other methods, so you can offer OAuth to most customers and issue keys to those who need a credential of their own. When choosing, start from how your customers already reach you.
- Customers already have accounts with you
Use OAuth. Customers connect their agents by signing in exactly as they do today, there is nothing new to issue or manage, and your existing account controls continue to apply to every request their agents make. - You provision access yourself
Use customer keys. You create each customer through the API and deliver their key, which suits business customers, partners and products without a consumer sign in. - Some capabilities are public
Leave those tools open with no sign in, and require a customer only on the tools that read or change an account.
What reaches your API
Every request made on a customer’s behalf arrives with the customer’s Mitu identifier and the reference you hold for them in your own system, so your API can locate the right account without any lookup of its own. When the customer signed in with OAuth, the request also carries the access token your identity provider issued, which your API validates exactly as it would for any other client.
Three checks then apply, each answering a different question.
- Is the request genuine?
Verify the request to confirm it came through Mitu and has not been altered or replayed. Do this before relying on anything it carries. - Who is the customer?
Authentication answers this, through the customer details and, with OAuth, the customer’s own token. - What may the customer do?
Your existing authorisation rules decide, exactly as they do for requests from your own applications.
Authentication therefore adds no new permission model to your business. It extends the identity your customers already have with you to the agents that act for them, so every request is attributed to a real customer and governed by the rules you already enforce.