We have an internal application for internal users which I need to protect using OAuth2/OIDC and thinking of using IdentityServer4. The end users will not be authorizing any applications so there shouldn't be any consent page. I couldn't find any suitable samples, they either are MVC client samples with consent pages or console application clients for Resource Owner Password flows.
Only thing I got is that I need to implement IResourceOwnerPasswordValidator
in IDSRV application. That part is I'm OK with. But I couldn't figure out how to setup IDSRV app and MVC app in their Startups.
What do I need to do to protect an .NET Core ASP.NET MVC app with IdentityServer4 using Resource Owner Password flow?
I'd appreciate any help.
Solution:
I've ended up using Hybrid flow with manuel user login instead of Resource Owner Password flow. Here's the working solution I've created:
https://github.com/deastr/IdentityServer4.HybridFlow.NoConsent
Consent is used to allow an end user to grant a client access to resources (identity or API). This is typically only necessary for third-party clients, and can be enabled/disabled per-client on the client settings.
The new Duende IdentityServer continues to be open source, but now has a dual license. This license allows it to be used for free for development, testing, and learning, free for non-commercial open source, and free for use in commercial settings if the entity or organization makes less than 1 million USD/year.
IdentityServer. IdentityServer is an OpenID Connect provider - it implements the OpenID Connect and OAuth 2.0 protocols. Different literature uses different terms for the same role - you probably also find security token service, identity provider, authorization server, IP-STS and more.
Cookie authenticationIdentityServer registers two cookie handlers (one for the authentication session and one for temporary external cookies).
In the Client definition add the following
RequireConsent = false,
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With