├── .gitattributes ├── LICENSE ├── README.md ├── _config.yml └── sso-connector ├── ACS.aspx ├── ACS.aspx.cs ├── ACS.aspx.designer.cs ├── Constants.cs ├── InvalidDataException.cs ├── MetaData.aspx ├── MetaData.aspx.cs ├── MetaData.aspx.designer.cs ├── Properties └── AssemblyInfo.cs ├── Saml.cs ├── Scripts ├── bootstrap.js ├── bootstrap.min.js ├── jquery-1.9.1.intellisense.js ├── jquery-1.9.1.js ├── jquery-1.9.1.min.js └── jquery-1.9.1.min.map ├── Web.Debug.config ├── Web.Release.config ├── Web.config ├── WebForm1.aspx ├── WebForm1.aspx.cs ├── WebForm1.aspx.designer.cs ├── WebForm2.aspx ├── WebForm2.aspx.cs ├── WebForm2.aspx.designer.cs ├── _header.Master ├── _header.Master.cs ├── _header.Master.designer.cs ├── bin ├── WebApplication1.dll ├── WebApplication1.dll.config └── WebApplication1.pdb ├── ciphertext.cs ├── config.ini ├── css ├── bootstrap-theme.css ├── bootstrap-theme.css.map ├── bootstrap-theme.min.css ├── bootstrap-theme.min.css.map ├── bootstrap.css ├── bootstrap.css.map ├── bootstrap.min.css ├── bootstrap.min.css.map └── main.css ├── example └── sso.aspx ├── fonts ├── glyphicons-halflings-regular.eot ├── glyphicons-halflings-regular.svg ├── glyphicons-halflings-regular.ttf ├── glyphicons-halflings-regular.woff └── glyphicons-halflings-regular.woff2 ├── how_to_setup.aspx ├── how_to_setup.aspx.cs ├── how_to_setup.aspx.designer.cs ├── image ├── add_app.png ├── alias.png ├── atrrbute.png ├── control.png ├── idp_set.png ├── loginsetup.png ├── logo-home.png ├── logo_large.png ├── logsetup.png ├── miniorange.png ├── right.png ├── savetest.png ├── setup_4.png ├── signup.png ├── sp_set.png └── wrong.png ├── include ├── css │ └── main.css └── js │ ├── bootstrap.min.js │ ├── jquery-3.2.1.min.js │ ├── main.js │ ├── plugins │ ├── bootstrap-datepicker.min.js │ ├── bootstrap-notify.min.js │ ├── chart.js │ ├── dataTables.bootstrap.min.js │ ├── fullcalendar.min.js │ ├── jquery-ui.custom.min.js │ ├── jquery.dataTables.min.js │ ├── jquery.vmap.min.js │ ├── jquery.vmap.sampledata.js │ ├── jquery.vmap.world.js │ ├── moment.min.js │ ├── pace.min.js │ ├── select2.min.js │ └── sweetalert.min.js │ └── popper.min.js ├── login_page.aspx ├── login_page.aspx.cs ├── login_page.aspx.designer.cs ├── loginsetup.aspx ├── loginsetup.aspx.cs ├── loginsetup.aspx.designer.cs ├── logout.aspx ├── logout.aspx.cs ├── logout.aspx.designer.cs ├── obj └── Debug │ ├── DesignTimeResolveAssemblyReferences.cache │ ├── DesignTimeResolveAssemblyReferencesInput.cache │ ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs │ ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs │ ├── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs │ ├── WebApplication1.csproj.FileListAbsolute.txt │ ├── WebApplication1.dll │ ├── WebApplication1.pdb │ ├── saml.csproj.CoreCompileInputs.cache │ ├── saml.csproj.FileListAbsolute.txt │ └── saml.csprojAssemblyReference.cache ├── packages.config ├── packages ├── bootstrap.3.3.7 │ ├── bootstrap.3.3.7.nupkg │ └── content │ │ ├── Content │ │ ├── bootstrap-theme.css │ │ ├── bootstrap-theme.css.map │ │ ├── bootstrap-theme.min.css │ │ ├── bootstrap-theme.min.css.map │ │ ├── bootstrap.css │ │ ├── bootstrap.css.map │ │ ├── bootstrap.min.css │ │ └── bootstrap.min.css.map │ │ ├── Scripts │ │ ├── bootstrap.js │ │ └── bootstrap.min.js │ │ └── fonts │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.svg │ │ ├── glyphicons-halflings-regular.ttf │ │ ├── glyphicons-halflings-regular.woff │ │ └── glyphicons-halflings-regular.woff2 └── jQuery.1.9.1 │ ├── Content │ └── Scripts │ │ ├── jquery-1.9.1-vsdoc.js │ │ ├── jquery-1.9.1.js │ │ ├── jquery-1.9.1.min.js │ │ └── jquery-1.9.1.min.map │ ├── Tools │ ├── common.ps1 │ ├── install.ps1 │ ├── jquery-1.9.1.intellisense.js │ └── uninstall.ps1 │ └── jQuery.1.9.1.nupkg ├── request.aspx ├── request.aspx.cs ├── request.aspx.designer.cs ├── saml.xml ├── setting.config ├── setup.aspx ├── setup.aspx.cs ├── setup.aspx.designer.cs ├── side_navigation_bar.aspx ├── side_navigation_bar1.aspx ├── side_navigation_bar1.aspx.cs ├── side_navigation_bar1.aspx.designer.cs └── signup_page.aspx /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | 6 | ############################################################################### 7 | # Set default behavior for command prompt diff. 8 | # 9 | # This is need for earlier builds of msysgit that does not have it on by 10 | # default for csharp files. 11 | # Note: This is only used by command line 12 | ############################################################################### 13 | *.cs diff=csharp 14 | 15 | ############################################################################### 16 | # Set the merge driver for project and solution files 17 | # 18 | # Merging from the command prompt will add diff markers to the files if there 19 | # are conflicts (Merging from VS is not affected by the settings below, in VS 20 | # the diff markers are never inserted). Diff markers may cause the following 21 | # file extensions to fail to load in VS. An alternative would be to treat 22 | # these files as binary and thus will always conflict and require user 23 | # intervention with every merge. To do so, just uncomment the entries below 24 | ############################################################################### 25 | *.sln merge=binary 26 | *.csproj merge=binary 27 | *.vbproj merge=binary 28 | *.vcxproj merge=binary 29 | *.vcproj merge=binary 30 | *.dbproj merge=binary 31 | *.fsproj merge=binary 32 | *.lsproj merge=binary 33 | *.wixproj merge=binary 34 | *.modelproj merge=binary 35 | *.sqlproj merge=binary 36 | *.wwaproj merge=binary 37 | 38 | ############################################################################### 39 | # behavior for image files 40 | # 41 | # image files are treated as binary by default. 42 | ############################################################################### 43 | *.jpg binary 44 | *.png binary 45 | *.gif binary 46 | 47 | ############################################################################### 48 | # diff behavior for common document formats 49 | # 50 | # Convert binary document formats to text before diffing them. This feature 51 | # is only available from the command line. Turn it on by uncommenting the 52 | # entries below. 53 | ############################################################################### 54 | *.doc diff=astextplain 55 | *.DOC diff=astextplain 56 | *.docx diff=astextplain 57 | *.DOCX diff=astextplain 58 | *.dot diff=astextplain 59 | *.DOT diff=astextplain 60 | *.pdf diff=astextplain 61 | *.PDF diff=astextplain 62 | *.rtf diff=astextplain 63 | *.RTF diff=astextplain -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU LESSER GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | 9 | This version of the GNU Lesser General Public License incorporates 10 | the terms and conditions of version 3 of the GNU General Public 11 | License, supplemented by the additional permissions listed below. 12 | 13 | 0. Additional Definitions. 14 | 15 | As used herein, "this License" refers to version 3 of the GNU Lesser 16 | General Public License, and the "GNU GPL" refers to version 3 of the GNU 17 | General Public License. 18 | 19 | "The Library" refers to a covered work governed by this License, 20 | other than an Application or a Combined Work as defined below. 21 | 22 | An "Application" is any work that makes use of an interface provided 23 | by the Library, but which is not otherwise based on the Library. 24 | Defining a subclass of a class defined by the Library is deemed a mode 25 | of using an interface provided by the Library. 26 | 27 | A "Combined Work" is a work produced by combining or linking an 28 | Application with the Library. The particular version of the Library 29 | with which the Combined Work was made is also called the "Linked 30 | Version". 31 | 32 | The "Minimal Corresponding Source" for a Combined Work means the 33 | Corresponding Source for the Combined Work, excluding any source code 34 | for portions of the Combined Work that, considered in isolation, are 35 | based on the Application, and not on the Linked Version. 36 | 37 | The "Corresponding Application Code" for a Combined Work means the 38 | object code and/or source code for the Application, including any data 39 | and utility programs needed for reproducing the Combined Work from the 40 | Application, but excluding the System Libraries of the Combined Work. 41 | 42 | 1. Exception to Section 3 of the GNU GPL. 43 | 44 | You may convey a covered work under sections 3 and 4 of this License 45 | without being bound by section 3 of the GNU GPL. 46 | 47 | 2. Conveying Modified Versions. 48 | 49 | If you modify a copy of the Library, and, in your modifications, a 50 | facility refers to a function or data to be supplied by an Application 51 | that uses the facility (other than as an argument passed when the 52 | facility is invoked), then you may convey a copy of the modified 53 | version: 54 | 55 | a) under this License, provided that you make a good faith effort to 56 | ensure that, in the event an Application does not supply the 57 | function or data, the facility still operates, and performs 58 | whatever part of its purpose remains meaningful, or 59 | 60 | b) under the GNU GPL, with none of the additional permissions of 61 | this License applicable to that copy. 62 | 63 | 3. Object Code Incorporating Material from Library Header Files. 64 | 65 | The object code form of an Application may incorporate material from 66 | a header file that is part of the Library. You may convey such object 67 | code under terms of your choice, provided that, if the incorporated 68 | material is not limited to numerical parameters, data structure 69 | layouts and accessors, or small macros, inline functions and templates 70 | (ten or fewer lines in length), you do both of the following: 71 | 72 | a) Give prominent notice with each copy of the object code that the 73 | Library is used in it and that the Library and its use are 74 | covered by this License. 75 | 76 | b) Accompany the object code with a copy of the GNU GPL and this license 77 | document. 78 | 79 | 4. Combined Works. 80 | 81 | You may convey a Combined Work under terms of your choice that, 82 | taken together, effectively do not restrict modification of the 83 | portions of the Library contained in the Combined Work and reverse 84 | engineering for debugging such modifications, if you also do each of 85 | the following: 86 | 87 | a) Give prominent notice with each copy of the Combined Work that 88 | the Library is used in it and that the Library and its use are 89 | covered by this License. 90 | 91 | b) Accompany the Combined Work with a copy of the GNU GPL and this license 92 | document. 93 | 94 | c) For a Combined Work that displays copyright notices during 95 | execution, include the copyright notice for the Library among 96 | these notices, as well as a reference directing the user to the 97 | copies of the GNU GPL and this license document. 98 | 99 | d) Do one of the following: 100 | 101 | 0) Convey the Minimal Corresponding Source under the terms of this 102 | License, and the Corresponding Application Code in a form 103 | suitable for, and under terms that permit, the user to 104 | recombine or relink the Application with a modified version of 105 | the Linked Version to produce a modified Combined Work, in the 106 | manner specified by section 6 of the GNU GPL for conveying 107 | Corresponding Source. 108 | 109 | 1) Use a suitable shared library mechanism for linking with the 110 | Library. A suitable mechanism is one that (a) uses at run time 111 | a copy of the Library already present on the user's computer 112 | system, and (b) will operate properly with a modified version 113 | of the Library that is interface-compatible with the Linked 114 | Version. 115 | 116 | e) Provide Installation Information, but only if you would otherwise 117 | be required to provide such information under section 6 of the 118 | GNU GPL, and only to the extent that such information is 119 | necessary to install and execute a modified version of the 120 | Combined Work produced by recombining or relinking the 121 | Application with a modified version of the Linked Version. (If 122 | you use option 4d0, the Installation Information must accompany 123 | the Minimal Corresponding Source and Corresponding Application 124 | Code. If you use option 4d1, you must provide the Installation 125 | Information in the manner specified by section 6 of the GNU GPL 126 | for conveying Corresponding Source.) 127 | 128 | 5. Combined Libraries. 129 | 130 | You may place library facilities that are a work based on the 131 | Library side by side in a single library together with other library 132 | facilities that are not Applications and are not covered by this 133 | License, and convey such a combined library under terms of your 134 | choice, if you do both of the following: 135 | 136 | a) Accompany the combined library with a copy of the same work based 137 | on the Library, uncombined with any other library facilities, 138 | conveyed under the terms of this License. 139 | 140 | b) Give prominent notice with the combined library that part of it 141 | is a work based on the Library, and explaining where to find the 142 | accompanying uncombined form of the same work. 143 | 144 | 6. Revised Versions of the GNU Lesser General Public License. 145 | 146 | The Free Software Foundation may publish revised and/or new versions 147 | of the GNU Lesser General Public License from time to time. Such new 148 | versions will be similar in spirit to the present version, but may 149 | differ in detail to address new problems or concerns. 150 | 151 | Each version is given a distinguishing version number. If the 152 | Library as you received it specifies that a certain numbered version 153 | of the GNU Lesser General Public License "or any later version" 154 | applies to it, you have the option of following the terms and 155 | conditions either of that published version or of any later version 156 | published by the Free Software Foundation. If the Library as you 157 | received it does not specify a version number of the GNU Lesser 158 | General Public License, you may choose any version of the GNU Lesser 159 | General Public License ever published by the Free Software Foundation. 160 | 161 | If the Library as you received it specifies that a proxy can decide 162 | whether future versions of the GNU Lesser General Public License shall 163 | apply, that proxy's public statement of acceptance of any version is 164 | permanent authorization for you to choose that version for the 165 | Library. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ------------------------------------- 2 | # miniOrange SAML 2.0 ASP.Net Connector 3 | ------------------------------------- 4 | The miniOrange Authentication modules add SAML v2.0 support to ASP.NET and IIS web sites, allowing the web site to act as a SAML v2.0 Service Provider (SP). 5 | The connector acts as a SAML Service Provider which can be configured to establish the trust between the connector and a SAML capable Identity Providers to securely authenticate the user to the ASP.NET application. 6 | Now you can securely SSO to your ASP.NET application using credentials of identity provider like ADFS, Google Apps, Salesforce, Bitium, Centrify, OneLogin, PingFederate, Oracle, Azure AD, AWS Cognito and many more.

