Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

OAuth and Authentication Type: Application vs Application User

DZone's Guide to

OAuth and Authentication Type: Application vs Application User

This article explains two options for authentication for resources in the API Cloud: Application and Application User type.

· Integration Zone ·
Free Resource

How to Transform Your Business in the Digital Age: Learn how organizations are re-architecting their integration strategy with data-driven app integration for true digital transformation.

In the 3rd step of editing APIs in WSO2 API Cloud, you can set the required authentication type for each resource:

Image title

We have already covered None as the option to allow invoking APIs without any authentication whatsoever.  Today we will discuss the other options.

The Application type means that the API will require OAuth tokens generated with client grant type. That grant type produces tokens specific to the subscription but not the end-users.

So if there is a web- or mobile application that subscribed to this API and it has multiple end-users, they will all be sharing the same token and the API backend will not “know” which end-user is invoking the API:

The Application User type means that the API accepts OAuth tokens generated with password grant type. These tokens are specific to the end-user – they require not just the application key but also end-user’s username and password.

In this case, each end-user gets their own OAuth tokens even though they are using the same API subscription. The API Gateway then generates a JWT token and uses it to pass application and user information to the API backend:

Application and Application User type means that both kinds of tokens are acceptable by the API.

Build and deploy API integrations 7x faster. Try the Cloud Elements 100% RESTful platform for 30 days free. Access your trial here.

Topics:
integration ,authentication ,oauth

Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}