azure - Custom "generic" OAuth 2.0 Bearer Authentication to secure a Web API -


i'm using usewindowsazureactivedirectorybearerauthentication secure web api. fine @ moment test environments use azure ad identity.

however, production environment use different auth provider (oauth 2 compliant).

what i'm looking convert following azure ad specific code:

app.usewindowsazureactivedirectorybearerauthentication(                 new windowsazureactivedirectorybearerauthenticationoptions                 {                     audience = configurationmanager.appsettings["ida:audience"],                     tenant = configurationmanager.appsettings["ida:tenant"]                 }); 

to more generic still work azure ad moment easy configure different auth provider in future. example:

app.useoauthbearerauthentication             (                 new oauthbearerauthenticationoptions()                 {                     //...                 }             ); 

how can latter implemented work azure ad , "generic" enough other oauth 2 compliant providers?

oauth2 doesn't define format access tokens. azure ad uses jwt, , advertises coordinates through various metadata documents, there no guarantee other providers same (and in fact not of time). spec not detailed enough allow such generic component.


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -