forked from NextStepGuru/nsg-module-facebook
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathModuleConfig.cfc
More file actions
84 lines (67 loc) · 1.98 KB
/
ModuleConfig.cfc
File metadata and controls
84 lines (67 loc) · 1.98 KB
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
component {
// Module Properties
this.title = "facebook";
this.author = "Jeremy R DeYoung";
this.webURL = "http://www.nextstep.guru";
this.description = "Coldbox Module to allow Social Login via Facebook";
this.version = "1.0.5";
// If true, looks for views in the parent first, if not found, then in the module. Else vice-versa
this.viewParentLookup = true;
// If true, looks for layouts in the parent first, if not found, then in module. Else vice-versa
this.layoutParentLookup = true;
// Module Entry Point
this.entryPoint = "facebook";
// Model Namespace
this.modelNamespace = "facebook";
// CF Mapping
this.cfmapping = "facebook";
// Module Dependencies
this.dependencies = ["nsg-module-security","nsg-module-oauth"];
function configure(){
// parent settings
parentSettings = {
};
// module settings - stored in modules.name.settings
settings = {
oauth = {
oauthVersion = 2,
authorizeRequestURL = "https://www.facebook.com/dialog/oauth",
tokenRequestURL = "https://graph.facebook.com/oauth/access_token"
}
};
// Layout Settings
layoutSettings = {
};
// datasources
datasources = {
};
// SES Routes
routes = [
// Module Entry Point
{pattern="/", handler="oauth",action="index"},
{pattern="/oauth/:id?", handler="oauth",action="index"}
];
// Custom Declared Points
interceptorSettings = {
customInterceptionPoints = "facebookLoginFailure,facebookLoginSuccess"
};
// Custom Declared Interceptors
interceptors = [
];
// Binder Mappings
binder.mapDirectory( "#moduleMapping#.models" );
}
/**
* Fired when the module is registered and activated.
*/
function onLoad(){
var nsgSocialLogin = controller.getSetting('nsgSocialLogin',false,arrayNew());
arrayAppend(nsgSocialLogin,{"name":"facebook","icon":"facebook","title":"Facebook"});
controller.setSetting('nsgSocialLogin',nsgSocialLogin);
}
/**
* Fired when the module is unregistered and unloaded
*/
function onUnload(){
}
}