Step by step guide:

You can find step by step guide to configure SSO connector here. 7 |
8 | ## Prerequisites 9 |
• To work with ASP.Net Connector, you need ASP.Net Application.
• Deploy your ASP.Net application as you deployed connector.
• All code related changes should be done before copying the application and connector in the IIS Manager.

10 | ## Key Features 11 |
• Signing: Configure Signed Response and assertion to determine whether SAML authentication response message is digitally signed by the IDP
• Encryption: Choose whether the SAML assertion is encrypted or not. Encryption ensures that only the sender and receiver can understand the assertion.
• Configurable SP base URL: You can provide custom SP base URL depending upon your Service Provider Configuration.
• Auto-redirect to your application after SSO: The admin can provide an application URL, which will be used as a redirect URL after logging in.
• Attribute Mapping: Map users attribute to session variables, which can be retrieved and used at the application endpoint.
12 | ## miniOrange SAML 2.0 ASP.Net Connector offers the following unique features for SAML 2.0: 13 |
• Hassle-free way to create, modify, encrypt, decrypt, sign, verify, and serialize SAML assertions
• Easily create, modify, sign, verify, and serialize SAML protocol messages
• Fully supports SAML 2.0 Bindings: HTTP POST and HTTP Redirect
• Web browser single sign-on - SAML 2.0 Service Provider initiated
• Name identifier management and mapping
14 | ### ** This feature could be upgraded upon customer request.

