@startuml oauth2-flow.png

/'
    CCPL HEADER START
   
    This work is licensed under the Creative Commons
    Attribution-NonCommercial-NoDerivs 3.0 Unported License.
    To view a copy of this license, visit
    http://creativecommons.org/licenses/by-nc-nd/3.0/
    or send a letter to Creative Commons, 444 Castro Street,
    Suite 900, Mountain View, California, 94041, USA.
   
    You can also obtain a copy of the license at
    src/main/resources/legal-notices/CC-BY-NC-ND.txt.
    See the License for the specific language governing permissions
    and limitations under the License.
   
    If applicable, add the following below this CCPL HEADER, with the fields
    enclosed by brackets "[]" replaced with your own identifying information:
         Portions Copyright [yyyy] [name of copyright owner]
   
    CCPL HEADER END
   
         Copyright 2012 ForgeRock AS

    To generate a sequence diagram from this file, process
    it with PlantUML, http://plantuml.sourceforge.net/sequence.html
'/

title OAuth 2.0 Protocol Flow
autonumber

participant "Resource Owner" as Owner
participant "Client\nsuch as OpenAM" as Client
participant "Authorization Server\nsuch as OpenAM" as AuthzServer
participant "Resource Server" as ResourceServer

Client->Owner: Authorization request

Owner->Client: Authorization grant

Client->AuthzServer: Authorization grant

AuthzServer->Client: Access token

Client->ResourceServer: Access token

ResourceServer->Client: Protected resource
@enduml