What's the difference between OpenID and OAuth?

后端 未结 21 750
渐次进展
渐次进展 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:32

    OpenId - Used only for Authentication.

    OAuth - Used for both Authentication and Authorization. Authorization depends on the access_token which comes as part of JWT token. It can have details of user permissions or any useful information.

    Both can rely on 3rd party auth provider which maintains their accounts. For example OKTA identity provider, User provides the credentials on OKTA login page and on successful login the user is redirected on the consumer application with the JWT token in the header.

    0 讨论(0)
  • 2020-11-22 17:34

    OpenId uses OAuth to deal with authentication.

    By analogy, it's like .NET relies on Windows API. You could directly call Windows API but it's so wide, complex and method arguments so vast, you could easily make mistakes/bugs/security issue.

    Same with OpenId/OAuth. OpenId relies on OAuth to manage Authentication but defining a specific Token (Id_token), digital signature and particular flows.

    0 讨论(0)
  • 2020-11-22 17:34

    OAuth builds authentication on top of authorization: The user delegates access to their identity to the application, which, then, becomes a consumer of the identity API, thereby finding out who authorized the client in the first place http://oauth.net/articles/authentication/

    0 讨论(0)
提交回复
热议问题