Closed olee closed 8 years ago
Do you have your token handle store configured? You need a DB when using reference tokens. The default in-mem should work while debugging/development (assuming you don't recycle). Also, we cover this in the docs.
I used in-memory storage for testing and I looked at all the documentation (I could find).
As you can see from the logs the token is found and validated correctly.
However I couldn't find any information on what happens after that and what's the matter with that
Creating introspection response for inactive token
Thanks for your quick reply!
Hmm... yea, not clear then to me either. Check the expiration: \"exp\": \"1464188177\",
-- that's might be it.
The expiration is also ok. I just can't figure out where it fails... Do you maybe have some tips where I could do some checks to find out what I'm missing?
Download the code for the version/tag you're using and debug... shrug
If/when you find it, then perhaps the logging can be beefed up to indicate what about the token failed to validate.
I tried adding some test-blocks around the API auth check:
app.Use(async (context, next) =>
{
await next.Invoke();
});
app.UseIdentityServerBearerTokenAuthentication(new IdentityServerBearerTokenAuthenticationOptions
{
Authority = CoreConstants.IdentityServerAuthority,
RequiredScopes = new string[] { "api" },
.......
});
app.Use(async (context, next) =>
{
await next.Invoke();
});
I noticed, that a breakpoint second block at the bottom is triggered, (and it shows all those log messages before that), however context.Authentication.User
is still the same - an empty user.
Do you have any tips on how to debug this / links to some explanation on what is needed for reference tokens to work?
I tried to enable reference tokens for my API access. First I got the error
No scope with that name found. aborting
, but after some trial & error I got that part running (no idea exactly how however).But now I still get 401 responses from my API and the server outputs the following log:
Could you give me some pointers on how to fix this / is there some good tutorial on how to support reference tokens?