You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 24, 2020. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+100-94
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
AspNet.Security.OpenIdConnect.Server
2
2
==================================
3
3
4
-
**AspNet.Security.OpenIdConnect.Server** is an **advanced OAuth2/OpenID Connect server framework** for both ASP.NET Core 1.0 (previously known as ASP.NET 5) and OWIN/Katana, designed to offer a low-level, protocol-first approach.
4
+
**AspNet.Security.OpenIdConnect.Server** is an **advanced OAuth2/OpenID Connect server framework** for both ASP.NET Core 1.x/2.x and OWIN/Katana 3.x/4.x, designed to offer a low-level, protocol-first approach.
5
5
6
6
**The latest official release can be found on [NuGet](https://www.nuget.org/packages/AspNet.Security.OpenIdConnect.Server) and the nightly builds on [MyGet](https://www.myget.org/gallery/aspnet-contrib)**.
Based on `OAuthAuthorizationServerMiddleware` from **Katana 3**, **AspNet.Security.OpenIdConnect.Server** exposes similar primitives and can be directly registered in **Startup.cs** using the `UseOpenIdConnectServer` extension method:
13
+
Based on `OAuthAuthorizationServerMiddleware` from **Katana**, **AspNet.Security.OpenIdConnect.Server** exposes similar primitives and can be directly registered in **Startup.cs** using the `UseOpenIdConnectServer` extension method:
// Call SetScopes with the list of scopes you want to grant
100
+
// (specify offline_access to issue a refresh token).
101
+
ticket.SetScopes(
102
+
OpenIdConnectConstants.Scopes.Profile,
103
+
OpenIdConnectConstants.Scopes.OfflineAccess);
104
+
105
+
context.Validate(ticket);
106
+
}
107
+
108
+
returnTask.CompletedTask;
109
+
};
110
+
});
111
+
}
109
112
```
110
113
111
-
> Note: in order for the OpenID Connect server middleware to work properly, **the authentication services must be registered in the DI container**:
114
+
> Note: in order for the OpenID Connect server to work properly, **the authentication middleware must be registered in the ASP.NET Core 2.0 pipeline**:
> Note: **the AspNet.Security.OpenIdConnect.Server 2.x packages are only compatible with ASP.NET Core 2.x**.
124
+
> If your application targets ASP.NET Core 1.x, use the AspNet.Security.OpenIdConnect.Server 1.x packages.
125
+
120
126
## Resources
121
127
122
128
**Looking for additional resources to help you get started?** Don't miss these interesting blog posts:
@@ -127,9 +133,9 @@ public void ConfigureServices(IServiceCollection services)
127
133
128
134
The samples found [in the current project](./samples/) directory always target the latest ASP.NET Core releases and are mainly meant to ease its testing.
129
135
130
-
**Official samples targetting ASP.NET Core 1.0 RTM** can be found on [aspnet-contrib/AspNet.Security.OpenIdConnect.Samples](https://github.com/aspnet-contrib/AspNet.Security.OpenIdConnect.Samples).
136
+
**Official samples targetting ASP.NET Core** can be found on [aspnet-contrib/AspNet.Security.OpenIdConnect.Samples](https://github.com/aspnet-contrib/AspNet.Security.OpenIdConnect.Samples).
131
137
132
-
**Looking for something simpler?** Don't miss **[OpenIddict](https://github.com/openiddict/core)**, the **simple and easy-to-use OpenID Connect server for ASP.NET Core 1.0** based on AspNet.Security.OpenIdConnect.Server and ASP.NET Core Identity.
138
+
**Looking for something simpler?** Don't miss **[OpenIddict](https://github.com/openiddict/core)**, the **simple and easy-to-use OpenID Connect server for ASP.NET Core 1.x and 2.0** based on AspNet.Security.OpenIdConnect.Server.
0 commit comments