Comments (8)
This fails
could you be a bit more specific?
from identitymodel.aspnetcore.
In my case it fails because I do not have a ConfigurationManger on the OpenIdOptions, and so this line throws NullReferenceException:
I guess the question is. What is the desired behavior when there are multiple configured clients and one of them is called "default". Should that really change the behavior of the default client compared to the case when there is only one client?
from identitymodel.aspnetcore.
I am still not 100% clear what the problem is. but the behavior of the default config plumbing allows to have multiple named clients. If you don't pass a name explicitly, it falls bad to a "default" client.
And that's IIRC either the one client (if it is only one) - or the OIDC-based configuration.
Do you think this behavior does not make sense? You are probably aware that you replace the config loading part if you want different behavior.
from identitymodel.aspnetcore.
Ok I will try and clarify.
If I have one defined, named client, no matter the name, then the associated request will always be returned from GetClientCredentialsRequestAsync()
. For example:
options.Client.Clients.Add("default", defaultRequest)
or
options.Client.Clients.Add("some-other-name", defaultRequest)
If I have multiple defined, named clients, then the name matters. For example:
options.Client.Clients.Add("client-A", requestA); // This returns the requestA from GetClientCredentialsRequestAsync
options.Client.Clients.Add("client-B", requestB); // This returns the requestB from GetClientCredentialsRequestAsync
but, if one of the clients is named exactly "default", then
options.Client.Clients.Add("default", requestA); // This does NOT return the requestA from GetClientCredentialsRequestAsync
options.Client.Clients.Add("some-other", requestB); // This returns the requestB from GetClientCredentialsRequestAsync
The behavior that makes sense to me would be that if a client is added with the explicit name "default" if more than one client is added, then that request should also be the one that is returned by GetClientCredentialsRequestAsync()
.
Hope it makes sense :)
from identitymodel.aspnetcore.
And why don't you use the name in your application code when you have more than one client config?
from identitymodel.aspnetcore.
I do. I just happened to explicitly use the name "default". After I renamed it to something else, the code started to work.
from identitymodel.aspnetcore.
Ah I see ;)
from identitymodel.aspnetcore.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue.
from identitymodel.aspnetcore.
Related Issues (20)
- Calling GetUserAccessTokenAsync() twice when token renews causes two renewals HOT 1
- Consider sliding the cookie after token renewal HOT 3
- Support extension grants for user tokens HOT 4
- Question : How to use library for storing 3rd party user tokens HOT 3
- Question: Motivation switching from IOptions<T> to T HOT 2
- '<' is an invalid start of a value. LineNumber: 1 HOT 2
- Blazor server sample request HOT 9
- Question: Breaking change to method signature HOT 3
- Authorization not being added to HttpClient - with client credentials HOT 3
- ClientAccessTokenCache results in error "The absolute expiration value must be in the future. (Parameter 'AbsoluteExpiration')" HOT 5
- Support user access to multiple service providers secured with multi tenant IDPs HOT 3
- Can't ignore ssl check on Mac HOT 1
- ClientCredentialsTokenRequest now using header as ClientCredentialStyle by default HOT 4
- Challenge-Scheme specific refresh-tokens HOT 2
- Error getting token when upgrading from 4.1.2 to 4.1.3 or greater HOT 3
- Access Token Management: Plans for token exchange? HOT 3
- Option flag to disable ChallengeScheme-specific tokens HOT 16
- Processing the id_token during refresh HOT 3
- Suggested approach for auto refresh of Access tokens while using oidc client in desktop applications HOT 5
- Upgrade from 3.0 to 4.x completely breaks dynamic configuration HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from identitymodel.aspnetcore.