IdentityServer3 | OpenID Connect Provider and OAuth | Authentication library
kandi X-RAY | IdentityServer3 Summary
kandi X-RAY | IdentityServer3 Summary
IdentityServer is a .NET/Katana-based framework and hostable component that allows implementing single sign-on and access control for modern web applications and APIs using protocols like OpenID Connect and OAuth2. It supports a wide range of clients like mobile, web, SPAs and desktop applications and is extensible to allow integration in new and existing architectures. Watch this for the big picture: Introduction to OpenID Connect, OAuth2 and IdentityServer - and An Introduction to IdentityServer for a more code-centric talk. Go to the documentation site. OpenID Connect specification / OAuth2 specification.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of IdentityServer3
IdentityServer3 Key Features
IdentityServer3 Examples and Code Snippets
Community Discussions
Trending Discussions on IdentityServer3
QUESTION
I've been fine-tuning my client registration in IdentityServer 4.x and I've encountered a situation I cannot see a solution to.
First of, I'm implementing a strategy where I rotate my refresh tokens, so I set them to OneTime
usage. In addition I set AbsoluteRefreshTokenLifetime
to zero (0), and RefreshTokenExpiration
to Sliding
, with a SlidingRefreshTokenLifetime
of e.g. 24 hours.
According to documentation this results in a configuration where the refresh tokens can be used only one time and when they are used they are getting a new expiration time.
when refreshing the token, the lifetime of the refresh token will be renewed (by the amount specified in SlidingRefreshTokenLifetime). The lifetime will not exceed AbsoluteRefreshTokenLifetime.
Also, mderriey has a nice explanation here which uses time-variables: https://github.com/IdentityServer/IdentityServer3/issues/2411#issuecomment-171483658
However, there is one statement that does not match what's happening on my side, and that is regarding the new expiration of the refresh token:
You use it at time T8 to get a new access token. Its new expiration time is T18
In my case the new expiration time is T22. The SlidingRefreshTokenLifetime
is appended to how much time is remaining on the used refresh token.
So, I'm in a situation where I have configured my client, and every time a refresh token is used the newly created refresh tokens are getting increasingly longer and longer expiration times.
From the logs:
...ANSWER
Answered 2022-Mar-11 at 13:21It seems that most of the properties of the original refresh token is re-used when creating a new refresh token when set to OneTime
usage. This includes the CreationTime
which is the timestamp used when calculating lifetime.
An observant eye might notice that the new lifetimes mentioned in the logs equals Current lifetime
+ 86400.
Since CreationTime
doesn't change, the value of lifetime grows over time, because it's the number of seconds since that specific time.
I mistakenly thought that CreationTime
reflected the timestamp of the newly created record in PersistedGrants
.
QUESTION
In my project using .NET framework 4.6.1, EF 6.1.4 and IdentityServer3, I set the following DbContext:
...ANSWER
Answered 2021-Jul-28 at 16:28When using ASP.Net DI and IdentityServer DI together, we have to be careful to make sure that both the IdentityServer and the underlying DbContext are scoped to the OWIN request context, we do that by Injecting the DbContext into the IdentityServer context. this answer has some useful background: https://stackoverflow.com/a/42586456/1690217
I suspect all you need to do is resolve the DbContext, instead of explicitly instantiating it:
QUESTION
I have an asp.net web api 2 project with .Net framework 4.8 and a centralized Identity Server 4 project. I want to validate jwt/access token generated from IS4 in my web api 2 project. I can understand its a duplicate question but somehow I am unable to find any suitable help and I am not sure what's missing. I have used IdentityServer3.AccessTokenValidation
for token validation in web api project.
Startup.cs
...ANSWER
Answered 2021-Jul-24 at 16:58The error shows:
QUESTION
I received federation metadata endpoint from customer which I used to configure WsFederationAuthentication in identityserver3.
Everything works fine from developer machine like identity server login redirecting to adfs login page, but after deploying the solution into AWS elastic bean stalk (which is in private subnet) then I receive 504 HTTP status code when I try to login through External(ADFS) login.
I simulated this scenario in postman. I receive 302 response in developer machine but the request never ends (postman result pane shows 'Loading...') in AWS ec2 instance.
I am able to browse federation metadata URL and /adfs/ls endpoint from AWS ec2 instance.
In idnetity server log, I can see below logs,
External login requested for provider: adfs
Triggering challenge for external identity provider
HTTP Response
...
ANSWER
Answered 2021-Jun-24 at 07:13I further investigated with process monitor tool, compared the tcp operations between local and aws ec2 instance for the identityserver external login endpoint request then I found that TCP disconnect operation happening immediately after TCP connect in AWS ec2 instance but in local this was not happening instead TCP communication established and tcp communication went well.
Further investigated with wireshark tool then I found the Handshake failure happening in AWS ec2 instance after Client Hello call. Then I compared TLS version and cipher suites used by local machine (from wireshark log), I found the difference like local machine uses TLS 1.2 and cipher suite : TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (0xc030)
and AWS ec2 instance uses TLS 1.0 which is not supproted by ADFS server. Hence the tcp connection could not be established resulting into handshake failure.
I followed this link https://docs.microsoft.com/en-us/officeonlineserver/enable-tls-1-1-and-tls-1-2-support-in-office-online-server#enable-strong-cryptography-in-net-framework-45-or-higher to make .net framewrok to use strong crypto.
After this registry update, successfully able to login from external idp (ADFS) via identity server3 login page.
QUESTION
I have setup Identity Server 4 locally and added an MVC Net Core client with no problems.
I cannot get my .Net Framework Web Forms app to work though.
When I try to hit the About (Secure page) .aspx page I get the below error:
"Sorry, there was an error : unauthorized_client
Invalid grant type for client"
I have tried all the various Granttypes without success.
I feel like my Client setup in ID4 is incorrect. Various blog posts say I should use the Code grant but then others say use id_token.
I have setup the Client as follows in the ID4 server app:
...ANSWER
Answered 2021-Apr-22 at 06:46"id_token token" is Implicit flow, so you need to include that in your AllowedGrantTypes
.
Re the UserInfo endpoint, it just returns claims about the user, based on the access token you call it with. Getting a 401 response probably means you aren't passing a valid access token. It can be useful if you need additional user claims and you only have an access token but not an ID token.
QUESTION
I am using Asp.Net Core 3.1 API with Identity Server and I am using Postman as an API tester from long time and it is working perfect, but, after version update to 8.+.+ the Postman return me this error:
...ANSWER
Answered 2021-Apr-05 at 05:47After many research, it is very easy and simple way to delete the cookies from the Postman application as shown below:
Then delete the cookies as shown below:
Now try to apply the request, it should work, but, this is only temporary solution, I hope there is a full solution from Postman team or someone.
QUESTION
i have SwaggerConfig Setup like this
...ANSWER
Answered 2021-Feb-05 at 18:22Solution was not to use SwaggerConfig.Register() separately instead do this configuration inside WebApiConfig.
QUESTION
I am trying to use Identity Server 4 with my Web API written in .NET Framework 4.6.2. I am using the IdentityServer3.Contrib.AccessTokenValidation
library as mentioned in this answer. But, the calls to the protected endpoints are returning a 402 redirect.
Here's the code from the API:
...ANSWER
Answered 2021-Feb-01 at 10:41In the API, change ValidationMode = ValidationMode.ValidationEndpoint
to ValidationMode = ValidationMode.Both
. Which would enable Identity Server to use local validation for JWTs and validation endpoint for reference tokens.
QUESTION
I am implementing Identity Server admin where admin can see all the users and also add/update or delete users.
What is the best way to implement it?
I got a link https://github.com/IdentityServer/IdentityServer3/issues/2607 which suggest that I should create a separate secured API which will talk to same database of identity server.
Is that correct way. Kindly recommend.
...ANSWER
Answered 2020-Nov-27 at 07:52Yes, it is stated that you should create an application for management of Users, Resources, etc.
Scott Brady states here that you can write your own API or use another package like IdentityManager
.
However, IdentityManager package is no longer active, you can use IdentityServer4.Admin
package instead.
QUESTION
API details:.Net Core 3.1 REST API using IdentityServer4 version 3.1.3
I have many APIs which send responses in a specified format.
For e.g. Register endpoint returns below response:
...ANSWER
Answered 2020-Oct-31 at 05:42As explained in your GitHub ticket:
IdentityServer is an OAuth implementation - what you are suggesting would be incompatible with OAuth and thus is not supported by us.
If you need to change the complete payload to something custom - write some middleware to intercept the response.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install IdentityServer3
support for MembershipReboot and ASP.NET Identity based user stores
support for additional Katana authentication middleware (e.g. Google, Twitter, Facebook etc)
support for EntityFramework based persistence of configuration
support for WS-Federation
extensibility
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page