OAuth 2 - MacKittipat/note-developer GitHub Wiki

OAuth 2

  • Authorization Framework or Open standard for Authorization.
  • Delegation protocol, letting someone who controls a resource allow a software application to access that resource on their behalf without impersonating them.
  • OAuth enables clients ( third party applications ) to have scoped access to protected resource on resource owner’s behalf without knowing or storing resource owner’s (end-user’s) credentials.
  • Let one app access your data in another app without giving your password.

Authentication vs Authorization

  • Authentication : Process of validating that users are whom they claim to be.
  • Authorization : Process of giving the user permission to access a specific resource or function.

Actors

  • Resource Owner
  • Client (Application)
  • Resource Server
  • Authorization Server

Token Type

  • Access Token
    • Uses to access the Resource Server.
    • Meant to be short-lived
  • Refresh Token
    • Use for get a new access token

Token Format

OAuth Flow

Reference

Sample implementation