Search Results :
×Blazor SAML Single Sign-On (SSO) application gives the ability to enable SAML Single Sign-On for your Blazor applications. Using Single Sign-On you can use only one password to access your Blazor application and services. Our application is compatible with all the SAML compliant Identity providers. Here we will go through a step-by-step guide to configure Single Sign-On (SSO) between Blazor and Microsoft Entra ID (formerly Azure AD) considering Azure AD as IdP. To know more about the features we provide for Blazor SSO, click here.
using miniorange.saml public class Startup { public void ConfigureServices(IServiceCollection services) { services.AddAuthentication(CookieAuthenticationDefaults.AuthenticationScheme).AddCookie(); services.AddControllersWithViews(); } public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory) { app.UseHttpsRedirection(); app.UseRouting(); app.UseAuthorization(); app.MapRazorPages(); app.UseCookiePolicy(); app.UseAuthentication(); app.UseStaticFiles(); app.UseminiOrangeSAMLSSOMiddleware(); app.Run(); } }
using Microsoft.AspNetCore.Authentication.Cookies; using miniOrange.saml; var builder = WebApplication.CreateBuilder(args); builder.Services.AddRazorPages(); // Add authentication services builder.Services.AddControllersWithViews(); builder.Services.AddAuthentication(CookieAuthenticationDefaults.AuthenticationScheme).AddCookie(); var app = builder.Build(); if (!app.Environment.IsDevelopment()) { app.UseExceptionHandler("/Error"); app.UseHsts(); } app.UseHttpsRedirection(); app.UseRouting(); app.UseAuthorization(); app.MapRazorPages(); app.UseCookiePolicy(); app.UseAuthentication(); app.UseStaticFiles(); app.UseminiOrangeSAMLSSOMiddleware(); app.Run();
https://<blazor-application-base-url>/?ssoaction=config
There are two ways detailed below with which you can get the SAML SP metadata to configure onto your identity provider end.
You have successfully configured Microsoft Entra ID (formerly Azure AD) as SAML IDP (Identity Provider) for achieving Blazor Single Sign-On (SSO).
NOTE: Please ensure that the SP Entity ID value from the Service Provider Metadata tab doesn't have a trailing slash('/'). If SP Entity ID has a trailing slash then update it by removing the trailing slash from the SP EntityID / Issuer field under the Service Provider Metadata tab of the plugin, enter the updated value at Azure and click on the Save button.
You have successfully configured Microsoft Entra ID (formerly Azure AD) as SAML IdP ( Identity Provider) for achieving Azure AD SSO login into your Blazor application.
There are two ways detailed below with which you can configure your SAML identity provider metadata in the application.
string name=""; string claimtype=""; string claimvalue=""; if(User.Identity.IsAuthenticated) { foreach( var claim in User.Claims) { claimtype = claim.Type; claimvalue = claim.Value; } retrive custom attributes(for eg. Retrieve Mapped 'mobileNumber' attribute of your IDP) var identity = (ClaimsIdentity)User.Identity; IEnumerable claims = identity.Claims; string mobileNumber = identity.FindFirst("mobileNumber")?.Value; }
https://blazor-application-base-url/?ssoaction=login
<a href=”https://blazor-application-base-url/?ssoaction=login”>Log
in</a>
https://blazor-application-base-url/?ssoaction=logout
<a href=”https://blazor-application-base-url/?ssoaction=logout”>Log
out</a>
To configure your IDP, you can find the service provider's metadata in appsetting.json file. For SP metadata, you can refer to the screenshot below:
From miniOrange section, copy spentityid, acsurl and provide it to your identity provider's team.
idp_cert | Enter the IDP certificate against this field |
ssourl | Enter the SSO URL against this field |
idp_issuer | Enter the IDP Issuer against this field |
string name="";
string claimtype="";
string claimvalue="";
if(User.Identity.IsAuthenticated) {
name= User.Identity.Name;
foreach( var claim in User.Claims) {
claimtype = claim.Type;
claimValue = claim.Value;
}
}
You can configure the Blazor SAML 2.0 Single Sign-On (SSO) application with any Identity Provider such as ADFS, Microsoft Entra ID (formerly Azure AD), Bitium, Centrify, G Suite, JBoss Keycloak, Okta, OneLogin, Salesforce, AWS Cognito, OpenAM, Oracle, PingFederate, PingOne, RSA SecureID, Shibboleth-2, Shibboleth-3, SimpleSAML, WSO2 or even with your own custom identity provider. Check the list of identity providers here.
Not able to find your identity provider? Mail us on aspnetsupport@xecurify.com and we'll help you set up SSO with your IDP and for quick guidance (via email/meeting) on your requirement and our team will help you to select the best suitable solution/plan as per your requirement.
Need Help? We are right here!
Thanks for your inquiry.
If you dont hear from us within 24 hours, please feel free to send a follow up email to info@xecurify.com
This privacy statement applies to miniorange websites describing how we handle the personal information. When you visit any website, it may store or retrieve the information on your browser, mostly in the form of the cookies. This information might be about you, your preferences or your device and is mostly used to make the site work as you expect it to. The information does not directly identify you, but it can give you a more personalized web experience. Click on the category headings to check how we handle the cookies. For the privacy statement of our solutions you can refer to the privacy policy.
Necessary cookies help make a website fully usable by enabling the basic functions like site navigation, logging in, filling forms, etc. The cookies used for the functionality do not store any personal identifiable information. However, some parts of the website will not work properly without the cookies.
These cookies only collect aggregated information about the traffic of the website including - visitors, sources, page clicks and views, etc. This allows us to know more about our most and least popular pages along with users' interaction on the actionable elements and hence letting us improve the performance of our website as well as our services.