From 5589a8cc444092fe758034d2b0e632afacd9e26d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Chalet?= Date: Tue, 25 Oct 2016 00:06:16 +0200 Subject: [PATCH] Update README.md --- README.md | 13 ++++++++++++- samples/Mvc.Server/Startup.cs | 4 ++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 34f371e6..afbc838b 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,8 @@ To use OpenIddict, you need to: ```json "dependencies": { "AspNet.Security.OAuth.Validation": "1.0.0-alpha2-final", - "OpenIddict": "1.0.0-*" + "OpenIddict": "1.0.0-*", + "OpenIddict.Mvc": "1.0.0-*" } ``` @@ -70,6 +71,11 @@ public void ConfigureServices(IServiceCollection services) { // Register the OpenIddict services, including the default Entity Framework stores. services.AddOpenIddict() + // Register the ASP.NET Core MVC binder used by OpenIddict. + // Note: if you don't call this method, you won't be able to + // bind OpenIdConnectRequest or OpenIdConnectResponse parameters. + .AddMvcBinders() + // Enable the token endpoint (required to use the password flow). .EnableTokenEndpoint("/connect/token") @@ -135,6 +141,11 @@ The **Mvc.Server sample comes with an [`AuthorizationController` that supports b public void ConfigureServices(IServiceCollection services) { // Register the OpenIddict services, including the default Entity Framework stores. services.AddOpenIddict() + // Register the ASP.NET Core MVC binder used by OpenIddict. + // Note: if you don't call this method, you won't be able to + // bind OpenIdConnectRequest or OpenIdConnectResponse parameters. + .AddMvcBinders() + // Enable the authorization and token endpoints (required to use the code flow). .EnableAuthorizationEndpoint("/connect/authorize") .EnableTokenEndpoint("/connect/token") diff --git a/samples/Mvc.Server/Startup.cs b/samples/Mvc.Server/Startup.cs index ebb38ecc..00f290d0 100644 --- a/samples/Mvc.Server/Startup.cs +++ b/samples/Mvc.Server/Startup.cs @@ -62,13 +62,13 @@ namespace Mvc.Server { // You can generate a self-signed certificate using Pluralsight's self-cert utility: // https://s3.amazonaws.com/pluralsight-free/keith-brown/samples/SelfCert.zip // - // services.AddOpenIddict, ApplicationDbContext, Guid>() + // services.AddOpenIddict() // .AddSigningCertificate("7D2A741FE34CC2C7369237A5F2078988E17A6A75"); // // Alternatively, you can also store the certificate as an embedded .pfx resource // directly in this assembly or in a file published alongside this project: // - // services.AddOpenIddict, ApplicationDbContext, Guid>() + // services.AddOpenIddict() // .AddSigningCertificate( // assembly: typeof(Startup).GetTypeInfo().Assembly, // resource: "Mvc.Server.Certificate.pfx",