15 | ## What's Included 16 |
• Fully featured SAML v2.0 component for .NET 4.0 and 4.5+ (Visual Studio 2012, 2013, 2015, 2017)
• Comprehensive documentation for configuration with IdP and instructions for deployment on IIS Manager
17 | 18 |
***Note***: 19 | If you don’t find your IDP listed here, please contact us at info@miniorange.com or call us at +1 978 658 9387 and we can make changes to support your request.
20 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-cayman 2 | gems: jekyll-seo-tag 3 | 4 | title: ASP.NET Connector SAML SP Single Sign-On(SSO) # PAge title 5 | author: miniOrange # author name 6 | email: info@miniorange.com # author email 7 | description: "miniOrange ASP.NET Connector provides enterprise users Single Sign On (SSO) into your ASP.NET Web Application with 1 set of login credentials." 8 | keywords: "saml,asp.net,asp dotnet,asp.net saml,asp dotnet saml,saml sp,saml sp initiated,asp dotnet,saml connector,asp.net connector,asp dotnet connector,dotnet saml connector,dotnet saml sp connector,asp.net saml sp sso connector,asp.net connector saml,asp dotnet connector saml,asp dotnet saml sp sso connector, asp dotnet connector saml sp sso,asp.net connector saml sp sso,single sign on,single sign on(sso),saml2 sp sso,saml2 sp single sign on,service provider initiated,asp.net connector saml2 sp initiated sso,asp dotnet connector saml2 sp initiated sso" # html meta keywords 9 | -------------------------------------------------------------------------------- /sso-connector/ACS.aspx: -------------------------------------------------------------------------------- 1 | <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ACS.aspx.cs" Inherits="WebApplication1.ACS" %> 2 | 3 | 4 | 5 | 6 | 7 | 8 | 16 | 17 | 18 |
19 | 20 |
21 |
22 | 23 | 24 |

TEST <%= test_result %>

