signinc
This commit is contained in:
parent
f9493ca91b
commit
5c66212388
5 changed files with 166 additions and 17 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue