getPreAuthUserLoginURL() Method

Table of Contents

  1. Function
  2. Syntax
  3. Parameters
  4. Return Value
  5. Sample Code
  6. Remarks
  7. Possible Errors
  8. Related Methods

Function

  • Returns a URL containing a session identifier that is temporarily built to allow HTTPS access to Attendance on Demand MSS operator

Syntax

  • String = AeXMLBridge.getPreAuthUserLoginURL(TAeSessionAuthenticationPackage);

Parameters

Return Value

  • Returns a string value containing the URL used to log into Attendance on Demand

Sample Code

C#

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
try
{
TAeAuthenticationPackage authPkg = new TAeAuthenticationPackage()
{
DomainAccount = yourDomainAccount,
Password = yourPassword,
VendorToken = yourVendorToken,
PreAuthAction = yourPreAuthAction
};
authPkg = AeXMLBridge.getUserAuthPackage(authPkg);
string userKey = authPkg.SendBackPackage;

TAeSessionAuthenticationPackage sessionAuthPkg = new TAeSessionAuthenticationPackage()
{
EnforcementMode = 0,
ExpireImmediately = true,
MiniHeader = true,
PreAuthPackage = userKey
// user key retrieved from above
};

sessionAuthPkg.SubIFrame = "https://" + yourURI + ".attendanceondemand.com/operator/";
string url = AeXMLBridge.getPreAuthUserLoginURL(sessionAuthPkg);

wb.Navigate(url);
// wb = web browser
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}

VB.Net

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Try
Dim authPkg As New TAeAuthenticationPackage() With { _
Key .DomainAccount = yourDomainAccount, _
Key .Password = yourPassword, _
Key .VendorToken = yourVendorToken, _
Key .PreAuthAction = yourPreAuthAction _
}
authPkg = AeXMLBridge.getUserAuthPackage(authPkg)
Dim userKey As String = authPkg.SendBackPackage

' user key retrieved from above
Dim sessionAuthPkg As New TAeSessionAuthenticationPackage() With { _
Key .EnforcementMode = 0, _
Key .ExpireImmediately = True, _
Key .MiniHeader = True, _
Key .PreAuthPackage = userKey _
}
sessionAuthPkg.SubIFrame = "https://" + yourURI + ".attendanceondemand.com/operator/"
Dim url As String = AeXMLBridge.getPreAuthUserLoginURL(sessionAuthPkg)

' wb = web browser
wb.Navigate(url)

Catch ex As Exception
MessageBox.Show(ex.Message)
End Try

Remarks

  • If valid, the MSS operator is assumed to be pre-authenticated and a trusted operator
  • Requires an operator identification token previously issued by the getUserAuthPackage method

Possible Errors

  • Account not found

getUserAuthPackage
getUserGroupsSimple

Back to Top