This article builds on concepts introduced in https://www.devconnectprogram.com/site/global/products_resources/avaya_client_sdk/programming_docs/current/android/communication/tech/working_credentials.gsp
To fully appreciate o-Auth, readers should familiarize themselves with the O-Auth2 RFC rfc6749.
OAuth defines four roles:
resource owner
An entity capable of granting access to a protected resource.
When the resource owner is a person, it is referred to as an
end-user.
resource server
The server hosting the protected resources, capable of accepting
and responding to protected resource requests using access tokens.
client
An application making protected resource requests on behalf of the
resource owner and with its authorization. The term "client" does
not imply any particular implementation characteristics (e.g.,
whether the application executes on a server, a desktop, or other
devices).
authorization server
The server issuing access tokens to the client after successfully
authenticating the resource owner and obtaining authorization.
The interaction between the authorization server and resource server
is beyond the scope of this specification. The authorization server
may be the same server as the resource server or a separate entity.
A single authorization server may issue access tokens accepted by
multiple resource servers.
O-Auth Call Flows
Abstract o-Auth Protocol Flow
+--------+ +---------------+
| |--(A)- Authorization Request ->| Resource |
| | | Owner |
| || Authorization |
| Client | | Server |
| || Resource |
| | | Server |
| |
O-Auth Token types
O-Auth Sessions
Once an O-Auth session is authenticated and authorized, the O-Auth session is independent to the credentials used to establish the O-Auth session. I.E. If as part of establishing the O-Auth session an enterprise password is required, the O-Auth session is not invalidated because the enterprise password becomes expired, or is changed.
O-Auth References
|Doc | Reference | |--|--| |O-Auth2 RFC |https://tools.ietf.org/html/rfc6749 |
The AADS implements an OAuth2 authorization code flow that is customized for our Client SDK clients. In support of this flow, there are three new API endpoints:
While the OAuth2 flow is initiated from the AADS, the AADS itself is not an Identity Provider and instead relies on an embedded third party component called Keycloak for the token management and brokering to an external third party identity provider.
Keycloak is a third party open source component that implements a fully functional Identity Provider (IdP) that also includes support for federation and brokering to external third party IdPs. Keycloak has many capabilities and can thus be used in many different deployment scenarios. For more information see the latest AADS Administration and Provisioning guide.
As the O-Auth service may redirect to a browser page provided by the O-Auth service or any of the services in the Identity Provider flow, the O-Auth and IdP interactions are the responsibility of the Application (not the Client SDK). The Client SDK supports accepting the bearer token in the CredentialChallenge Response (include API link here), and providing the CredentialChallenge feedback (success, response).
O-Auth Solution Call Flow
The flow below starts with the client requesting configuration from AADS, to illustrate the bootstrap flow. Any unauthorized request to AADS can initiate the same redirection flow, and your app is not required to support the AADS configuration service.
The token expiration time is provided to the client in the JWT token. Your application shall set a timer to refresh the token ahead of token expiration, when the token is successfully retrieved from AADS or retrieved from persistent storage. Your client shall persist the first redirect URL from AADS, to facilitate the refresh token.
If supported, the URL to refresh the token is provided to the client in the token payload.If the app has not been launched in a while, the token may be expired.