IdentityServer4 icon indicating copy to clipboard operation
IdentityServer4 copied to clipboard

How to customize the route path?

Open atpyk opened this issue 9 years ago • 13 comments

I don't want to expose the default route path like "connect/token". Does it have any way to change it when inject the IdentityServer. If no, do you guys plan to support this extension feature in future?

atpyk avatar Dec 16 '16 03:12 atpyk

What do you want to expose instead and why?

leastprivilege avatar Dec 16 '16 04:12 leastprivilege

I prefer to use other route path for my project, I hope it would be customized, like "/oauth2/token".

atpyk avatar Dec 16 '16 05:12 atpyk

no. not right now. and no plans either.

It is not that a human needs to type them - only machines.

leastprivilege avatar Dec 16 '16 05:12 leastprivilege

Okay, thanks for your feedback.

atpyk avatar Dec 16 '16 08:12 atpyk

To be honest, our case is, we have lots of sub systems need to do authentication via accessing an original authentication service that expose the route path is "/oauth2/token". For now, we want to use identityserver4 instead, meanwhile we don't want to change the original contracts, we'd like to customize the route path of IdentityServer to adapt our contracts. That's the context.

atpyk avatar Dec 16 '16 08:12 atpyk

Understood. But we don't allow that right now. It is a bit more complex than it sounds.

The right way would be to get the real token endpoint from the discovery endpoint.

leastprivilege avatar Dec 16 '16 09:12 leastprivilege

I've went through the IdentityServer code. It seems like all the Endpoints those are depend on the enum "EndpointName", not const strings, and actually, you transfer an dictionary(Constants.EndpointPathToNameMap) when construct EndpointRouter, perhaps you could expose a property that could be set outside, and replace this dictionary in constructor. Does it make sense?

atpyk avatar Dec 16 '16 10:12 atpyk

We already went through that exercise and there are a couple of complications - CORS, endpoint with mutliple sub-endpoints (mostly discovery and UI related).

I added a feature request/backlog label to it. It def. won't happen for RTM (next week).

leastprivilege avatar Dec 16 '16 10:12 leastprivilege

Feel free to do a POC and let us know.

leastprivilege avatar Dec 16 '16 10:12 leastprivilege

I'm going to close, as it seems to be a dup of either #19 or #442. Feel free to join in on those threads.

brockallen avatar Dec 24 '16 02:12 brockallen

What about a simply redirect on IIS?

danielmeza avatar Jul 13 '17 19:07 danielmeza

I hope the identityServer4 can support customize the route path extension feature in future

  1. in old system we can't change the original contracts path
  2. it good for data distribution in Reverse proxy
  3. it friendly to a clearer description of the business
  4. so on expect it can support customize the route path extension feature in future!

312527814 avatar May 31 '19 03:05 312527814

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

lock[bot] avatar Jan 11 '20 11:01 lock[bot]