AllowUnrestrictedIntrospection support
I can see that the AllowUnrestrictedIntrospection that was supported in Scope has been removed in ApiResource. As far as I can see then that feature has been removed for introspect.
Or are there still a supported way to get the introspect to return all scopes from AccessToken?
yes - should work by default now. Do you have issues with it?
yes it seems that I have an issue.
My AccessToken has:
"scope": [
"api1",
"api2",
"offline_access"
]
The introspect returns
{{
"nbf": 1489061855,
"exp": 1489065455,
"iss": "http://localhost:1941",
"aud": [
"http://localhost:1941/resources",
"api1",
"api2"
],
"client_id": "roclient",
"sub": "2",
"auth_time": 1489061855,
"idp": "local",
"amr": "pwd",
"scope": "api1",
"active": true
}}
So the scope only contains "api1"
My client has the following settings:
UpdateAccessTokenClaimsOnRefresh = true,
AllowedGrantTypes = GrantTypes.ResourceOwnerPassword,
AllowOfflineAccess = true,
RefreshTokenUsage= TokenUsage.OneTimeOnly,
AllowedScopes = { "api1", "api2" }
My apis is
new ApiResource("api1", "My API") {
ApiSecrets = { apiSecret }
},
new ApiResource("api2", "My API") {
ApiSecrets = { apiSecret }
}
IIRC this is by design - you can only see the scopes of the API used to introspect the token.
Why do you need the other scopes?
yeah I know that this is by design but if i remember correctly you added AllowUnrestrictedIntrospection that implied all scopes was returned in introspect.
https://github.com/IdentityServer/IdentityServer3/issues/2291
We have an api where we by introspect checks if the AccessToken is correct and then beside that scope the AccessToken also needs to have another scope.
As a workaround right now we are first by introspect validating the AccessToken and then parsing the scopes in the AccessToken.
We are planning on making the introspection endpoint more flexible. Right now I don't have a workaround for besides defining all the needed scopes in a single API resource.
okay. Thanks for fast reply
Hi - is there a plan to add AllowUnrestrictedIntrospection back in IdS4?
Thanks.
In 2.0 you will be able to tweak the default behavior.
Actually - this is already implemented if you want to use our nightly builds.
Thanks for your response. I looked around the code but didn't see anything to that affect. Just to make sure, you are saying that the latest code will allow introspecting all the scopes in the token (from all the ApiResources) using one of the ApiResources' secret?
Thanks.
You can implement your own (or derive from our) IIntrospectionResponseGenerator - this gives you full control over what data should get returned.
Got it - thanks!
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.