Open AUTHorization : autorisation ouverte/libre.
Autoriser un accès HTTP à ses ressources par une partie tierce, sans donner ses identifiants (credentials).
OAuth vise à :
OAuth 1.x ajoute un 3ᵉ rôle à l'architecture client /serveur :
Il définit 2 processus :
sequenceDiagram
Title OAuth 1.x worfklow
Actor Resource Owner
Resource Owner->>Server: signup (username, password)
Resource Owner->>Server: upload (resource)
Client->>Server: signup (clientId, clientSharedSecret)
Resource Owner->>Client: useMyResourceFrom (Server)
Client->>Server: initiate (realm,clientId,callback,hmacSha1Signature)
Server-->>Client: oauth_token,oauth_token_secret
Client-->>Resource Owner: redirectTo (server/authorize?oauth_token)
Resource Owner->>Server: authorize (oauth_token)
Server-->>Resource Owner: 401 need to sign
Resource Owner->>Server: signin (username, password)
Server-->>Resource Owner: Ok to share resource to Client?
Resource Owner->>Server: yes
Server-->>Resource Owner: redirect?client/ready?oauth_token&oauth_verifier
Resource Owner->>Client: ready(oauth_token,oauth_verifier)
Client->>Server: token(consumer_key,oauth_token,oauth_verifier,signature)
Server-->>Client: ok(oauth_token,oauth_token_secret)
Client->>Server: getResource(realm,consumer_key,oauth_token,signature)
Server-->>Client: resource
On voit donc qu'il existe 3 types d'identifiants (credentials) dans OAuth :
Stabilisé , revisé (révision A).