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
Post a Comment