.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

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -