-
Notifications
You must be signed in to change notification settings - Fork 0
/
AuthAzureAD.pas
149 lines (99 loc) · 6.77 KB
/
AuthAzureAD.pas
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
unit AuthAzureAD;
interface
type
HCkTask = Pointer;
HCkSocket = Pointer;
HCkAuthAzureAD = Pointer;
HCkString = Pointer;
// Note: The callback functions use the cdecl calling convention, while all other functions use stdcall.
TAuthAzureADAbortCheck = function(): Integer; cdecl;
TAuthAzureADProgressInfo = procedure(name: PWideChar; value: PWideChar); cdecl;
TAuthAzureADPercentDone = function(pctDone: Integer): Integer; cdecl;
TAuthAzureADTaskCompleted = procedure(task: HCkTask); cdecl;
function CkAuthAzureAD_Create: HCkAuthAzureAD; stdcall;
procedure CkAuthAzureAD_Dispose(handle: HCkAuthAzureAD); stdcall;
procedure CkAuthAzureAD_SetAbortCheck(objHandle: HCkAuthAzureAD; fn: TAuthAzureADAbortCheck) stdcall;
procedure CkAuthAzureAD_SetProgressInfo(objHandle: HCkAuthAzureAD; fn: TAuthAzureADProgressInfo) stdcall;
procedure CkAuthAzureAD_SetPercentDone(objHandle: HCkAuthAzureAD; fn: TAuthAzureADPercentDone) stdcall;
procedure CkAuthAzureAD_SetTaskCompleted(objHandle: HCkAuthAzureAD; fn: TAuthAzureADTaskCompleted) stdcall;
procedure CkAuthAzureAD_getAccessToken(objHandle: HCkAuthAzureAD; outPropVal: HCkString); stdcall;
procedure CkAuthAzureAD_putAccessToken(objHandle: HCkAuthAzureAD; newPropVal: PWideChar); stdcall;
function CkAuthAzureAD__accessToken(objHandle: HCkAuthAzureAD): PWideChar; stdcall;
procedure CkAuthAzureAD_getClientId(objHandle: HCkAuthAzureAD; outPropVal: HCkString); stdcall;
procedure CkAuthAzureAD_putClientId(objHandle: HCkAuthAzureAD; newPropVal: PWideChar); stdcall;
function CkAuthAzureAD__clientId(objHandle: HCkAuthAzureAD): PWideChar; stdcall;
procedure CkAuthAzureAD_getClientSecret(objHandle: HCkAuthAzureAD; outPropVal: HCkString); stdcall;
procedure CkAuthAzureAD_putClientSecret(objHandle: HCkAuthAzureAD; newPropVal: PWideChar); stdcall;
function CkAuthAzureAD__clientSecret(objHandle: HCkAuthAzureAD): PWideChar; stdcall;
procedure CkAuthAzureAD_getDebugLogFilePath(objHandle: HCkAuthAzureAD; outPropVal: HCkString); stdcall;
procedure CkAuthAzureAD_putDebugLogFilePath(objHandle: HCkAuthAzureAD; newPropVal: PWideChar); stdcall;
function CkAuthAzureAD__debugLogFilePath(objHandle: HCkAuthAzureAD): PWideChar; stdcall;
procedure CkAuthAzureAD_getLastErrorHtml(objHandle: HCkAuthAzureAD; outPropVal: HCkString); stdcall;
function CkAuthAzureAD__lastErrorHtml(objHandle: HCkAuthAzureAD): PWideChar; stdcall;
procedure CkAuthAzureAD_getLastErrorText(objHandle: HCkAuthAzureAD; outPropVal: HCkString); stdcall;
function CkAuthAzureAD__lastErrorText(objHandle: HCkAuthAzureAD): PWideChar; stdcall;
procedure CkAuthAzureAD_getLastErrorXml(objHandle: HCkAuthAzureAD; outPropVal: HCkString); stdcall;
function CkAuthAzureAD__lastErrorXml(objHandle: HCkAuthAzureAD): PWideChar; stdcall;
function CkAuthAzureAD_getLastMethodSuccess(objHandle: HCkAuthAzureAD): wordbool; stdcall;
procedure CkAuthAzureAD_putLastMethodSuccess(objHandle: HCkAuthAzureAD; newPropVal: wordbool); stdcall;
function CkAuthAzureAD_getNumSecondsRemaining(objHandle: HCkAuthAzureAD): Integer; stdcall;
procedure CkAuthAzureAD_getResource(objHandle: HCkAuthAzureAD; outPropVal: HCkString); stdcall;
procedure CkAuthAzureAD_putResource(objHandle: HCkAuthAzureAD; newPropVal: PWideChar); stdcall;
function CkAuthAzureAD__resource(objHandle: HCkAuthAzureAD): PWideChar; stdcall;
procedure CkAuthAzureAD_getTenantId(objHandle: HCkAuthAzureAD; outPropVal: HCkString); stdcall;
procedure CkAuthAzureAD_putTenantId(objHandle: HCkAuthAzureAD; newPropVal: PWideChar); stdcall;
function CkAuthAzureAD__tenantId(objHandle: HCkAuthAzureAD): PWideChar; stdcall;
function CkAuthAzureAD_getValid(objHandle: HCkAuthAzureAD): wordbool; stdcall;
function CkAuthAzureAD_getVerboseLogging(objHandle: HCkAuthAzureAD): wordbool; stdcall;
procedure CkAuthAzureAD_putVerboseLogging(objHandle: HCkAuthAzureAD; newPropVal: wordbool); stdcall;
procedure CkAuthAzureAD_getVersion(objHandle: HCkAuthAzureAD; outPropVal: HCkString); stdcall;
function CkAuthAzureAD__version(objHandle: HCkAuthAzureAD): PWideChar; stdcall;
function CkAuthAzureAD_LoadTaskCaller(objHandle: HCkAuthAzureAD; task: HCkTask): wordbool; stdcall;
function CkAuthAzureAD_ObtainAccessToken(objHandle: HCkAuthAzureAD; connection: HCkSocket): wordbool; stdcall;
function CkAuthAzureAD_ObtainAccessTokenAsync(objHandle: HCkAuthAzureAD; connection: HCkSocket): HCkTask; stdcall;
function CkAuthAzureAD_SaveLastError(objHandle: HCkAuthAzureAD; path: PWideChar): wordbool; stdcall;
implementation
{$Include chilkatDllPath.inc}
function CkAuthAzureAD_Create; external DLLName;
procedure CkAuthAzureAD_Dispose; external DLLName;
procedure CkAuthAzureAD_SetAbortCheck; external DLLName;
procedure CkAuthAzureAD_SetProgressInfo; external DLLName;
procedure CkAuthAzureAD_SetPercentDone; external DLLName;
procedure CkAuthAzureAD_SetTaskCompleted; external DLLName;
procedure CkAuthAzureAD_getAccessToken; external DLLName;
procedure CkAuthAzureAD_putAccessToken; external DLLName;
function CkAuthAzureAD__accessToken; external DLLName;
procedure CkAuthAzureAD_getClientId; external DLLName;
procedure CkAuthAzureAD_putClientId; external DLLName;
function CkAuthAzureAD__clientId; external DLLName;
procedure CkAuthAzureAD_getClientSecret; external DLLName;
procedure CkAuthAzureAD_putClientSecret; external DLLName;
function CkAuthAzureAD__clientSecret; external DLLName;
procedure CkAuthAzureAD_getDebugLogFilePath; external DLLName;
procedure CkAuthAzureAD_putDebugLogFilePath; external DLLName;
function CkAuthAzureAD__debugLogFilePath; external DLLName;
procedure CkAuthAzureAD_getLastErrorHtml; external DLLName;
function CkAuthAzureAD__lastErrorHtml; external DLLName;
procedure CkAuthAzureAD_getLastErrorText; external DLLName;
function CkAuthAzureAD__lastErrorText; external DLLName;
procedure CkAuthAzureAD_getLastErrorXml; external DLLName;
function CkAuthAzureAD__lastErrorXml; external DLLName;
function CkAuthAzureAD_getLastMethodSuccess; external DLLName;
procedure CkAuthAzureAD_putLastMethodSuccess; external DLLName;
function CkAuthAzureAD_getNumSecondsRemaining; external DLLName;
procedure CkAuthAzureAD_getResource; external DLLName;
procedure CkAuthAzureAD_putResource; external DLLName;
function CkAuthAzureAD__resource; external DLLName;
procedure CkAuthAzureAD_getTenantId; external DLLName;
procedure CkAuthAzureAD_putTenantId; external DLLName;
function CkAuthAzureAD__tenantId; external DLLName;
function CkAuthAzureAD_getValid; external DLLName;
function CkAuthAzureAD_getVerboseLogging; external DLLName;
procedure CkAuthAzureAD_putVerboseLogging; external DLLName;
procedure CkAuthAzureAD_getVersion; external DLLName;
function CkAuthAzureAD__version; external DLLName;
function CkAuthAzureAD_LoadTaskCaller; external DLLName;
function CkAuthAzureAD_ObtainAccessToken; external DLLName;
function CkAuthAzureAD_ObtainAccessTokenAsync; external DLLName;
function CkAuthAzureAD_SaveLastError; external DLLName;
end.