.net - OWIN OAuth Token endpoint wildcard support -
we implementing web api project using base path tenant resolution (i.e. /tenant/api/controller)
we ran problems implementing auth code tenants. have /{tenant}/token enable auth request depending on tenant. can't seem map token endpoint in oauthauthorizationserveroptions.
any pointers how should proceed welcome.
the oauth2 mw has event called onmatchendpoint yuo can determine if incoming request authorize request or token request. it's meant exact type of check.
something this:
var authsvr = new oauthauthorizationserveroptions { allowinsecurehttp = true, authenticationmode = microsoft.owin.security.authenticationmode.passive, //authorizeendpointpath = new pathstring("/authorize"), provider = new oauthauthorizationserverprovider { onmatchendpoint = async ctx => { if (ctx.request.uri.localpath == "/authorize") { ctx.matchesauthorizeendpoint(); } },
except in yours you'd more dynamic checking ctx.request.uri.localpath
tenant.
Comments
Post a Comment