selfer.blogg.se

Azure b2c login
Azure b2c login








azure b2c login

List ssoSettings = _ssoConfigurationRepository.GetAllSettings() Īpp.UseOpenIdConnectAuthentication(CreateOptionsFromSiteConfig(config)) TicketDataFormat = new TicketDataFormat(new MachineKeyProtector()) // In order to be able to decrypt the authentication ticket stored in the cookie later on, we use protection based on the machine key.

azure b2c login

After successful sign-in in SSO, the redirect back to this web site will use the cookie authentication middleware to contain the obtained id_token.Īpp.SetDefaultSignInAsAuthenticationType(CookieAuthenticationDefaults.AuthenticationType) Īpp.UseCookieAuthentication(new CookieAuthenticationOptions()ĬookieName = SsoConfiguration.SsoCookieName,ĬookiePath = _ssoAuthenticationRootPath, // Scope cookies to the authentication root path in order to avoid having the cookie included in every normal request.

azure b2c login

Private void ConfigureSsoAuthentication(IAppBuilder app) AadInstance=" + _aadInstance + " and Tenant=" + _tenant) SsoLogger.Info("Owin Startup configuration done. Public void ConfigureAuth(IAppBuilder app)Īpp.Map(_ssoAuthenticationRootPath, ConfigureSsoAuthentication) Public override void Process(InitializeArgs args) Private readonly ISsoConfigurationRepository _ssoConfigurationRepository Private readonly string _tenant = SsoConfiguration.Tenant Private readonly string _aadInstance = SsoConfiguration.AadInstance Private readonly string _ssoAuthenticationRootPath = ("AuthRoute", "auth/sso/") Īnd the pipeline that registers my Owin setup: public class RegisterOwinAuthPipeline : InitializeProcessor I have only been able to find examples of how to add federated authentication for Sitecore accountsĬode for auth-route: public virtual void Process(PipelineArgs args) We want to allow our endusers to login to our website using an Azure B2C AD account.










Azure b2c login