25 |
26 | <%if (test_result == "SUCCESSFUL") 27 | { %> 28 | 29 |
30 |

ATTRIBUTES RECEIVED:

31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 |
ATTRIBUTE NAMEATTRIBUTE VALUE
44 | <%} 45 | if (test_result == "FAILED") 46 | { %> 47 |
48 | 49 | 50 | 51 |
<%= response_error %>
52 | <%} %>
53 |
54 |
58 | 59 |
60 | 61 | 62 | -------------------------------------------------------------------------------- /sso-connector/ACS.aspx.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.UI; 6 | using System.Web.UI.WebControls; 7 | using System.Configuration; 8 | using System.Net.Configuration; 9 | using System.Web.Configuration; 10 | using Saml; 11 | using System.IO; 12 | using System.Xml; 13 | using System.Security.Cryptography.X509Certificates; 14 | using System.Security.Cryptography.Xml; 15 | using System.IO.Compression; 16 | using System.Text; 17 | using System.Security.Cryptography; 18 | using System.Net; 19 | using System.Net.Http; 20 | using System.Web.Security; 21 | using System.Threading; 22 | 23 | 24 | namespace WebApplication1 25 | { 26 | public partial class ACS : System.Web.UI.Page 27 | { 28 | public String response_error; 29 | public String test_result; 30 | private string samlCertificate = ConfigurationManager.AppSettings["idp_certificate"]; 31 | Constants cst = new Constants(); 32 | string idp_sso_target_url = ConfigurationManager.AppSettings["idp_ssourl"]; 33 | protected void Page_Load(object sender, EventArgs e) 34 | { 35 | if (Request.Form["SAMLResponse"]!=null) 36 | { 37 | 38 | if (Request.Form["RelayState"] == "testvalidate") 39 | { 40 | testconfiguration(); 41 | } 42 | 43 | else 44 | { 45 | try 46 | { 47 | Saml.Saml_Response samlResponse = new Saml_Response(samlCertificate, idp_sso_target_url,false); 48 | samlResponse.LoadXmlFromBase64(Request.Form["SAMLResponse"]); //SAML providers usually POST the data here 49 | 50 | if (samlResponse.IsValid()) 51 | { 52 | string username, email, firstname, lastname; 53 | username = samlResponse.GetNameID(); 54 | firstname = samlResponse.getAttr(ConfigurationManager.AppSettings["first_name"]); 55 | lastname = samlResponse.getAttr(ConfigurationManager.AppSettings["last_name"]); 56 | try 57 | { 58 | if (ConfigurationManager.AppSettings["email_id"] == "NameID") 59 | { 60 | email = samlResponse.GetNameID(); 61 | } 62 | else 63 | { 64 | email = samlResponse.getAttr(ConfigurationManager.AppSettings["email_id"]); 65 | } 66 | 67 | sendpost(username, email, firstname, lastname); 68 | } 69 | catch (ThreadAbortException texc) 70 | { 71 | //handle the exception if you want 72 | } 73 | } 74 | } 75 | catch (InvalidDataException ex) 76 | { 77 | string URLAuth = ConfigurationManager.AppSettings["user_url"].Trim(); 78 | HttpContext.Current.Response.Redirect(URLAuth + "?error=" + ex.Message); 79 | } 80 | } 81 | 82 | } 83 | else 84 | { 85 | FormsAuthentication.RedirectToLoginPage(); 86 | } 87 | 88 | // Response.Write("Request:" + Request.Form["SAMLResponse"]); 89 | } 90 | 91 | protected void Test_Done(object sender, EventArgs e) 92 | { 93 | Response.Redirect("setup.aspx"); 94 | } 95 | 96 | private void testconfiguration() 97 | { 98 | string ent_id = ""; 99 | Saml.Saml_Response samlResponse = null; 100 | if (Request.Form["SAMLResponse"] != null) 101 | { 102 | try 103 | { 104 | samlResponse = new Saml_Response(samlCertificate, idp_sso_target_url,true); 105 | samlResponse.LoadXmlFromBase64(Request.Form["SAMLResponse"]);//SAML providers usually POST the data here 106 | if (samlResponse.IsValid()) 107 | { 108 | //string username, email, firstname, lastname, emailid, name_attr, email_attr, first_attr, last_attr,show; 109 | Label2.Text = "NameID "; 110 | Label3.Text = samlResponse.GetNameID(); 111 | Label1.Text = samlResponse.GetAttributes(); 112 | this.test_result = "SUCCESSFUL"; 113 | } 114 | } 115 | catch (InvalidDataException ex) 116 | { 117 | 118 | this.test_result = "FAILED"; 119 | string err= cst.RetError(ex.Message); 120 | if (ex.Message == "invalid+issuer_id") 121 | { 122 | err += samlResponse.ent_id; 123 | } 124 | this.response_error = err; 125 | } 126 | } 127 | 128 | } 129 | 130 | 131 | private void sendpost(string pname,string pemail,string pfirst, string plast ) 132 | { 133 | try 134 | { 135 | HttpContext.Current.Session["user"] = pemail; 136 | string userid = encrypt(pname).Trim(); 137 | string useremail = encrypt(pemail).Trim(); 138 | string userfirstname = encrypt(pfirst).Trim(); 139 | string userlastname = encrypt(plast).Trim(); 140 | 141 | 142 | string URLAuth = ConfigurationManager.AppSettings["user_url"].Trim(); 143 | //string postString = string.Format("inputusername={0}&inputemail={1}&inputfirstname={2}&inputlastname={3}", userid , useremail,userfirstname ,userlastname ); 144 | Response.Clear(); 145 | 146 | /*HttpContext.Current.Session["username"] = pname; 147 | HttpContext.Current.Session["email"] = pemail; 148 | HttpContext.Current.Session["firstname"] = pfirst; 149 | HttpContext.Current.Session["lastname"] = plast; 150 | Response.Redirect(URLAuth); 151 | */ 152 | //HttpContext.Current.Response.Redirect(URLAuth); 153 | 154 | 155 | StringBuilder sb = new StringBuilder(); 156 | sb.Append(""); 157 | sb.AppendFormat(@""); 158 | sb.AppendFormat("
", URLAuth); 159 | sb.AppendFormat("", userid); 160 | sb.AppendFormat("", useremail); 161 | sb.AppendFormat("", userfirstname); 162 | sb.AppendFormat("", userlastname); 163 | // Other params go here 164 | sb.Append("
"); 165 | sb.Append(""); 166 | sb.Append(""); 167 | Response.Write(sb.ToString()); 168 | Response.End(); 169 | } 170 | catch (ThreadAbortException ex) 171 | { 172 | // System.Diagnostics.Debug.WriteLine("msg="+ex.Message); 173 | } 174 | 175 | } 176 | 177 | 178 | private string encrypt(string data) 179 | { 180 | string encryptionKey = ConfigurationManager.AppSettings["encrypt_key"].Trim(); 181 | encryptionKey = encryptionKey.Substring(0, 24); 182 | 183 | byte[] resultArray; 184 | byte[] inputArray; 185 | inputArray = UTF8Encoding.UTF8.GetBytes(data); 186 | TripleDESCryptoServiceProvider tdes = new TripleDESCryptoServiceProvider(); 187 | tdes.Key = UTF8Encoding.UTF8.GetBytes(encryptionKey); 188 | tdes.Mode = CipherMode.ECB; 189 | tdes.Padding = PaddingMode.PKCS7; 190 | ICryptoTransform itrans = tdes.CreateEncryptor(); 191 | resultArray = itrans.TransformFinalBlock(inputArray, 0, inputArray.Length); 192 | tdes.Clear(); 193 | return Convert.ToBase64String(resultArray, 0, resultArray.Length); 194 | } 195 | 196 | 197 | 198 | } 199 | } -------------------------------------------------------------------------------- /sso-connector/ACS.aspx.designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // 5 | // Changes to this file may cause incorrect behavior and will be lost if 6 | // the code is regenerated. 7 | // 8 | //------------------------------------------------------------------------------ 9 | 10 | namespace WebApplication1 { 11 | 12 | 13 | public partial class ACS { 14 | 15 | /// 16 | /// Head2 control. 17 | /// 18 | /// 19 | /// Auto-generated field. 20 | /// To modify move field declaration from designer file to code-behind file. 21 | /// 22 | protected global::System.Web.UI.HtmlControls.HtmlHead Head2; 23 | 24 | /// 25 | /// form1 control. 26 | /// 27 | /// 28 | /// Auto-generated field. 29 | /// To modify move field declaration from designer file to code-behind file. 30 | /// 31 | protected global::System.Web.UI.HtmlControls.HtmlForm form1; 32 | 33 | /// 34 | /// Label2 control. 35 | /// 36 | /// 37 | /// Auto-generated field. 38 | /// To modify move field declaration from designer file to code-behind file. 39 | /// 40 | protected global::System.Web.UI.WebControls.Label Label2; 41 | 42 | /// 43 | /// Label3 control. 44 | /// 45 | /// 46 | /// Auto-generated field. 47 | /// To modify move field declaration from designer file to code-behind file. 48 | /// 49 | protected global::System.Web.UI.WebControls.Label Label3; 50 | 51 | /// 52 | /// Label1 control. 53 | /// 54 | /// 55 | /// Auto-generated field. 56 | /// To modify move field declaration from designer file to code-behind file. 57 | /// 58 | protected global::System.Web.UI.WebControls.Label Label1; 59 | 60 | /// 61 | /// Submit control. 62 | /// 63 | /// 64 | /// Auto-generated field. 65 | /// To modify move field declaration from designer file to code-behind file. 66 | /// 67 | protected global::System.Web.UI.WebControls.Button Submit; 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /sso-connector/Constants.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Configuration; 6 | namespace WebApplication1 7 | { 8 | public class Constants 9 | { 10 | public static string INVALID_CERTIFICATE = "invalid+certificate"; 11 | public static string INVALID_ISSUER = "invalid+issuer_id"; 12 | public static string INVALID_SIGNATURE = "invalid+signature"; 13 | public static string TIMESTAMP_EXPIRE = "SAML+Response+Expired"; 14 | public static string SIGNED_RESPONSE = "Signed+Response+Required"; 15 | public string RetError(string msg) 16 | { 17 | if (msg == "invalid+certificate") 18 | return "Error : Invalid Certificate" + 19 | "Description : Certificate configured in the connector is in wrong format"; 20 | else if (msg == "invalid+issuer_id") 21 | return "Error : Invalid IssuerSaved Issuer :" + ConfigurationManager.AppSettings["idp_entityid"] + "Expected Issuer :"; 22 | else if (msg == "invalid+signature") 23 | return "Error : Invalid Signature" + "Description :
Signature is in wrong format"; 24 | else 25 | return "Error : Unknown Error" + 26 | "Description :
"; 27 | 28 | 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /sso-connector/InvalidDataException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | 6 | namespace WebApplication1 7 | { 8 | public class InvalidDataException : Exception 9 | { 10 | public InvalidDataException(string error) : base(error) 11 | { 12 | 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /sso-connector/MetaData.aspx: -------------------------------------------------------------------------------- 1 | <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MetaData.aspx.cs" Inherits="WebApplication1.MetaData" %> 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /sso-connector/MetaData.aspx.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.UI; 6 | using System.Web.UI.WebControls; 7 | using System.Data; 8 | 9 | namespace WebApplication1 10 | { 11 | public partial class MetaData : System.Web.UI.Page 12 | { 13 | 14 | protected void ViewXML(object sender, EventArgs e) 15 | { 16 | Response.Clear(); 17 | Response.Buffer = true; 18 | Response.Charset = ""; 19 | Response.Cache.SetCacheability(HttpCacheability.NoCache); 20 | Response.ContentType = "application/xml"; 21 | Response.WriteFile(Server.MapPath("~/saml.xml")); 22 | Response.Flush(); 23 | Response.End(); 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /sso-connector/MetaData.aspx.designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // 5 | // Changes to this file may cause incorrect behavior and will be lost if 6 | // the code is regenerated. 7 | // 8 | //------------------------------------------------------------------------------ 9 | 10 | namespace WebApplication1 { 11 | 12 | 13 | public partial class MetaData { 14 | 15 | /// 16 | /// form1 control. 17 | /// 18 | /// 19 | /// Auto-generated field. 20 | /// To modify move field declaration from designer file to code-behind file. 21 | /// 22 | protected global::System.Web.UI.HtmlControls.HtmlForm form1; 23 | 24 | /// 25 | /// btnViewXML control. 26 | /// 27 | /// 28 | /// Auto-generated field. 29 | /// To modify move field declaration from designer file to code-behind file. 30 | /// 31 | protected global::System.Web.UI.WebControls.Button btnViewXML; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /sso-connector/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("WebApplication1")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("WebApplication1")] 13 | [assembly: AssemblyCopyright("Copyright © 2017")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("135447b7-36b4-4b8f-977e-2ebbc24fd040")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Revision and Build Numbers 33 | // by using the '*' as shown below: 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] 36 | -------------------------------------------------------------------------------- /sso-connector/Web.Debug.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 17 | 18 | 29 | 30 | -------------------------------------------------------------------------------- /sso-connector/Web.Release.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 17 | 18 | 19 | 30 | 31 | -------------------------------------------------------------------------------- /sso-connector/Web.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /sso-connector/WebForm1.aspx: -------------------------------------------------------------------------------- 1 | <%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="_header.master" Inherits="WebApplication1.side_navigation_bar" %> 2 | 3 | 4 | 5 | 19 | 20 | 234 | 235 | 236 | 237 | -------------------------------------------------------------------------------- /sso-connector/WebForm1.aspx.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.UI; 6 | using System.Web.UI.WebControls; 7 | 8 | namespace WebApplication1 9 | { 10 | public partial class WebForm1 : System.Web.UI.Page 11 | { 12 | protected void Page_Load(object sender, EventArgs e) 13 | { 14 | 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /sso-connector/WebForm1.aspx.designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // 5 | // Changes to this file may cause incorrect behavior and will be lost if 6 | // the code is regenerated. 7 | // 8 | //------------------------------------------------------------------------------ 9 | 10 | namespace WebApplication1 11 | { 12 | 13 | 14 | public partial class WebForm1 15 | { 16 | 17 | /// 18 | /// form1 control. 19 | /// 20 | /// 21 | /// Auto-generated field. 22 | /// To modify move field declaration from designer file to code-behind file. 23 | /// 24 | protected global::System.Web.UI.HtmlControls.HtmlForm form1; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /sso-connector/WebForm2.aspx: -------------------------------------------------------------------------------- 1 | <%@ Page Title="" Language="C#" MasterPageFile="~/_header.Master" AutoEventWireup="true" CodeBehind="WebForm2.aspx.cs" Inherits="WebApplication1.WebForm2" %> 2 | 3 | 4 | 18 | 19 | 233 | 234 | 235 | 236 | 237 | 238 | -------------------------------------------------------------------------------- /sso-connector/WebForm2.aspx.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.UI; 6 | using System.Web.UI.WebControls; 7 | 8 | namespace WebApplication1 9 | { 10 | public partial class WebForm2 : System.Web.UI.Page 11 | { 12 | protected void Page_Load(object sender, EventArgs e) 13 | { 14 | 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /sso-connector/WebForm2.aspx.designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // 5 | // Changes to this file may cause incorrect behavior and will be lost if 6 | // the code is regenerated. 7 | // 8 | //------------------------------------------------------------------------------ 9 | 10 | namespace WebApplication1 11 | { 12 | 13 | 14 | public partial class WebForm2 15 | { 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /sso-connector/_header.Master: -------------------------------------------------------------------------------- 1 | <%@ Master Language="C#" AutoEventWireup="true" CodeBehind="_header.master.cs" Inherits="WebApplication1._header" %> 2 | 10 | 11 | 12 | 13 | miniOrange SSO Connector 14 | 15 | 16 | 17 | 18 |
19 | 35 |
    36 |

    SAML ASP.NET CONNECTOR

    37 | 41 |
42 |
43 | 44 | 45 | 46 | 47 | 48 |
49 |
50 | 51 | 52 | 77 | 78 | -------------------------------------------------------------------------------- /sso-connector/_header.Master.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.UI; 6 | using System.Web.UI.WebControls; 7 | 8 | namespace WebApplication1 9 | { 10 | public partial class _header : System.Web.UI.MasterPage 11 | { 12 | protected void Page_Load(object sender, EventArgs e) 13 | { 14 | 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /sso-connector/_header.Master.designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // 5 | // Changes to this file may cause incorrect behavior and will be lost if 6 | // the code is regenerated. 7 | // 8 | //------------------------------------------------------------------------------ 9 | 10 | namespace WebApplication1 { 11 | 12 | 13 | public partial class _header { 14 | 15 | /// 16 | /// head control. 17 | /// 18 | /// 19 | /// Auto-generated field. 20 | /// To modify move field declaration from designer file to code-behind file. 21 | /// 22 | protected global::System.Web.UI.WebControls.ContentPlaceHolder head; 23 | 24 | /// 25 | /// form1 control. 26 | /// 27 | /// 28 | /// Auto-generated field. 29 | /// To modify move field declaration from designer file to code-behind file. 30 | /// 31 | protected global::System.Web.UI.HtmlControls.HtmlForm form1; 32 | 33 | /// 34 | /// ContentPlaceHolder1 control. 35 | /// 36 | /// 37 | /// Auto-generated field. 38 | /// To modify move field declaration from designer file to code-behind file. 39 | /// 40 | protected global::System.Web.UI.WebControls.ContentPlaceHolder ContentPlaceHolder1; 41 | 42 | /// 43 | /// MainContent control. 44 | /// 45 | /// 46 | /// Auto-generated field. 47 | /// To modify move field declaration from designer file to code-behind file. 48 | /// 49 | protected global::System.Web.UI.WebControls.ContentPlaceHolder MainContent; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /sso-connector/bin/WebApplication1.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/miniOrangeDev/miniOrange-asp-dotnet-connector-samlsp-sso/7dcc73c5f7894585a6feb107148daca2faa8790d/sso-connector/bin/WebApplication1.dll -------------------------------------------------------------------------------- /sso-connector/bin/WebApplication1.dll.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /sso-connector/bin/WebApplication1.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/miniOrangeDev/miniOrange-asp-dotnet-connector-samlsp-sso/7dcc73c5f7894585a6feb107148daca2faa8790d/sso-connector/bin/WebApplication1.pdb -------------------------------------------------------------------------------- /sso-connector/ciphertext.cs: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /sso-connector/config.ini: -------------------------------------------------------------------------------- 1 | [Configuration] 2 | acsurl = https://local.com/acs 3 | entityid = https://local -------------------------------------------------------------------------------- /sso-connector/example/sso.aspx: -------------------------------------------------------------------------------- 1 | <%@ Page Language="C#" %> 2 | <%@ Import Namespace="System" %> 3 | 4 | -------------------------------------------------------------------------------- /sso-connector/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/miniOrangeDev/miniOrange-asp-dotnet-connector-samlsp-sso/7dcc73c5f7894585a6feb107148daca2faa8790d/sso-connector/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /sso-connector/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/miniOrangeDev/miniOrange-asp-dotnet-connector-samlsp-sso/7dcc73c5f7894585a6feb107148daca2faa8790d/sso-connector/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /sso-connector/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/miniOrangeDev/miniOrange-asp-dotnet-connector-samlsp-sso/7dcc73c5f7894585a6feb107148daca2faa8790d/sso-connector/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /sso-connector/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/miniOrangeDev/miniOrange-asp-dotnet-connector-samlsp-sso/7dcc73c5f7894585a6feb107148daca2faa8790d/sso-connector/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /sso-connector/how_to_setup.aspx: -------------------------------------------------------------------------------- 1 | <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="how_to_setup.aspx.cs" Inherits="WebApplication1.how_to_setup" %> 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 54 | 55 | 56 |
57 | 58 | 59 |
60 | 61 |
62 | 63 |
64 | Logout 65 |
66 |
67 |
68 | 69 |
70 | 71 | 84 |
85 |
86 |
87 |

How to Setup?

88 | 89 |
90 | 94 |
95 | 96 |
97 |
98 |
99 |
100 |
101 |

Follow these steps to setup the plugin:

102 |

Step 1: To Add Application in IIS Manager

    103 |
  • Extract asp-net-saml-connector-xxx.zip and Copy sso_connector folder to path- C:\inetpub\wwwroot.
  • 104 |
  • Open IIS manager.
    In left panel right click Default Web Site and click Add Application.

105 | 106 |

107 |

    108 |
  • 109 | As given below provide Alias Name that is a webpage Address Name for example Alias Name.
  • 110 |
  • Give Physical path where you have copied the Application:
    111 | C:\inetpub\wwwroot\ sso-connector.
  • 112 |
113 |


114 |

Step 2: Steps to give authority to user to make changes in SAML Connector (web.config File).

115 |
    116 |
  • Go to this path C:\inetpub\wwwroot\
  • 117 |
  • Right click the sso-connector and select Properties
  • 118 |
  • Select the Security tab and click the Edit button.
  • 119 |
  • Select IIS_IUSRS in under Group or Usernames option.
  • 120 |
  • After following the steps given above, tick the box in the Permission for IIS_IUSRS container as shown in the figure below:
  • 121 |

122 |


123 |

Step 3: Open SAML ASP.NET Connector on Browser


124 |
    125 |
  • Open any browser and go to the following link: http://localhost/
  • 126 |
  • A signup page opens up..
  • 127 |
128 |


129 |

Step 4: Configure your Identity Provider

130 |

131 |
    132 |
  • You need to provider these SP Entity ID and ACS URL values while configuring your Identity Provider.
  • 133 |
134 |


135 |

Step 5: Configure your Service Provider

136 | Using IDP information user could add details in Configure SP:
137 |
    138 |
  • Provide the required settings (i.e. IDP Entity ID, IDP Single Sign on URL, X.509 certificate) in the connector.
  • 139 |
  • And click Save Configuration to Save your IDP details.
  • 140 |
  • Then click on Test Configuration button.
  • 141 |
142 | 143 |

144 |
145 |


    146 |
  • The below Screenshot shows a successful result.
  • 147 |
  • This screenshot shows the attributes that are received and are mapped by attribute mapping (i.e. NameID, email, firstname, lastname).
  • 148 |

149 |


150 |

Step 6:Attribute Mapping

151 |
    152 |
  • Attribute Mapping is used by the IDP and the SP to map user information from IDP to SP.
  • 153 |
  • Attribute Mapping helps you to get user attributes from your IdP and map them to your user attributes in SP.
  • 154 |
  • Attributes received in successful test configuration are used for attribute mapping.
  • 155 |
  • In Attribute Mapping details like NameID and Email as shown in Figure Test Successful are mapped to NameID and Email respectively like Attribute: NameID,  Email,  FirstName,  LastName.
  • 156 |
157 |

158 |

Step 7: Login Setup


159 |
    160 |
  • Provide your Endpoint URL in Login Setup where you will read your SAML response.
  • 161 |
  • Add 24-character Encryption Key which will be used to encrypt response and same key will be used to Decrypt the response in login ASP.Net application.
  • 162 |
  • Click on Save button.

163 |

164 | 165 |

Step 8: Add following link in your application

166 |
    167 |
  • Use the following html code in your application from where you want perform SSO:
    168 | <a href="”>Log in</a>" 169 |
  • 170 |
171 | 172 |

173 | 174 |
175 |
176 |
177 |
178 |
179 |
180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | -------------------------------------------------------------------------------- /sso-connector/how_to_setup.aspx.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.UI; 6 | using System.Web.UI.WebControls; 7 | using System.Configuration; 8 | using System.Web.Configuration; 9 | 10 | namespace WebApplication1 11 | { 12 | public partial class how_to_setup : System.Web.UI.Page 13 | { 14 | protected void Page_Load(object sender, EventArgs e) 15 | { 16 | string baseurl = ConfigurationManager.AppSettings["sp_entityid"]; 17 | anurl.Text = baseurl + "request.aspx"; 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /sso-connector/how_to_setup.aspx.designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // 5 | // Changes to this file may cause incorrect behavior and will be lost if 6 | // the code is regenerated. 7 | // 8 | //------------------------------------------------------------------------------ 9 | 10 | namespace WebApplication1 { 11 | 12 | 13 | public partial class how_to_setup { 14 | 15 | /// 16 | /// form1 control. 17 | /// 18 | /// 19 | /// Auto-generated field. 20 | /// To modify move field declaration from designer file to code-behind file. 21 | /// 22 | protected global::System.Web.UI.HtmlControls.HtmlForm form1; 23 | 24 | /// 25 | /// anurl control. 26 | /// 27 | /// 28 | /// Auto-generated field. 29 | /// To modify move field declaration from designer file to code-behind file. 30 | /// 31 | protected global::System.Web.UI.WebControls.Label anurl; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /sso-connector/image/add_app.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/miniOrangeDev/miniOrange-asp-dotnet-connector-samlsp-sso/7dcc73c5f7894585a6feb107148daca2faa8790d/sso-connector/image/add_app.png -------------------------------------------------------------------------------- /sso-connector/image/alias.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/miniOrangeDev/miniOrange-asp-dotnet-connector-samlsp-sso/7dcc73c5f7894585a6feb107148daca2faa8790d/sso-connector/image/alias.png -------------------------------------------------------------------------------- /sso-connector/image/atrrbute.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/miniOrangeDev/miniOrange-asp-dotnet-connector-samlsp-sso/7dcc73c5f7894585a6feb107148daca2faa8790d/sso-connector/image/atrrbute.png -------------------------------------------------------------------------------- /sso-connector/image/control.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/miniOrangeDev/miniOrange-asp-dotnet-connector-samlsp-sso/7dcc73c5f7894585a6feb107148daca2faa8790d/sso-connector/image/control.png -------------------------------------------------------------------------------- /sso-connector/image/idp_set.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/miniOrangeDev/miniOrange-asp-dotnet-connector-samlsp-sso/7dcc73c5f7894585a6feb107148daca2faa8790d/sso-connector/image/idp_set.png -------------------------------------------------------------------------------- /sso-connector/image/loginsetup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/miniOrangeDev/miniOrange-asp-dotnet-connector-samlsp-sso/7dcc73c5f7894585a6feb107148daca2faa8790d/sso-connector/image/loginsetup.png -------------------------------------------------------------------------------- /sso-connector/image/logo-home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/miniOrangeDev/miniOrange-asp-dotnet-connector-samlsp-sso/7dcc73c5f7894585a6feb107148daca2faa8790d/sso-connector/image/logo-home.png -------------------------------------------------------------------------------- /sso-connector/image/logo_large.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/miniOrangeDev/miniOrange-asp-dotnet-connector-samlsp-sso/7dcc73c5f7894585a6feb107148daca2faa8790d/sso-connector/image/logo_large.png -------------------------------------------------------------------------------- /sso-connector/image/logsetup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/miniOrangeDev/miniOrange-asp-dotnet-connector-samlsp-sso/7dcc73c5f7894585a6feb107148daca2faa8790d/sso-connector/image/logsetup.png -------------------------------------------------------------------------------- /sso-connector/image/miniorange.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/miniOrangeDev/miniOrange-asp-dotnet-connector-samlsp-sso/7dcc73c5f7894585a6feb107148daca2faa8790d/sso-connector/image/miniorange.png -------------------------------------------------------------------------------- /sso-connector/image/right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/miniOrangeDev/miniOrange-asp-dotnet-connector-samlsp-sso/7dcc73c5f7894585a6feb107148daca2faa8790d/sso-connector/image/right.png -------------------------------------------------------------------------------- /sso-connector/image/savetest.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/miniOrangeDev/miniOrange-asp-dotnet-connector-samlsp-sso/7dcc73c5f7894585a6feb107148daca2faa8790d/sso-connector/image/savetest.png -------------------------------------------------------------------------------- /sso-connector/image/setup_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/miniOrangeDev/miniOrange-asp-dotnet-connector-samlsp-sso/7dcc73c5f7894585a6feb107148daca2faa8790d/sso-connector/image/setup_4.png -------------------------------------------------------------------------------- /sso-connector/image/signup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/miniOrangeDev/miniOrange-asp-dotnet-connector-samlsp-sso/7dcc73c5f7894585a6feb107148daca2faa8790d/sso-connector/image/signup.png -------------------------------------------------------------------------------- /sso-connector/image/sp_set.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/miniOrangeDev/miniOrange-asp-dotnet-connector-samlsp-sso/7dcc73c5f7894585a6feb107148daca2faa8790d/sso-connector/image/sp_set.png -------------------------------------------------------------------------------- /sso-connector/image/wrong.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/miniOrangeDev/miniOrange-asp-dotnet-connector-samlsp-sso/7dcc73c5f7894585a6feb107148daca2faa8790d/sso-connector/image/wrong.png -------------------------------------------------------------------------------- /sso-connector/include/js/main.js: -------------------------------------------------------------------------------- 1 | (function () { 2 | "use strict"; 3 | 4 | var treeviewMenu = $('.app-menu'); 5 | 6 | // Toggle Sidebar 7 | $('[data-toggle="sidebar"]').click(function(event) { 8 | event.preventDefault(); 9 | $('.app').toggleClass('sidenav-toggled'); 10 | }); 11 | 12 | // Activate sidebar treeview toggle 13 | $("[data-toggle='treeview']").click(function(event) { 14 | event.preventDefault(); 15 | if(!$(this).parent().hasClass('is-expanded')) { 16 | treeviewMenu.find("[data-toggle='treeview']").parent().removeClass('is-expanded'); 17 | } 18 | $(this).parent().toggleClass('is-expanded'); 19 | }); 20 | 21 | // Set initial active toggle 22 | $("[data-toggle='treeview.'].is-expanded").parent().toggleClass('is-expanded'); 23 | 24 | //Activate bootstrip tooltips 25 | $("[data-toggle='tooltip']").tooltip(); 26 | 27 | })(); 28 | -------------------------------------------------------------------------------- /sso-connector/include/js/plugins/bootstrap-notify.min.js: -------------------------------------------------------------------------------- 1 | /* Project: Bootstrap Growl = v3.1.3 | Description: Turns standard Bootstrap alerts into "Growl-like" notifications. | Author: Mouse0270 aka Robert McIntosh | License: MIT License | Website: https://github.com/mouse0270/bootstrap-growl */ 2 | !function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t("object"==typeof exports?require("jquery"):jQuery)}(function(t){function e(e,i,n){var i={content:{message:"object"==typeof i?i.message:i,title:i.title?i.title:"",icon:i.icon?i.icon:"",url:i.url?i.url:"#",target:i.target?i.target:"-"}};n=t.extend(!0,{},i,n),this.settings=t.extend(!0,{},s,n),this._defaults=s,"-"==this.settings.content.target&&(this.settings.content.target=this.settings.url_target),this.animations={start:"webkitAnimationStart oanimationstart MSAnimationStart animationstart",end:"webkitAnimationEnd oanimationend MSAnimationEnd animationend"},"number"==typeof this.settings.offset&&(this.settings.offset={x:this.settings.offset,y:this.settings.offset}),this.init()}var s={element:"body",position:null,type:"info",allow_dismiss:!0,newest_on_top:!1,showProgressbar:!1,placement:{from:"top",align:"center"},offset:20,spacing:10,z_index:1031,delay:5e3,timer:500,url_target:"_blank",mouse_over:null,animate:{enter:"animated fadeInDown",exit:"animated fadeOutUp"},onShow:null,onShown:null,onClose:null,onClosed:null,icon_type:"class",template:''};String.format=function(){for(var t=arguments[0],e=1;e .progress-bar').removeClass("progress-bar-"+t.settings.type),t.settings.type=i[e],this.$ele.addClass("alert-"+i[e]).find('[data-notify="progressbar"] > .progress-bar').addClass("progress-bar-"+i[e]);break;case"icon":var n=this.$ele.find('[data-notify="icon"]');"class"==t.settings.icon_type.toLowerCase()?n.removeClass(t.settings.content.icon).addClass(i[e]):(n.is("img")||n.find("img"),n.attr("src",i[e]));break;case"progress":var a=t.settings.delay-t.settings.delay*(i[e]/100);this.$ele.data("notify-delay",a),this.$ele.find('[data-notify="progressbar"] > div').attr("aria-valuenow",i[e]).css("width",i[e]+"%");break;case"url":this.$ele.find('[data-notify="url"]').attr("href",i[e]);break;case"target":this.$ele.find('[data-notify="url"]').attr("target",i[e]);break;default:this.$ele.find('[data-notify="'+e+'"]').html(i[e])}var o=this.$ele.outerHeight()+parseInt(t.settings.spacing)+parseInt(t.settings.offset.y);t.reposition(o)},close:function(){t.close()}}},buildNotify:function(){var e=this.settings.content;this.$ele=t(String.format(this.settings.template,this.settings.type,e.title,e.message,e.url,e.target)),this.$ele.attr("data-notify-position",this.settings.placement.from+"-"+this.settings.placement.align),this.settings.allow_dismiss||this.$ele.find('[data-notify="dismiss"]').css("display","none"),(this.settings.delay<=0&&!this.settings.showProgressbar||!this.settings.showProgressbar)&&this.$ele.find('[data-notify="progressbar"]').remove()},setIcon:function(){"class"==this.settings.icon_type.toLowerCase()?this.$ele.find('[data-notify="icon"]').addClass(this.settings.content.icon):this.$ele.find('[data-notify="icon"]').is("img")?this.$ele.find('[data-notify="icon"]').attr("src",this.settings.content.icon):this.$ele.find('[data-notify="icon"]').append('Notify Icon')},styleURL:function(){this.$ele.find('[data-notify="url"]').css({backgroundImage:"url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)",height:"100%",left:"0px",position:"absolute",top:"0px",width:"100%",zIndex:this.settings.z_index+1}),this.$ele.find('[data-notify="dismiss"]').css({position:"absolute",right:"10px",top:"5px",zIndex:this.settings.z_index+2})},placement:function(){var e=this,s=this.settings.offset.y,i={display:"inline-block",margin:"0px auto",position:this.settings.position?this.settings.position:"body"===this.settings.element?"fixed":"absolute",transition:"all .5s ease-in-out",zIndex:this.settings.z_index},n=!1,a=this.settings;switch(t('[data-notify-position="'+this.settings.placement.from+"-"+this.settings.placement.align+'"]:not([data-closing="true"])').each(function(){return s=Math.max(s,parseInt(t(this).css(a.placement.from))+parseInt(t(this).outerHeight())+parseInt(a.spacing))}),1==this.settings.newest_on_top&&(s=this.settings.offset.y),i[this.settings.placement.from]=s+"px",this.settings.placement.align){case"left":case"right":i[this.settings.placement.align]=this.settings.offset.x+"px";break;case"center":i.left=0,i.right=0}this.$ele.css(i).addClass(this.settings.animate.enter),t.each(Array("webkit","moz","o","ms",""),function(t,s){e.$ele[0].style[s+"AnimationIterationCount"]=1}),t(this.settings.element).append(this.$ele),1==this.settings.newest_on_top&&(s=parseInt(s)+parseInt(this.settings.spacing)+this.$ele.outerHeight(),this.reposition(s)),t.isFunction(e.settings.onShow)&&e.settings.onShow.call(this.$ele),this.$ele.one(this.animations.start,function(){n=!0}).one(this.animations.end,function(){t.isFunction(e.settings.onShown)&&e.settings.onShown.call(this)}),setTimeout(function(){n||t.isFunction(e.settings.onShown)&&e.settings.onShown.call(this)},600)},bind:function(){var e=this;if(this.$ele.find('[data-notify="dismiss"]').on("click",function(){e.close()}),this.$ele.mouseover(function(){t(this).data("data-hover","true")}).mouseout(function(){t(this).data("data-hover","false")}),this.$ele.data("data-hover","false"),this.settings.delay>0){e.$ele.data("notify-delay",e.settings.delay);var s=setInterval(function(){var t=parseInt(e.$ele.data("notify-delay"))-e.settings.timer;if("false"===e.$ele.data("data-hover")&&"pause"==e.settings.mouse_over||"pause"!=e.settings.mouse_over){var i=(e.settings.delay-t)/e.settings.delay*100;e.$ele.data("notify-delay",t),e.$ele.find('[data-notify="progressbar"] > div').attr("aria-valuenow",i).css("width",i+"%")}t<=-e.settings.timer&&(clearInterval(s),e.close())},e.settings.timer)}},close:function(){var e=this,s=parseInt(this.$ele.css(this.settings.placement.from)),i=!1;this.$ele.data("closing","true").addClass(this.settings.animate.exit),e.reposition(s),t.isFunction(e.settings.onClose)&&e.settings.onClose.call(this.$ele),this.$ele.one(this.animations.start,function(){i=!0}).one(this.animations.end,function(){t(this).remove(),t.isFunction(e.settings.onClosed)&&e.settings.onClosed.call(this)}),setTimeout(function(){i||(e.$ele.remove(),e.settings.onClosed&&e.settings.onClosed(e.$ele))},600)},reposition:function(e){var s=this,i='[data-notify-position="'+this.settings.placement.from+"-"+this.settings.placement.align+'"]:not([data-closing="true"])',n=this.$ele.nextAll(i);1==this.settings.newest_on_top&&(n=this.$ele.prevAll(i)),n.each(function(){t(this).css(s.settings.placement.from,e),e=parseInt(e)+parseInt(s.settings.spacing)+t(this).outerHeight()})}}),t.notify=function(t,s){var i=new e(this,t,s);return i.notify},t.notifyDefaults=function(e){return s=t.extend(!0,{},s,e)},t.notifyClose=function(e){"undefined"==typeof e||"all"==e?t("[data-notify]").find('[data-notify="dismiss"]').trigger("click"):t('[data-notify-position="'+e+'"]').find('[data-notify="dismiss"]').trigger("click")}}); -------------------------------------------------------------------------------- /sso-connector/include/js/plugins/dataTables.bootstrap.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | DataTables Bootstrap 3 integration 3 | ©2011-2015 SpryMedia Ltd - datatables.net/license 4 | */ 5 | (function(b){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(a){return b(a,window,document)}):"object"===typeof exports?module.exports=function(a,d){a||(a=window);if(!d||!d.fn.dataTable)d=require("datatables.net")(a,d).$;return b(d,a,a.document)}:b(jQuery,window,document)})(function(b,a,d,m){var f=b.fn.dataTable;b.extend(!0,f.defaults,{dom:"<'row'<'col-sm-12 col-md-6'l><'col-sm-12 col-md-6'f>><'row'<'col-sm-12'tr>><'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>", 6 | renderer:"bootstrap"});b.extend(f.ext.classes,{sWrapper:"dataTables_wrapper container-fluid dt-bootstrap4",sFilterInput:"form-control form-control-sm",sLengthSelect:"form-control form-control-sm",sProcessing:"dataTables_processing card",sPageButton:"paginate_button page-item"});f.ext.renderer.pageButton.bootstrap=function(a,h,r,s,j,n){var o=new f.Api(a),t=a.oClasses,k=a.oLanguage.oPaginate,u=a.oLanguage.oAria.paginate||{},e,g,p=0,q=function(d,f){var l,h,i,c,m=function(a){a.preventDefault();!b(a.currentTarget).hasClass("disabled")&& 7 | o.page()!=a.data.action&&o.page(a.data.action).draw("page")};l=0;for(h=f.length;l",{"class":t.sPageButton+" "+g,id:0===r&& 8 | "string"===typeof c?a.sTableId+"_"+c:null}).append(b("",{href:"#","aria-controls":a.sTableId,"aria-label":u[c],"data-dt-idx":p,tabindex:a.iTabIndex,"class":"page-link"}).html(e)).appendTo(d),a.oApi._fnBindAction(i,{action:c},m),p++)}},i;try{i=b(h).find(d.activeElement).data("dt-idx")}catch(v){}q(b(h).empty().html('