What's the difference between OpenID and OAuth?

后端 未结 21 729
渐次进展
渐次进展 2020-11-22 16:56

I\'m really trying to understand the difference between OpenID and OAuth? Maybe they\'re two totally separate things?

21条回答
  •  伪装坚强ぢ
    2020-11-22 17:09

    • OpenID is an open standard and decentralized authentication protocol controlled by the OpenID Foundation.
    • OAuth is an open standard for access delegation.
    • OpenID Connect (OIDC) Combines the features of OpenID and OAuth i.e. does both Authentication and Authorization.

    OpenID take the form of a unique URI managed by some "OpenID provider" i.e identity provider (idP).

    OAuth can be used in conjunction with XACML where OAuth is used for ownership consent and access delegation whereas XACML is used to define the authorization policies.

    OIDC uses simple JSON Web Tokens (JWT), which you can obtain using flows conforming to the OAuth 2.0 specifications. OAuth is directly related to OIDC since OIDC is an authentication layer built on top of OAuth 2.0.

    For example, if you chose to sign in to Auth0 using your Google account then you used OIDC. Once you successfully authenticate with Google and authorize Auth0 to access your information, Google will send back to Auth0 information about the user and the authentication performed. This information is returned in a JSON Web Token (JWT). You'll receive an Access Token and, if requested, an ID Token. Types of Token : Source: OpenID Connect

    Analogy:
    An organisation use ID card for identification purpose and it contains chips, it stores details about Employee along with Authorization i.e. Campus/Gate/ODC access. ID card act as a OIDC and Chip act as a OAuth. more examples and form wiki

提交回复
热议问题