-
Notifications
You must be signed in to change notification settings - Fork 0
/
application.cfc
42 lines (27 loc) · 879 Bytes
/
application.cfc
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
<cfscript>
component extends="taffy.core.api" {
this.name = "taffy_21";
this.applicationTimeout = createTimeSpan(0, 4, 0, 0);
this.applicationManagement = true;
this.ormenabled = true;
this.ormsettings.eventhandling = true;
this.datasource = "UserManager";
this.mappings['/resources'] = expandPath('./resources');
this.mappings['/taffy'] = expandPath('./taffy');
function onApplicationStart() output="false" {
application.util = new formutils.FormUtils().init();
return super.onApplicationStart();
}
function onTaffyRequest(verb, cfc, requestArguments, mimeExt, headers) {
application.util.buildFormCollections(form);
/*
if(!arguments.headers.keyExists("apiKey")){
//unauthorized because they haven't included their API key
return rep({ 'error' : 'Missing header apiKey' }).withStatus(401);
}
*/
//api key found
return true;
}
}
</cfscript>