 |
-
+
- | <%= SystemUtils.GenerateEnterKeyCaptureBeginTag(FindControlRecursively("OKButton")) %>
- |
+ | <%= SystemUtils.GenerateEnterKeyCaptureBeginTag(FindControlRecursively("OKButton")) %> | | | This application uses Single Sign-On (SSO) authentication through ADFS.
+ Click the button below to authenticate with your organizational credentials.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ | |
+ |
|
<%= SystemUtils.GenerateEnterKeyCaptureEndTag(FindControlRecursively("OKButton")) %> |
diff --git a/Security/SignIn.aspx.vb b/Security/SignIn.aspx.vb
index 1d83728..7737060 100644
--- a/Security/SignIn.aspx.vb
+++ b/Security/SignIn.aspx.vb
@@ -12,6 +12,7 @@ Imports System.Collections
Imports System.Collections.Generic
Imports System.ComponentModel
+Imports System.Web
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports BaseClasses
@@ -244,11 +245,16 @@ Partial Public Class SignIn
CancelButton_Click_Base(sender, args)
' NOTE: If the Base function redirects to another page, any code here will not be executed.
End Sub
-
- Public Sub OKButton_Click(ByVal sender As Object, ByVal args As EventArgs)
+ Public Sub OKButton_Click(ByVal sender As Object, ByVal args As EventArgs)
' Click handler for OKButton.
- ' Customize by adding code before the call or replace the call to the Base function with your own code.
- OKButton_Click_Base(sender, args)
+ ' Redirect to SAML authentication instead of traditional login
+ Try
+ Dim samlRequest As String = SamlHelper.CreateAuthRequest("https://cudreg.com", Request.Url.GetLeftPart(UriPartial.Authority) & "/Security/SamlCallback.aspx")
+ Dim redirectUrl As String = "https://sso.satitm.chula.ac.th/adfs/ls?SAMLRequest=" & HttpUtility.UrlEncode(samlRequest)
+ Response.Redirect(redirectUrl)
+ Catch ex As Exception
+ Me.ProcessLoginFailed("SAML Authentication Error: " & ex.Message, "")
+ End Try
' NOTE: If the Base function redirects to another page, any code here will not be executed.
End Sub
diff --git a/Security/SignIn.xml b/Security/SignIn.xml
index d16ce11..4d4fb04 100644
--- a/Security/SignIn.xml
+++ b/Security/SignIn.xml
@@ -132,16 +132,13 @@
Button-CommandName
Login
-
-
+
Button-Text
- Btn:OK
- ResourceReference
+ Login with ADFS
Button-ToolTip
- Btn:OK
- ResourceReference
+ Login with ADFS Single Sign-On
|
|
|