IdentityServer / IdentityServer3

OpenID Connect Provider and OAuth 2.0 Authorization Server Framework for ASP.NET 4.x/Katana
https://identityserver.github.io/Documentation/
Apache License 2.0
2.01k stars 763 forks source link

Configuration of JWTBearerAuthentication Use - Disable Authority | Xamarin #3828

Closed JasonLeedy closed 7 years ago

JasonLeedy commented 7 years ago

Question / Issue

Attempting to test locally: IdSrv on localhost:5000 Api1 on localhost:5001

client Android or iPhone running on emulator. The localhost, is as it says local, i.e. the emulator. The host machine above, in the case of android, is now 10.0.2.2.

So rightfully, IdSrv4 barfs on the Issuer not matching.

Question: Is there a way to:

if (env.IsDevelopment()) {

// ??? Some code to config JWT to ignore the Issuer validation check ???

}

Understood that i can publish both idrsrv and Api1 to azure - trying to stay all local machine

Sorry if easy - IdSrv-newbie

Relevant parts of the log file

Bearer was not authenticated. Failure message: IDX10205: Issuer validation failed. Issuer: 'http://10.0.2.2:5000'. Did not match: validationParameters.ValidIssuer: 'http://localhost:5000' or validationParameters.ValidIssuers: 'null'.

```
brockallen commented 7 years ago

This seems to be a general question about IdentityServer - not a bug report or an issue.

Please use one of the our free or commercial support options

See here for more details.

Thanks!