openiddict / openiddict-core Goto Github PK
View Code? Open in Web Editor NEWFlexible and versatile OAuth 2.0/OpenID Connect stack for .NET
Home Page: https://documentation.openiddict.com/
License: Apache License 2.0
Flexible and versatile OAuth 2.0/OpenID Connect stack for .NET
Home Page: https://documentation.openiddict.com/
License: Apache License 2.0
The OpenIddictContext
class extends IdentityDbContext
but doesn't appear to provide any explicit constructor. It would be nice if this class provided constructors in line with the public constructors provided by IdentityDbContext
which would, in turn, call the base IdentityDbContext
. For example, it would be nice to be able to have a class extending OpenIddictContext
which looks like this:
public class ApplicationDbContext : OpenIddictContext<ApplicationUser, Application, ApplicationRole, string>
{
public ApplicationDbContext(DbContextOptions options) : base(options)
{
}
}
At the moment that wouldn't work because OpenIddictContext
just has a default paramaterless constructor. If the above suggestion was implementing and it would allow us to create the context manually and pass configuration options like this:
var optionsBuilder = new DbContextOptionsBuilder<ApplicationDbContext>();
optionsBuilder.UseInMemoryDatabase();
var context = new ApplicationDbContext(optionsBuilder.Options);
That can be useful when running tests. At the moment I can get around this by extending IdentityDbContext
and manually adding public DbSet<Application> Applications { get; set; }
to my class but your recommended approach is to directly extend OpenIddictContext
.
Just want to say, love this project btw!! Love the examples as well, although an AngularJs one would be nice, with details on how to use refresh_tokens, but i am sure this will all come with time.
I am not sure if this is a problem with OpenIddict, or my setup, or if it aint a problem.
I am using (want to use only) tokens for authentication. I am sending the tokens with angular, and this works fine i believe. The problem i am having is that a cookie is being used in my application and this is being sent with my angular requests. I cannot override this. So now when users logout of my site (which i just set the token to null), users are really still logged in, because the cookie is on the machine.
I have added this to my startup.cs to support tokens (as suggested by @PinpointTownes, thank you)
// Add a middleware used to validate access tokens and protect the API endpoints.
app.UseOAuthValidation();
I still want to use external providers, and i am guessing an "external" cookie must be used for that, so that is fine. Maybe this is a problem because my authorization server and resource server are on the same domain? My angular app using Satellizer to open the Account/Login view. All the code for OpenIddict is basically exactly the same as the Mvc.Server example. Maybe a better question is, can i exclude cookies for all my api calls?
Here is my startup.cs file, just encase someone can shed light on something. Thanks in advance for any help/tips.
public class Startup
{
public static void Main(string[] args)
{
var application = new WebApplicationBuilder()
.UseConfiguration(WebApplicationConfiguration.GetDefault(args))
.UseStartup<Startup>()
.Build();
application.Run();
}
public void ConfigureServices(IServiceCollection services)
{
// file is stored above the wwwroot
var webRootPath = services.BuildServiceProvider()
.GetRequiredService<IHostingEnvironment>()
.MapPath("../");
// configuration
var configuration = new ConfigurationBuilder()
.AddJsonFile(string.Format("{0}appsettings.json", webRootPath))
.AddEnvironmentVariables()
.Build();
// application settings
var appSettings = configuration.Get<AppSettings>();
// mvc
services.AddMvc();
// ef7
services.AddEntityFramework()
.AddSqlServer()
.AddDbContext<ApplicationDbContext>(options =>
options.UseSqlServer(appSettings.Data.AuthConnection.ConnectionString)
.UseRowNumberForPaging());
// identity
services.AddIdentity<ApplicationUser, ApplicationUserRole>(config =>
{
// if we are accessing the /api and an unauthorized request is made
// do not redirect to the login page, but simply return "Unauthorized"
config.Cookies.ApplicationCookie.Events = new CookieAuthenticationEvents
{
OnRedirectToLogin = ctx =>
{
if (ctx.Request.Path.StartsWithSegments("/api"))
ctx.Response.StatusCode = (int)HttpStatusCode.Unauthorized;
else
ctx.Response.Redirect(ctx.RedirectUri);
return System.Threading.Tasks.Task.FromResult(0);
}
};
})
.AddEntityFrameworkStores<ApplicationDbContext>()
.AddDefaultTokenProviders()
.AddOpenIddict();
// dependencies
// add services here
}
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
{
// loggers
loggerFactory.AddConsole();
loggerFactory.AddDebug();
// get current appSettings and output to logger
var appSettings = app.ApplicationServices.GetRequiredService<AppSettings>();
var logger = loggerFactory.CreateLogger(appSettings.Url);
logger.LogInformation(string.Format("Environment: {0}", appSettings.Environment));
logger.LogInformation(string.Format("Data: {0}", appSettings.Data.DefaultConnection.ConnectionString));
logger.LogInformation(string.Format("Auth: {0}", appSettings.Data.AuthConnection.ConnectionString));
// environment
env.EnvironmentName = appSettings.Environment;
if (appSettings.Environment == "Development")
app.UseDeveloperExceptionPage();
app.UseIISPlatformHandler(options =>
{
options.AuthenticationDescriptions.Clear();
options.FlowWindowsAuthentication = false;
});
app.UseOverrideHeaders(options =>
{
options.ForwardedOptions = ForwardedHeaders.All;
});
app.UseStaticFiles();
// Add a middleware used to validate access tokens and protect the API endpoints.
app.UseOAuthValidation();
// comment this out and you get an error saying
// InvalidOperationException: No authentication handler is configured to handle the scheme: Microsoft.AspNet.Identity.External
app.UseIdentity();
// Add external providers
if (appSettings.Authentication.Google != null)
app.UseGoogleAuthentication(options =>
{
options.ClientId = appSettings.Authentication.Google.ClientId;
options.ClientSecret = appSettings.Authentication.Google.ClientSecret;
});
// Note: OpenIddict must be added after ASP.NET Identity and the external providers.
app.UseOpenIddict(builder =>
{
// You can customize the default Content Security Policy (CSP) by calling UseNWebsec explicitly.
// This can be useful to allow your HTML views to reference remote scripts/images/styles.
builder.UseNWebsec(directives => {
directives
.DefaultSources(directive => directive.Self())
.ImageSources(directive => directive
.Self()
.CustomSources("data:"))
.ScriptSources(directive => directive
.Self()
.UnsafeInline())
.StyleSources(directive => directive
.Self()
.UnsafeInline()
.CustomSources("https://fonts.googleapis.com"))
.FontSources(directive => directive
.Self()
.CustomSources("https://fonts.gstatic.com"));
});
if (appSettings.Environment == "Development")
{
builder.Options.AllowInsecureHttp = true;
}
else
{
// get thumbprint, remove any spaces
var thumbprint = appSettings.Authentication.OpenId.Thumbprint.Replace(" ", string.Empty);
// add cert
builder.Options.SigningCredentials.AddCertificate(thumbprint);
}
});
// Mvc routes
app.UseMvc(builder =>
{
// default goes to Home, and angular will deal with client side routing
builder.MapRoute(
name: "default",
template: "{*url}",
defaults: new { controller = "home", action = "index" });
});
}
}
OpenIddictStore
only supports contexts derived from OpenIddictContext
.
Currently views are loaded as embedded resources that cannot be changed without affecting the source package.
Ideally we could use something like this: aspnet/FileSystem#49 if it's ever implemented.
I have setup a website that uses OpenIddict and Angular based on the Mvc.Server sample. If i use the vNext DI then it all works fine. However, i need to use SimpleInjector.
Is this possible with OpenIddict because everywhere i look it seems to be tied into vnext DI?
I have tried to override everything, but doesnt seem to work. I have followed the code to actually create a OpenIddictProvider, which uses context.HttpContext.RequestServices
which seems to always be the vNext DI. Am i missing something??
Here is my startup.cs
using System.Linq;
using CryptoHelper;
using Microsoft.AspNet.Builder;
using Microsoft.AspNet.Hosting;
using Microsoft.AspNet.HttpOverrides;
using Microsoft.AspNet.Identity.EntityFramework;
using Microsoft.Data.Entity;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Mvc.Angular.Models;
using Mvc.Angular.Services;
using OpenIddict;
using OpenIddict.Models;
using SimpleInjector;
using SimpleInjector.Integration.AspNet;
using Microsoft.AspNet.Mvc.Controllers;
using Microsoft.AspNet.Http;
using Microsoft.AspNet.Http.Internal;
using System.Threading;
using Microsoft.AspNet.Identity;
using Microsoft.Extensions.Options;
using System.Collections.Generic;
namespace Mvc.Angular {
public class Startup {
public static void Main(string[] args) {
var application = new WebApplicationBuilder()
.UseConfiguration(WebApplicationConfiguration.GetDefault(args))
.UseStartup<Startup>()
.Build();
application.Run();
}
private IConfigurationRoot _configuration;
private Container _container = new Container();
public void ConfigureServices(IServiceCollection services) {
_configuration = new ConfigurationBuilder()
.AddJsonFile("config.json")
.AddEnvironmentVariables()
.Build();
services.AddMvc();
services.AddEntityFramework()
.AddSqlServer()
.AddDbContext<ApplicationDbContext>(options =>
options.UseSqlServer(_configuration["Data:DefaultConnection:ConnectionString"]));
services.AddIdentity<ApplicationUser, IdentityRole>()
.AddEntityFrameworkStores<ApplicationDbContext>()
.AddDefaultTokenProviders()
.AddOpenIddict();
// TO USE VNEXT DI, UNCOMMENT HERE
//services.AddTransient<IEmailSender, AuthMessageSender>();
//services.AddTransient<ISmsSender, AuthMessageSender>();
// TO USE SIMPLE INJECTOR, UNCOMMENT THIS, AND UNCOMMENT USESIMPLEINJECTOR CALL BELOW
// So we can use Simple Injector to inject our controllers and other services, but
// let ASP.NET resolve all system dependencies
services.AddScoped<IControllerActivator>(e => new SimpleInjectorControllerActivator(_container));
// Work around for a Identity Framework bug inside the SignInManager<T> class.
services.Add(ServiceDescriptor.Scoped<IHttpContextAccessor>(e => new NeverNullHttpContextAccessor()));
}
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
var factory = app.ApplicationServices.GetRequiredService<ILoggerFactory>();
factory.AddConsole();
factory.AddDebug();
app.UseDeveloperExceptionPage();
app.UseIISPlatformHandler(options => {
options.AuthenticationDescriptions.Clear();
options.FlowWindowsAuthentication = false;
});
app.UseOverrideHeaders(options => {
options.ForwardedOptions = ForwardedHeaders.All;
});
app.UseStaticFiles();
// Add a middleware used to validate access
// tokens and protect the API endpoints.
app.UseOAuthValidation();
// comment this out and you get an error saying
// InvalidOperationException: No authentication handler is configured to handle the scheme: Microsoft.AspNet.Identity.External
app.UseIdentity();
// Note: OpenIddict must be added after
// ASP.NET Identity and the external providers.
app.UseOpenIddict(options =>
{
// development
options.Options.AllowInsecureHttp = true;
});
app.UseMvcWithDefaultRoute();
using (var context = new ApplicationDbContext(_configuration["Data:DefaultConnection:ConnectionString"]))
{
context.Database.EnsureCreated();
// Add Mvc.Client to the known applications.
if (!context.Applications.Any()) {
// Note: when using the introspection middleware, your resource server
// MUST be registered as an OAuth2 client and have valid credentials.
//
// context.Applications.Add(new Application {
// Id = "resource_server",
// DisplayName = "Main resource server",
// Secret = "875sqd4s5d748z78z7ds1ff8zz8814ff88ed8ea4z4zzd"
// });
context.Applications.Add(new Application {
Id = "myClient",
DisplayName = "My client application",
RedirectUri = "http://localhost:54540/signin-oidc",
LogoutRedirectUri = "http://localhost:54540/",
Type = OpenIddictConstants.ApplicationTypes.Public
});
context.SaveChanges();
}
}
}
public void UseSimpleInjector(IApplicationBuilder app)
{
_container.Options.DefaultScopedLifestyle = new AspNetRequestLifestyle();
app.UseSimpleInjectorAspNetRequestScoping(_container);
// IOpenIddictStore
_container.Register<IOpenIddictStore<ApplicationUser, Application>, OpenIddictStore<ApplicationUser, Application, IdentityRole, ApplicationDbContext, string>>(Lifestyle.Scoped);
_container.Register(() =>
new OpenIddictStore<ApplicationUser, Application, IdentityRole, ApplicationDbContext, string>(_container.GetRequiredService<ApplicationDbContext>()), Lifestyle.Scoped);
// OpenIddicManager
_container.Register(() => new OpenIddictManager<ApplicationUser, Application>(_container), Lifestyle.Scoped);
// IUserStore
var connectionString = _configuration["Data:DefaultConnection:ConnectionString"];
_container.Register(() => new ApplicationDbContext(connectionString), Lifestyle.Scoped);
_container.Register<IUserStore<ApplicationUser>>(() => _container.GetRequiredService<IOpenIddictStore<ApplicationUser, Application>>(),
Lifestyle.Scoped);
// UserManager
_container.Register(() => new OpenIddictManager<ApplicationUser, Application>(_container), Lifestyle.Scoped);
_container.Register<UserManager<ApplicationUser>, OpenIddictManager<ApplicationUser, Application>>(Lifestyle.Scoped);
_container.CrossWire<IOptions<IdentityOptions>>(app);
_container.CrossWire<IPasswordHasher<ApplicationUser>>(app);
_container.CrossWire<IEnumerable<IUserValidator<ApplicationUser>>>(app);
_container.CrossWire<IEnumerable<IPasswordValidator<ApplicationUser>>>(app);
_container.CrossWire<ILookupNormalizer>(app);
_container.CrossWire<IdentityErrorDescriber>(app);
_container.CrossWire<ILogger<UserManager<ApplicationUser>>>(app);
_container.CrossWire<IHttpContextAccessor>(app);
// RoleStore
_container.CrossWire<IEnumerable<IRoleValidator<IdentityRole>>>(app);
_container.Register<IRoleStore<IdentityRole>>(() => new RoleStore<IdentityRole>(_container.GetRequiredService<ApplicationDbContext>()), Lifestyle.Scoped);
// RoleManager
_container.CrossWire<ILogger<RoleManager<IdentityRole>>>(app);
_container.Register(() => new RoleManager<IdentityRole>(_container.GetRequiredService<IRoleStore<IdentityRole>>(),
_container.GetRequiredService<IEnumerable<IRoleValidator<IdentityRole>>>(),
_container.GetRequiredService<ILookupNormalizer>(),
_container.GetRequiredService<IdentityErrorDescriber>(),
_container.GetRequiredService<ILogger<RoleManager<IdentityRole>>>(),
_container.GetRequiredService<IHttpContextAccessor>()), Lifestyle.Scoped);
// IUserClaimsPrincipalFactory
_container.CrossWire<DataProtectorTokenProvider<ApplicationUser>>(app);
_container.Register<IUserClaimsPrincipalFactory<ApplicationUser>>(() => new UserClaimsPrincipalFactory<ApplicationUser, IdentityRole>(_container.GetRequiredService<UserManager<ApplicationUser>>(),
_container.GetRequiredService<RoleManager<IdentityRole>>(), _container.GetRequiredService<IOptions<IdentityOptions>>()), Lifestyle.Scoped);
// SignInManager
_container.CrossWire<ILogger<SignInManager<ApplicationUser>>>(app);
_container.Register(() => new SignInManager<ApplicationUser>(_container.GetRequiredService<UserManager<ApplicationUser>>(),
_container.GetRequiredService<IHttpContextAccessor>(),
_container.GetRequiredService<IUserClaimsPrincipalFactory<ApplicationUser>>(),
_container.GetRequiredService<IOptions<IdentityOptions>>(),
_container.GetRequiredService<ILogger<SignInManager<ApplicationUser>>>()), Lifestyle.Scoped);
// Senders
_container.Register<IEmailSender, AuthMessageSender>();
_container.Register<ISmsSender, AuthMessageSender>();
// controllers
_container.RegisterAspNetControllers(app);
// verify
_container.Verify();
}
private sealed class NeverNullHttpContextAccessor : IHttpContextAccessor
{
private readonly AsyncLocal<HttpContext> context = new AsyncLocal<HttpContext>();
public HttpContext HttpContext
{
get { return this.context.Value ?? new DefaultHttpContext(); }
set { this.context.Value = value; }
}
}
}
}
To prevent downgrade attacks (code -> hybrid/implicit), OpenIddict
must be updated to reject authorization requests using the implicit/hybrid flow.
Hi,
after the last update today I was able to build the entire solution. But when running the Server, I get an exception in OpenIddict.Core\OpenIddictExtensions.cs line 152
This is the nicely formatted error page ;)
500 Internal Server Error.zip
To allow easy plug in of custom business logic, it would be nice to avoid using DbContext directly, and instead depending on some kind of abstraction (e.g. OpenIddictManager/Store) and provide a default implementation.
Currently, the claims stored in a refresh token are used as-is to create a new access token when receiving a grant_type=refresh_token
request, which may potentially result in outdated claims being returned to the caller application/resource server.
To fix that, we should update GrantRefreshToken
to call CreateIdentityAsync
to get a fresh ClaimsIdentity
from ASP.NET Identity instead of reusing the identity stored in the refresh token.
/cc @joshcomley @capesean
Currently the nightly builds are beoken with a webapplication exception in startup.cs. is there not a normal nuget package i can refernece to use this??
I have an existing database that uses EF6.1 and i would like to use that is possible. I cannot update my existing database to EF7, because you cant define complex properties yet.
I just wonder if this is possible and what i would have to implement to do this.
In the current bits, the authorization consent form is always displayed. We should add a new Authorization
model and offer an option to avoid re-displaying the consent form.
Hi, I'm currently working on a web api and openiddict was exactly what I was looking for. So far it's working great! Thanks for the hard work. I'm currently using it to generate jwt tokens.
Would you be able to share your thoughts on Openiddict's release roadmap?
It appears that your Mvc.Server sample would provide a starting place for building an MVC application with an embedded OpenIddict server. Is this correct, and are there any caveats?
using rc2 nightly build 20116
openiddict core project failed to build because of this line in OpenIddictExtensions
builder.Services.AddCaching();
what lead me to discover this error is when i tried to update my project database using dotnet ef
it gave me this error
dotnet : System.TypeLoadException: Could not load type 'Microsoft.Extensions.DependencyInjection.MemoryCacheServicesExtensions' from assembly 'Microsoft.Extensions.Caching.Memory, Version=1.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'.
At line:1 char:1
+ dotnet ef database update
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (System.TypeLoad...9793829ddae60'.:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
at Microsoft.AspNetCore.Builder.OpenIddictExtensions.AddOpenIddictCore[TApplication](IdentityBuilder builder, Action`1 configuration)
at Microsoft.AspNetCore.Builder.OpenIddictExtensions.AddOpenIddict(IdentityBuilder builder)
at WebPortal.Startup.ConfigureServices(IServiceCollection services) in C:\Users\Ahmed-PC\Development\RoseDevProject\RoseDev\src\WebPortal\Startup.cs:line 52
Could not load type 'Microsoft.Extensions.DependencyInjection.MemoryCacheServicesExtensions' from assembly 'Microsoft.Extensions.Caching.Memory, Version=1.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'.
please can you update the project with the correct dependency
thanks a lot
Currently, client_secret
is stored as-is in the database. Implementing key derivation + hashing would help mitigating the risks of a database leakage and make brute force attacks harder.
aspnet/Identity has a password hasher that could be used for this exact purpose: https://github.com/aspnet/Identity/blob/dev/src/Microsoft.AspNet.Identity/PasswordHasher.cs. Sadly, it requires a TUser
parameter, which doesn't seem really appropriate.
@henkmollema created a Crypto
package for that, but it's for ASP.NET 5 beta6 and uses deprecated CoreFX crypto packages: https://github.com/henkmollema/CryptoHelper
/cc @Bartmax
I want to add links to fonts on my web application, but since implementing OpenIddict, i have just just given CSP errors.
After hacking away at my project and then the source of OpenIddict, i see that a CSP Policy is added by default in the OpenIddictExtensions
file, like so
// Insert a new middleware responsible of setting the Content-Security-Policy header.
// See https://nwebsec.codeplex.com/wikipage?title=Configuring%20Content%20Security%20Policy&referringTitle=NWebsec
app.UseCsp(options => options.DefaultSources(directive => directive.Self())
.ImageSources(directive => directive.Self().CustomSources("*"))
.ScriptSources(directive => directive.Self().UnsafeInline())
.StyleSources(directive => directive.Self().UnsafeInline()));
This is all very well, but how can i override these settings? Why are these settings added by default? Surely they should be optional?
Similar to the roles option for the identity_token, I propose the userinfo endpoint should give info on the roles of the user. This would eliminate the need to generate & decrypt an additional token just for user attributes.
Firstly, I'd like thank you guys' effort to make that all happen. I'm very close to finish my own server by spy your code. I have a question may be for the team is the redirect_uri is always something signin-oidc when I use Microsoft.AspNet.Authentication.OpenIdConnect on a client. Is this we should implement or I have missed a middleware on the client.
Creating a webApi using asp.net 5, but i do not want to use cookies, and i have implemented googleAuthentication. This doesnt work using the standard SignInManger, as for some reason i get an error message saying No authentication handler is configured to authenticate for the scheme: Microsoft.AspNet.Identity.External, as i have logged on StackOverflow http://stackoverflow.com/questions/34763335/no-authentication-handler-is-configured-to-authenticate-for-the-scheme-microsof
To get round this issue, i have implemented my own code to connect to google, get the accessToken and then get the user info from google. Now i can add the user and login to my applicationContext, all fine. Now i need to return a JSON Web Token. How can i do this from my AuthController?? I also need to do the same thing when a user logs in using an email and password.
Here is my code, maybe i am missing something??
startup.cs
public void ConfigureServices(IServiceCollection services)
{
// Add Authorization so we can use the [Authorize] tag
services.AddAuthorization(options =>
{
options.DefaultPolicy = new AuthorizationPolicyBuilder().
AddAuthenticationSchemes(OAuthBearerAuthenticationDefaults.AuthenticationScheme).
RequireAuthenticatedUser().
Build();
});
services.AddEntityFramework()
.AddSqlServer()
.AddDbContext<ApplicationDbContext>(options =>
options.UseSqlServer(_configuration["Data:SecurityConnection:ConnectionString"]));
services.AddIdentity<ApplicationUser, IdentityRole>()
.AddEntityFrameworkStores<ApplicationDbContext>()
.AddDefaultTokenProviders()
.AddOpenIddict(); // Add the OpenIddict services after registering the Identity services.
}
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
{
// use jwt bearer authentication
app.UseJwtBearerAuthentication(options =>
{
options.AutomaticAuthenticate = true;
options.AutomaticChallenge = true;
options.RequireHttpsMetadata = false;
options.Audience = "http://localhost:5000/";
options.Authority = "http://localhost:5000/";
});
// Add all the external providers you need before registering OpenIddict:
app.UseGoogleAuthentication(options =>
{
options.ClientId = "XXX";
options.ClientSecret = "XXX";
});
//app.UseFacebookAuthentication();
app.UseOpenIddict();
// Enable all static file middleware
app.UseStaticFiles();
// Enable Mvc for view controller, and
// default all routes to the Home controller
app.UseMvc(options =>
{
options.MapRoute(
name: "default",
template: "{*url}",
defaults: new { controller = "Home", action = "Index" });
});
}
AuthController.cs
public class AuthController : Controller
{
private UserManager<ApplicationUser> _userManager;
private GoogleApiService _googleApiService;
private ApplicationDbContext _context;
private OpenIddictProvider<ApplicationUser, OpenIddict.Models.Application> _provider;
public AuthController(
UserManager<ApplicationUser> userManager,
GoogleApiService googleApiService,
ApplicationDbContext applicationDbContext,
OpenIddictProvider<ApplicationUser, OpenIddict.Models.Application> provider)
{
_userManager = userManager;
_googleApiService = googleApiService;
_context = applicationDbContext;
_provider = provider;
}
/// <summary>
/// POST: api/v1/auth/login
/// </summary>
/// <param name="value"></param>
/// <returns></returns>
[HttpPost("login")]
public async Task<IActionResult> Login([FromBody] LoginModel model)
{
// validate user HERE
// How can i return a JSON web token here?
}
[HttpPost("google")]
public async Task<IActionResult> GoogleAsync([FromBody] ExternalLoginModel model)
{
// get token from google, so we can get the users details
var token = await _googleApiService.GetTokenAsync(model.Code, model.RedirectUri);
// get basic user info
var userInfo = await _googleApiService.GetUserInfoAsync(token);
// get user from context
var login = await _context.UserLogins
.Where(e => e.LoginProvider == "google" && e.ProviderKey == userInfo.Id)
.FirstOrDefaultAsync();
// if user doesnt exist, create one
if (login == null)
{
var applicationUser = new ApplicationUser { UserName = userInfo.Email, Email = userInfo.Email };
var result = await _userManager.CreateAsync(applicationUser);
// check if user added
if (!result.Succeeded)
throw new ApplicationException("User could not be created");
// if the user was created successfully, add external login
result = await _userManager.AddLoginAsync(applicationUser, new UserLoginInfo("google", userInfo.Id, userInfo.Name));
if (!result.Succeeded)
throw new ApplicationException("User could not be created");
}
// How can i return a JSON web token here?
return Ok();
}
}
Like everyone i have now changed to use the dotnet cli and changed my target frameworks from dnx451 to net451. Since doing this, restoring the latest packages etc, openiddict no longer works.
If i use postman and connect to http://localhost:5000/connect/token with a username and password, this returns an access_token. Now if i use that access token, i always get a 401 error?
Apart from the url changing to localhost:5000 (which i have updated in my Applications table), nothing else apart from the version has changed.
Upon debugging it seems that the access_token that i am passing it never generates a valid identity on a request? The IsAuthenticated property is always false and even the username is null.
Currently, OpenIddict.Mvc
exposes a special (generic) controller and a few embedded assets/views to handle the entire authorization flow. Though really convenient for people who don't want to customize the controller or the view models, this approach offers a less flexible experience than the generated controller/models used by Identity.
The question is: should we move to a template generation model (probably based on yeoman) or should we keep the existing approach?
Hi,
I'm wondering if there are any changes in the setup to enable https.
I changed the IIS Express settings of the sample server. The page can be accessed in the browser, but the postman test described at the bottom of the startup.cs fails after waiting a longer time. (... I updated the authentication and token url)
while listening on http everything works as expected.
Thanks!
Gives a not found when restoring. I've updated the NuGet.config. Downloading the sample projects seems to work but when I try to upgrade one of the templates from VS it just goes haywire.
Example error:
The dependency Microsoft.Extensions.Caching.Abstractions 1.0.0-rc2-20247 in project .. does not support framework DNX,Version=v4.5.1.
Hi
I'm customizing the OpenIddictStore by inheriting from it. And I believe that this is causing the issue. What's my best approach to solving it. One solution would be to use FirstOrDefault()
instead of SingleOrDefault()
in the method private static Type ResolveContextType([NotNull] OpenIddictServices services)
but I dont believe this is the correct approach as its just hiding the fact there seem to be two stores. Is there a way to clear the original store from the services and just replace it with my customized store.
Regards
I have setup my code as stated on the readme file, but when i call my resourceController i get an error saying Authorization failed for the request filter.
The only changes i have done to use Bearer is thus
app.UseOpenIddict(options =>
{
// Need this line to use Bearer Authorization in requests
options.Options.AuthenticationScheme = OAuthValidationDefaults.AuthenticationScheme;
// development
options.Options.AllowInsecureHttp = true;
});
My resourceController looks like so
public class ResourceController : Controller {
[Authorize(ActiveAuthenticationSchemes = OAuthValidationDefaults.AuthenticationScheme)]
[HttpGet("message")]
public IActionResult GetMessage() {
var identity = User.Identity as ClaimsIdentity;
if (identity == null) {
return HttpBadRequest();
}
return Content($"{identity.Name} has been successfully authenticated.");
}
}
To call this, i call http://localhost:5000/connect/token with a valid username and password, and then using the accessToken string returned, i call http://localhost/resource/message. An example of the call is like so
GET /api/message HTTP/1.1
Host: localhost:5000
Authorization: Bearer BIG_STRING_HERE
Cache-Control: no-cache
I have also tried adding JwtTokens, but no luck as still fails. All my code is the same as the readme, apart from above.
here is my whole startup.cs file
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
env.EnvironmentName = "Development";
var factory = app.ApplicationServices.GetRequiredService<ILoggerFactory>();
factory.AddConsole();
factory.AddDebug();
app.UseDeveloperExceptionPage();
app.UseIISPlatformHandler(options => {
options.AuthenticationDescriptions.Clear();
options.FlowWindowsAuthentication = false;
});
app.UseOverrideHeaders(options => {
options.ForwardedOptions = ForwardedHeaders.All;
});
app.UseStaticFiles();
// comment this out and you get an error saying
// InvalidOperationException: No authentication handler is configured to handle the scheme: Microsoft.AspNet.Identity.External
app.UseIdentity();
// Note: OpenIddict must be added after
// ASP.NET Identity and the external providers.
app.UseOpenIddict(options =>
{
// Need this line to use Bearer Authorization in requests
options.Options.AuthenticationScheme = OAuthValidationDefaults.AuthenticationScheme;
// development
options.Options.AllowInsecureHttp = true;
});
app.UseMvcWithDefaultRoute();
using (var context = app.ApplicationServices.GetRequiredService<ApplicationDbContext>()) {
context.Database.EnsureCreated();
// Add Mvc.Client to the known applications.
if (!context.Applications.Any()) {
context.Applications.Add(new Application {
Id = "myClient",
DisplayName = "My client application",
RedirectUri = "http://localhost:5000/signin",
LogoutRedirectUri = "http://localhost:5000/",
Secret = Crypto.HashPassword("secret_secret_secret"),
Type = OpenIddictConstants.ApplicationTypes.Confidential
});
context.SaveChanges();
}
}
}
I fetched the latest Openiddict-core repository sources and built the openiddict solution. I am getting the below errors in each project. I have the latest dnx 1.0.0-rc2-20221 clr x86 win available on my machine. I restored the nugets after clearing the catche .nuget\packages folders. Still i am getting the below errors. Could someone help me on whether i am missing something.
I also followed the steps mentioned in [http://stackoverflow.com/questions/35518616/how-do-you-troubleshoot-aspnet-core-missing-dependencies/35519150#35519150].
_Severity Code Description Project File Line Suppression State
Error CS0012 The type 'IList<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Core..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.Core\OpenIddictExtensions.cs 32 Active
Error CS0012 The type 'ICollection<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Core..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.Core\OpenIddictExtensions.cs 32 Active
Error CS0012 The type 'IEnumerable<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Core..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.Core\OpenIddictExtensions.cs 32 Active
Error CS0012 The type 'IEnumerable' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Core..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.Core\OpenIddictExtensions.cs 32 Active
Error CS0012 The type 'IList<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Core..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.Core\OpenIddictExtensions.cs 33 Active
Error CS0012 The type 'ICollection<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Core..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.Core\OpenIddictExtensions.cs 33 Active
Error CS0012 The type 'IEnumerable<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Core..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.Core\OpenIddictExtensions.cs 33 Active
Error CS0012 The type 'IEnumerable' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Core..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.Core\OpenIddictExtensions.cs 33 Active
Error CS0012 The type 'Type' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Core..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.Core\OpenIddictExtensions.cs 35 Active
Error CS0012 The type 'IList<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Core..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.Core\OpenIddictExtensions.cs 35 Active
Error CS0012 The type 'ICollection<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Core..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.Core\OpenIddictExtensions.cs 35 Active
Error CS0012 The type 'IEnumerable<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Core..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.Core\OpenIddictExtensions.cs 35 Active
Error CS0012 The type 'IEnumerable' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Core..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.Core\OpenIddictExtensions.cs 35 Active
Error CS0012 The type 'Type' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Core..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.Core\OpenIddictExtensions.cs 40 Active
Error CS0012 The type 'Func<,>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Core..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.Core\OpenIddictExtensions.cs 40 Active
Error CS0012 The type 'IList<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Core..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.Core\OpenIddictExtensions.cs 40 Active
Error CS0012 The type 'ICollection<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Core..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.Core\OpenIddictExtensions.cs 40 Active
Error CS0012 The type 'IEnumerable<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Core..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.Core\OpenIddictExtensions.cs 40 Active
Error CS0012 The type 'IEnumerable' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Core..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.Core\OpenIddictExtensions.cs 40 Active
Error CS0012 The type 'Type' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Core..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.Core\OpenIddictExtensions.cs 44 Active
Error CS0012 The type 'Func<,>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Core..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.Core\OpenIddictExtensions.cs 44 Active
Error CS0012 The type 'IList<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Core..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.Core\OpenIddictExtensions.cs 44 Active
Error CS0012 The type 'ICollection<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Core..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.Core\OpenIddictExtensions.cs 44 Active
Error CS0012 The type 'IEnumerable<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Core..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.Core\OpenIddictExtensions.cs 44 Active
Error CS0012 The type 'IEnumerable' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Core..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.Core\OpenIddictExtensions.cs 44 Active
Error CS0012 The type 'Type' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Core..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.Core\OpenIddictExtensions.cs 54 Active
Error CS0012 The type 'Func<,>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Core..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.Core\OpenIddictExtensions.cs 54 Active
Error CS0012 The type 'IList<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Core..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.Core\OpenIddictExtensions.cs 54 Active
Error CS0012 The type 'ICollection<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Core..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.Core\OpenIddictExtensions.cs 54 Active
Error CS0012 The type 'IEnumerable<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Core..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.Core\OpenIddictExtensions.cs 54 Active
Error CS0012 The type 'IEnumerable' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Core..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.Core\OpenIddictExtensions.cs 54 Active
Error CS0012 The type 'IList<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Core..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.Core\OpenIddictExtensions.cs 72 Active
Error CS0012 The type 'ICollection<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Core..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.Core\OpenIddictExtensions.cs 72 Active
Error CS0012 The type 'IEnumerable<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Core..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.Core\OpenIddictExtensions.cs 72 Active
Error CS0012 The type 'IEnumerable' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Core..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.Core\OpenIddictExtensions.cs 72 Active
Error CS0012 The type 'Type' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Core..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.Core\OpenIddictExtensions.cs 72 Active
Error CS0012 The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Core..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.Core\OpenIddictExtensions.cs 72 Active
Error CS0012 The type 'IList<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Core..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.Core\OpenIddictExtensions.cs 88 Active
Error CS0012 The type 'ICollection<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Core..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.Core\OpenIddictExtensions.cs 88 Active
Error CS0012 The type 'IEnumerable<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Core..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.Core\OpenIddictExtensions.cs 88 Active
Error CS0012 The type 'IEnumerable' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Core..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.Core\OpenIddictExtensions.cs 88 Active
Error CS0012 The type 'Type' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Core..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.Core\OpenIddictExtensions.cs 88 Active
Error CS0012 The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Core..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.Core\OpenIddictExtensions.cs 88 Active
Error CS0012 The type 'IServiceProvider' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.ComponentModel, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Core..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.Core\OpenIddictExtensions.cs 142 Active
Error CS0012 The type 'IServiceProvider' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.ComponentModel, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Core..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.Core\OpenIddictExtensions.cs 145 Active
Error CS0012 The type 'IServiceProvider' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.ComponentModel, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Core..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.Core\OpenIddictManager.cs 41 Active
Error CS0012 The type 'IServiceProvider' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.ComponentModel, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Core..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.Core\OpenIddictProvider.Authentication.cs 23 Active
Error CS0012 The type 'IServiceProvider' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.ComponentModel, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Core..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.Core\OpenIddictProvider.Authentication.cs 139 Active
Error CS0012 The type 'IServiceProvider' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.ComponentModel, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Core..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.Core\OpenIddictProvider.Exchange.cs 23 Active
Error CS0012 The type 'IServiceProvider' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.ComponentModel, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Core..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.Core\OpenIddictProvider.Exchange.cs 98 Active
Error CS0012 The type 'IServiceProvider' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.ComponentModel, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Core..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.Core\OpenIddictProvider.Exchange.cs 128 Active
Error CS0012 The type 'IServiceProvider' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.ComponentModel, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Core..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.Core\OpenIddictProvider.Exchange.cs 129 Active
Error CS0012 The type 'IServiceProvider' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.ComponentModel, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Core..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.Core\OpenIddictProvider.Exchange.cs 173 Active
Error CS0012 The type 'IServiceProvider' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.ComponentModel, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Core..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.Core\OpenIddictProvider.Introspection.cs 20 Active
Error CS0012 The type 'IServiceProvider' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.ComponentModel, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Core..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.Core\OpenIddictProvider.Introspection.cs 75 Active
Error CS0012 The type 'IServiceProvider' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.ComponentModel, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Core..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.Core\OpenIddictProvider.Introspection.cs 76 Active
Error CS0012 The type 'IServiceProvider' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.ComponentModel, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Core..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.Core\OpenIddictProvider.Session.cs 16 Active
Error CS0012 The type 'IServiceProvider' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.ComponentModel, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Core..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.Core\OpenIddictProvider.Userinfo.cs 19 Active
Error CS0012 The type 'IServiceProvider' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.ComponentModel, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Core..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.Core\OpenIddictServices.cs 27 Active
Error CS0012 The type 'IServiceProvider' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.ComponentModel, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Core..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.Core\OpenIddictServices.cs 34 Active
Error CS0012 The type 'IServiceProvider' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.ComponentModel, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Core..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.Core\OpenIddictServices.cs 41 Active
Error CS0012 The type 'IServiceProvider' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.ComponentModel, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Core..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.Core\OpenIddictServices.cs 53 Active
Error CS0012 The type 'IServiceProvider' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.ComponentModel, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Core..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.Core\OpenIddictServices.cs 60 Active
Error CS0012 The type 'IServiceProvider' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.ComponentModel, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Core..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.Core\OpenIddictServices.cs 67 Active
Error CS0012 The type 'Assembly' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Reflection, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Assets..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.Assets\OpenIddictExtensions.cs 20 Active
Error CS0012 The type 'Type' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.EF..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.EF\OpenIddictExtensions.cs 30 Active
Error CS0012 The type 'IList<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.EF..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.EF\OpenIddictExtensions.cs 30 Active
Error CS0012 The type 'ICollection<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.EF..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.EF\OpenIddictExtensions.cs 30 Active
Error CS0012 The type 'IEnumerable<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.EF..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.EF\OpenIddictExtensions.cs 30 Active
Error CS0012 The type 'IEnumerable' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.EF..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.EF\OpenIddictExtensions.cs 30 Active
Error CS0012 The type 'IList<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.EF..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.EF\OpenIddictExtensions.cs 43 Active
Error CS0012 The type 'ICollection<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.EF..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.EF\OpenIddictExtensions.cs 43 Active
Error CS0012 The type 'IEnumerable<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.EF..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.EF\OpenIddictExtensions.cs 43 Active
Error CS0012 The type 'IEnumerable' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.EF..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.EF\OpenIddictExtensions.cs 43 Active
Error CS0012 The type 'Func<,>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Mvc..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.Mvc\OpenIddictController.cs 67 Active
Error CS0012 The type 'IServiceProvider' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.ComponentModel, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Mvc..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.Mvc\OpenIddictExtensions.cs 53 Active
Error CS0012 The type 'IList<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Mvc..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.Mvc\OpenIddictExtensions.cs 55 Active
Error CS0012 The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Mvc..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.Mvc\OpenIddictExtensions.cs 68 Active
Error CS0012 The type 'Assembly' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Reflection, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Mvc..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.Mvc\OpenIddictExtensions.cs 68 Active
Error CS0012 The type 'Type' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Mvc..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.Mvc\OpenIddictExtensions.cs 74 Active
Error CS0012 The type 'IList<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Mvc..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.Mvc\OpenIddictExtensions.cs 74 Active
Error CS0012 The type 'Type' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Mvc..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.Mvc\OpenIddictExtensions.cs 84 Active
Error CS0012 The type 'IList<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Mvc..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.Mvc\OpenIddictExtensions.cs 84 Active
Error CS0012 The type 'Type' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Mvc..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.Mvc\OpenIddictExtensions.cs 94 Active
Error CS0012 The type 'IList<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Mvc..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.Mvc\OpenIddictExtensions.cs 94 Active
Error CS0012 The type 'Type' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Mvc..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.Mvc\OpenIddictExtensions.cs 104 Active
Error CS0012 The type 'IList<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Mvc..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.Mvc\OpenIddictExtensions.cs 104 Active
Error CS0012 The type 'Type' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Mvc..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.Mvc\OpenIddictExtensions.cs 114 Active
Error CS0012 The type 'IList<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Mvc..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.Mvc\OpenIddictExtensions.cs 114 Active
Error CS0012 The type 'Type' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Mvc..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.Mvc\OpenIddictExtensions.cs 124 Active
Error CS0012 The type 'IList<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Mvc..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.Mvc\OpenIddictExtensions.cs 124 Active
Error CS0012 The type 'Type' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Mvc..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.Mvc\OpenIddictExtensions.cs 134 Active
Error CS0012 The type 'IList<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Mvc..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.Mvc\OpenIddictExtensions.cs 134 Active
Error CS0012 The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Mvc..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\src\OpenIddict.Mvc\OpenIddictExtensions.cs 134 Active
Error CS0012 The type 'ValueType' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Security..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\external\NWebsec\Helpers\CspUpgradeHelper.cs 18 Active
Error CS0012 The type 'IList<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Security..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\external\NWebsec\Helpers\CspUpgradeHelper.cs 18 Active
Error CS0012 The type 'ICollection<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Security..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\external\NWebsec\Helpers\CspUpgradeHelper.cs 18 Active
Error CS0012 The type 'IEnumerable<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Security..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\external\NWebsec\Helpers\CspUpgradeHelper.cs 18 Active
Error CS0012 The type 'IEnumerable' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Security..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\external\NWebsec\Helpers\CspUpgradeHelper.cs 18 Active
Error CS0012 The type 'IReadOnlyList<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Security..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\external\NWebsec\Helpers\CspUpgradeHelper.cs 18 Active
Error CS0012 The type 'IReadOnlyCollection<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Security..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\external\NWebsec\Helpers\CspUpgradeHelper.cs 18 Active
Error CS0012 The type 'IEquatable<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Security..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\external\NWebsec\Helpers\CspUpgradeHelper.cs 18 Active
Error CS0012 The type 'ValueType' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Security..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\external\NWebsec\Helpers\CspUpgradeHelper.cs 18 Active
Error CS0012 The type 'ValueType' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. OpenIddict.Security..NET Framework 4.5.1 E:\Learning\Learning-Security\openiddict-core\external\NWebsec\Middleware\RedirectValidationMiddleware.cs 36 Active
Error CS0012 The type 'IServiceProvider' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.ComponentModel, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. Mvc.Client.DNX 4.5.1 E:\Learning\Learning-Security\openiddict-core\samples\Mvc.Client\Startup.cs 34 Active
Error CS0012 The type 'IServiceProvider' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.ComponentModel, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. Mvc.Server.DNX 4.5.1 E:\Learning\Learning-Security\openiddict-core\samples\Mvc.Server\Startup.cs 57 Active
Error CS0012 The type 'IServiceProvider' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.ComponentModel, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. Mvc.Server.DNX 4.5.1 E:\Learning\Learning-Security\openiddict-core\samples\Mvc.Server\Startup.cs 118 Active_
We should update OpenIddictManager
and/or OpenIddictProvider
to log important events, like ASP.NET Identity does: https://github.com/aspnet/Identity/blob/dev/src/Microsoft.AspNetCore.Identity/UserManager.cs#L586
Tried restoring my dependencies today, using dnu restore
and option via visual studio, but i seem to get this error?
I have noticed that the readme file has changed, and the nuget.config file sources have changed to include
<add key="AspNetCiDev" value="https://www.myget.org/F/aspnetcidev/api/v3/index.json" />
If i remove this, then my project cant find these dependencies, but if i include it i get the error below...?
I am using dnvm 1.0.0-rc2-16357 x64
NotFound https://dotnet.myget.org/F/dotnet-core/api/v3/flatcontainer/microsoft.aspnetcore.mvc/index.json 1546ms
Unable to locate Dependency Microsoft.AspNetCore.Authentication >= 1.0.0-rc2-16366
Unable to locate Dependency Microsoft.Extensions.FileProviders.Embedded >= 1.0.0-rc2-16053
Unable to locate Dependency Microsoft.AspNetCore.StaticFiles >= 1.0.0-rc2-16273
Unable to locate Dependency Microsoft.AspNetCore.Identity >= 1.0.0-rc2-16470
Unable to locate Dependency Microsoft.AspNetCore.Cors >= 1.0.0-rc2-16264
Unable to locate Dependency Microsoft.Extensions.Caching.Memory >= 1.0.0-rc2-16131
Unable to locate Dependency Microsoft.Extensions.Configuration >= 1.0.0-rc2-16090
Unable to locate Dependency Microsoft.AspNetCore.Authentication >= 1.0.0-rc2-16397
Unable to locate Dependency Microsoft.Extensions.Logging.Abstractions >= 1.0.0-rc2-16110
Unable to locate Dependency Microsoft.Extensions.Caching.Abstractions >= 1.0.0-rc2-16131
Unable to locate Dependency Microsoft.AspNetCore.Hosting.Abstractions >= 1.0.0-rc2-16343
Unable to locate Dependency Microsoft.AspNetCore.Identity.EntityFrameworkCore >= 1.0.0-rc2-16470
Unable to locate Dependency Microsoft.Extensions.FileProviders.Composite >= 1.0.0-rc2-16053
Unable to locate Dependency Microsoft.AspNetCore.Hosting >= 1.0.0-rc2-16297
Unable to locate Dependency Microsoft.AspNetCore.Mvc >= 1.0.0-rc2-17094
Writing lock file E:\github\unite\src\m2i.Unite.Web\project.lock.json
Restore complete, 11414ms elapsedErrors in E:\github\unite\src\m2i.Unite.Web\project.json
Unable to locate Dependency Microsoft.AspNetCore.Authentication >= 1.0.0-rc2-16366
Unable to locate Dependency Microsoft.Extensions.FileProviders.Embedded >= 1.0.0-rc2-16053
Unable to locate Dependency Microsoft.AspNetCore.StaticFiles >= 1.0.0-rc2-16273
Unable to locate Dependency Microsoft.AspNetCore.Identity >= 1.0.0-rc2-16470
Unable to locate Dependency Microsoft.AspNetCore.Cors >= 1.0.0-rc2-16264
Unable to locate Dependency Microsoft.Extensions.Caching.Memory >= 1.0.0-rc2-16131
Unable to locate Dependency Microsoft.Extensions.Configuration >= 1.0.0-rc2-16090
Unable to locate Dependency Microsoft.AspNetCore.Authentication >= 1.0.0-rc2-16397
Unable to locate Dependency Microsoft.Extensions.Logging.Abstractions >= 1.0.0-rc2-16110
Unable to locate Dependency Microsoft.Extensions.Caching.Abstractions >= 1.0.0-rc2-16131
Unable to locate Dependency Microsoft.AspNetCore.Hosting.Abstractions >= 1.0.0-rc2-16343
Unable to locate Dependency Microsoft.AspNetCore.Identity.EntityFrameworkCore >= 1.0.0-rc2-16470
Unable to locate Dependency Microsoft.Extensions.FileProviders.Composite >= 1.0.0-rc2-16053
Unable to locate Dependency Microsoft.AspNetCore.Hosting >= 1.0.0-rc2-16297
Unable to locate Dependency Microsoft.AspNetCore.Mvc >= 1.0.0-rc2-17094
Please advise
System.ArgumentException: More than one runtime.json file has declared imports for 'win7-x86'
Parameter name: runtimeName
at Microsoft.Dnx.Tooling.RestoreCommand.FindRuntimeDependencies(String runtimeName, List1 runtimeFiles, Dictionary
2
effectiveRuntimeSpecs, HashSet1 allRuntimeNames, Func
2 circularImport)
at Microsoft.Dnx.Tooling.RestoreCommand.FindRuntimeDependencies(String runtimeName, List1 runtimeFiles, Dictionary
2
effectiveRuntimeSpecs, HashSet`1 allRuntimeNames)
at Microsoft.Dnx.Tooling.RestoreCommand.d__69.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Dnx.Tooling.RestoreCommand.<>c__DisplayClass68_0.<b__2>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)at Microsoft.Dnx.Tooling.RestoreCommand.d__68.MoveNext()
Restore failed
More than one runtime.json file has declared imports for 'win7-x86'
Parameter name: runtimeName
I fetched the latest Openiddict-core repository sources and built the openiddict solution. I am getting the below error in each project.
Error NU1008 "netstandard1.3" is an unsupported framework.
I ran the dnvm upgrade and also I have the dnx 1.0.0-rc2-16551 clr x86 win set as default on my machine. Still the same error.
I am i missing some settings to successfully build this solution?
Please suggest if there are any environmental settings or guidelines that I need to follow to build the repository successfully on my machine ? This will make us save lot of time.
I noticed that you removed CryptoHelper from the project. Is there any issue you ran into? I've just deployed a new version using the latest RC2 bits: https://www.nuget.org/packages/CryptoHelper/1.0.0-rc2-build02.
Hi! Thank you for the effort you put on the project!
I am trying to achieve some sort of architecture like on the picture, which eventually will have to become on premise multiuser system.
There will be any number of services which may or may not talk to each other.
WebAPIs will be consumed by different of type clients.
Clients should talk to services only.
Communication channel is standard REST.
To access different resources of those APIs they have to provide identity, which will be authorized per WebAPI basis.
To get such identity they will access API on the service which will translate the request to the IdentityProvider.
The IdentityProvider may have different sources to validate credentials - Local Users (from local DB), or ADFS connections.
The identity server will have an authentication entry point and based on the provided username it will redirect to the proper identity validator.
For example, if provided username is northwind\john it will try to validate the credentials in northwind domain. If everything is OK then the returned principal will be transformed in JWT token and returned to the WebAPI, which will return it to the client as an access token that will be used for resource access.
I am willing to use AspNet.Identity with EF to store users, their roles and such.
Obviously users should be managed on many places, but Identities and credentials only on one.
So the questions I am having are:
Any advices are also welcomed if you have any.
Since IdentityServer announced integration with AspNet.Identity and flawless integration with ASP.NET 5 I will ask there the same question too.
Regards,
Daniel
A public client needs to send the client_id and client_secret in order to refresh a token. It would be much better to relax this constraint and let the refresh token be used without needing to send this information, or using workarounds like hidden frames and cookies, etc.
I've cloned the current version of OpenIddict, and have installed the latest dnx 1.0.0-rc2-20222 clr x86 win. The projects all compile successfully, however I'm encountering a runtime error:
An exception of type 'System.Security.Cryptography.CryptographicException' occurred in Microsoft.AspNetCore.DataProtection.dll but was not handled in user code
// Add OpenIdConnectServerMiddleware to the ASP.NET 5 pipeline.
builder.AddModule("ASOS", 0, map => map.UseOpenIdConnectServer(builder.Options));
I've attempted to also compile capesean's openiddict-test, and my own RC2 development, and in each case I receive the same runtime exception.
Have I missed an assembly or neglected to update some references in the project?
We should provide a UI to manage users out of the box.
User creation, listing, editing, claims inspection/modification, revocation, token issued, etc.
Unable to locate Dependency Microsoft.Extensions.DependencyModel >= 1.0.0-dev-1452673922
That's following the Readme guide.
I have finally got my application running on rc2 (brand new web application so i can test your software).
Now i have followed all the steps on the readme and my project builds. Problem is that this run in my startup.cs file is causing an error.
if (!context.Applications.Any())
When this line executes my sql database is created, but the Application table is completely missing? I have deleted my database and started again multiple times, but it never gets created. I have tried both database setup options, inheriting from OpenIddictContext
and including the Application DbSet on an existing IdentityDbContext
object. Neither seem to work??
I am using SQLServer, here is an example of my connectionString, which i believe is fine
"ConnectionString": "Server=(local);Database=OpenIdDictDb;Trusted_Connection=True;"
Here is an image of my database tables, as you can see the Application table is not created.
https://tools.ietf.org/html/rfc6749#section-4.4
ASOS exposes a GrantClientCredentials
method in OpenIdConnectServerProvider
for this exact scenario.
ASOS now supports userinfo requests: aspnet-contrib/AspNet.Security.OpenIdConnect.Server#97
In the current bits, the CORS support is far too large (we use wildcards everywhere ๐) and needs to be fully re-worked.
I'm not sure if anyone else is having the same issue but the solution doesn't build for me. I've run dnvm upgrade -u
and dnvm list
is showing me as running 1.0.0-rc2-16357 clr x86 win
with that being the default alias.
When I try to build the solution I get a lot of errors which may be due to breaking changes in the RC2 nightlies. I was just wondering if anyone else was experiencing the same issue? One example of compilation error is this:
options.FileProvider = new CompositeFileProvider(
options.FileProvider,
new EmbeddedFileProvider(
assembly: typeof(OpenIddictController<,>).GetTypeInfo().Assembly,
baseNamespace: typeof(OpenIddictController<,>).Namespace));
That no longer works and has to be changed to this:
options.FileProviders.Add(new EmbeddedFileProvider(
assembly: typeof (OpenIddictController<,>).GetTypeInfo().Assembly,
baseNamespace: typeof (OpenIddictController<,>).Namespace));
@PinpointTownes I would like to suggest renaming OpenIddict.Models.Application.ApplicationID to OpenIddict.Models.Application.Id to allow for better inheritance in EF. If I name my class something different (MyApplication), then I can't use ApplicationID as the EF id because EF expects it to be named either "Id" or "MyApplicationId". There is an annotation you can put on the field to tell it which one to use, but that would have to be done on the parent class (Application) or overridden, and isn't as pretty or concise.
This has caused me a right headache, but there seems to be a problem with OpenIddict. I added all this code to my application, and it worked perfectly using the dnx web
command, and also if i run my code using IISExpress. But if i upload this to my web server running IIS, the site never loaded.
My site is setup, like a normal basic site, i have an applicationPool which is running using the IIS POOL/XXX account specific for that site.
The reason that the site never loaded, was because OpenIddict, seems to create a [GUID].key file in the wwwroot of the published site. Because my IISPOOL/XXX user doesnt have write permission to the wwwroot folder (which i dont think it should), this process failed.
Have i setup something wrong? Should i have stated something in my startup.cs file to write this file to another place??
Definitely something we'll want to implement when aspnet-contrib/AspNet.Security.OpenIdConnect.Server#181 is done ๐
OpenIddictProviderand
OpenIddictControllerwill have to be updated to automatically add the security stamp to the authentication tickets they issue and
GrantRefreshToken` will be implemented to reject the refresh token requests that uses revoked security stamps.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.