The OAuth 2.0 authorization framework enables a third-party application to obtain limited access to an HTTP service, either on behalf of a resource owner by orchestrating an approval interaction between the resource owner and the HTTP service, or by allowing the third-party application to obtain access on its own behalf.
+----------+
| Resource |
| Owner |
| |
+----------+
^
|
(B)
+----|-----+ Client Identifier +---------------+
| -+----(A)-- & Redirection URI ---->| |
| User- | | Authorization |
| Agent -+----(B)-- User authenticates --->| Server |
| | | |
| -+----(C)-- Authorization Code ---<| |
+-|----|---+ +---------------+
| | ^ v
(A) (C) | |
| | | |
^ v | |
+---------+ | |
| |>---(D)-- Authorization Code ---------' |
| | & Redirection URI |
| | |
| |<---(E)----- Access Token -------------------'
| | (w/ Optional Refresh Token)
| Client |
| |
| | +---------------+
| |--(F)------ Access Token -------> | Resource |
| | | Server |
| |<-(G)---- Protected Resource ---- | |
+---------+ +---------------+
Send:
Receive(From Callback):
Request:
Response:
Request:
Response:
Reference: