Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

asp.net webapi UseOAuthBearerAuthentication vs UseJwtBearerAuthentication

can anybody explain me what is the difference between UseOAuthBearerAuthentication and UseJwtBearerAuthentication?

Why should i use 'UseOAuthBearerAuthentication' over 'UseJwtBearerAuthentication' or vice versa?

How can i decide which option will be the best for my system?

Thanks, Szymo

like image 622
Szymon Szczupak Avatar asked May 03 '16 10:05

Szymon Szczupak


Video Answer


1 Answers

UseJwtBearerAuthentication middleware is used when the token is created by an external OAuth2 authorization servers like Identityserver, Auth0. This is a standard token format.

UseOAuthBearerAuthentication middleware is used when the token is created by Katana OAuth2 authorization server. This authorization server uses a proprietary token format.

UseJwtBearerAuthentication middleware is a good option out the two. This middleware uses the token format (JWT) specified in OpenId Connect spec.All the external authorization servers use this token format.

Thank you, Soma.

like image 70
Soma Yarlagadda Avatar answered Oct 19 '22 23:10

Soma Yarlagadda