Revert "signinc"

This reverts commit 5c66212388.
This commit is contained in:
Siwat Sirichai 2025-06-09 00:20:38 +07:00
parent 5c66212388
commit 518c7df120
5 changed files with 17 additions and 166 deletions

View file

@ -12,7 +12,6 @@ Imports System.Collections
Imports System.Collections.Generic
Imports System.ComponentModel
Imports System.Web
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports BaseClasses
@ -245,16 +244,11 @@ 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.
' 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
' Customize by adding code before the call or replace the call to the Base function with your own code.
OKButton_Click_Base(sender, args)
' NOTE: If the Base function redirects to another page, any code here will not be executed.
End Sub