IdentityServer / IdentityServer2

[deprecated] Thinktecture IdentityServer is a light-weight security token service built with .NET 4.5, MVC 4, Web API and WCF.
Other
410 stars 291 forks source link

How to consume Identity Server in a class library or console app? #861

Closed venh closed 8 years ago

venh commented 8 years ago

I don't want to use the MVC based Web site that comes along with the Identity Server project. Rather, I would like to use the DLLs and reference them in my custom project (class library / console app) and would like to authenticate a user and generate a token, serialize and cache it and retrieve it back from the cache and re-validate it. Could you kindly let me know, if this is possible, and if so, could you kindly let me know the steps(including code) to do it?

brockallen commented 8 years ago

There is a core DLL on NuGet for IdentityServer2. I don't think we have any samples that show its use, though. Your best bet would be to build something similar to what the current hosting project does.

As an alternative, you might want to look at IdentityServer3 as it allows more customization like you're asking for: https://github.com/IdentityServer/IdentityServer3/