mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-09-26 03:18:47 +02:00
Ref: https://github.com/notepad-plus-plus/notepad-plus-plus/issues/3643#issuecomment-1455254475 Close #16386
56 lines
2.0 KiB
Plaintext
56 lines
2.0 KiB
Plaintext
using System;
|
|
using System.Collections.Generic;
|
|
using System.Configuration;
|
|
using System.Globalization;
|
|
using System.Linq;
|
|
using System.Web;
|
|
using Owin;
|
|
using Microsoft.Owin.Security;
|
|
using Microsoft.Owin.Security.Cookies;
|
|
using Microsoft.Owin.Security.OpenIdConnect;
|
|
|
|
namespace $OwinNamespace$
|
|
{
|
|
// check if comments are causing parsing problems
|
|
/* check if comments are causing parsing problems
|
|
check if comments are causing parsing problems
|
|
*/
|
|
public partial class $OwinClass$
|
|
{
|
|
// check if comments are causing parsing problems
|
|
/* check if comments are causing parsing problems
|
|
check if comments are causing parsing problems
|
|
*/
|
|
private static string clientId = ConfigurationManager.AppSettings["ida:ClientId"];
|
|
private static string aadInstance = ConfigurationManager.AppSettings["ida:AADInstance"];
|
|
private static string tenantId = ConfigurationManager.AppSettings["ida:TenantId"];
|
|
private static string postLogoutRedirectUri = ConfigurationManager.AppSettings["ida:PostLogoutRedirectUri"];
|
|
private static string authority = aadInstance + tenantId;
|
|
|
|
public void ConfigureAuth(IAppBuilder app)
|
|
{
|
|
app.SetDefaultSignInAsAuthenticationType(CookieAuthenticationDefaults.AuthenticationType);
|
|
|
|
app.UseCookieAuthentication(new CookieAuthenticationOptions());
|
|
|
|
// check if comments are causing parsing problems
|
|
/* check if comments are causing parsing problems
|
|
check if comments are causing parsing problems
|
|
*/
|
|
|
|
app.UseOpenIdConnectAuthentication(
|
|
new OpenIdConnectAuthenticationOptions
|
|
{
|
|
ClientId = clientId,
|
|
Authority = authority,
|
|
PostLogoutRedirectUri = postLogoutRedirectUri
|
|
});
|
|
}
|
|
}
|
|
}
|
|
|
|
// check if comments are causing parsing problems
|
|
/* check if comments are causing parsing problems
|
|
check if comments are causing parsing problems
|
|
*/
|