<commit_before>'use strict';

var test = {
	"_id": new ObjectId("10d2cb5fc04ce51e06000001"),
	"oauth": {
		"secret": "shhh this is a secret",
		"redirectUri": "",
		"grants": ["password", "refresh_token"]
	},
	"code": "test",
	"name": "Test Tenant",
	"description": "this is a description for test tenant",
	"applications": [
		{
			"product": "TPROD",
			"package": "TPROD_BASIC",
			"appId": new ObjectId("30d2cb5fc04ce51e06000001"),
			"description": "this is a description for app for test tenant for test product and basic package",
			"acl": {
				"urac": {},
				"dashboard": {}
			},
			"_TTL": 7 * 24 * 3600 * 1000, // 7 days hours
			"keys": [
				{
					"key": "d1eaaf5fdc35c11119330a8a0273fee9",
					"extKeys": [
						{
							"expDate": new Date().getTime() + 7 * 24 * 3600 * 1000, // + 7 days
							"extKey": "aa39b5490c4a4ed0e56d7ec1232a428f771e8bb83cfcee16de14f735d0f5da587d5968ec4f785e38570902fd24e0b522b46cb171872d1ea038e88328e7d973ff47d9392f72b2d49566209eb88eb60aed8534a965cf30072c39565bd8d72f68ac",
							"device": {},
							"geo": {}
						}
					],
					"config": {
						"dev": {
							"mail": {
								"from": '<EMAIL>',
								"transport": {
									"type": "sendmail",
									"options": {}
								}
							},
							"urac": {
								"hashIterations": 1024, //used by hasher
								"seedLength": 32, //used by hasher
								"link": {
									"addUser": "http://dashboard.soajs.org/#/setNewPassword",
									"changeEmail": "http://dashboard.soajs.org/#/changeEmail/validate",
									"forgotPassword": "http://dashboard.soajs.org/#/resetPassword",
									"join": "http://dashboard.soajs.org/#/join/validate"
								},
								"tokenExpiryTTL": 2 * 24 * 3600 * 1000,// token expiry limit in seconds
								"validateJoin": true, //true if registration needs validation
								"mail": { //urac mail options
									"join": {
										"subject": 'Welcome to SOAJS'
									},
									"forgotPassword": {
										"subject": 'Reset Your Password at SOAJS'
									},
									"addUser": {
										"subject": 'Account Created at SOAJS'
									},
									"changeUserStatus": {
										"subject": "Account Status changed at SOAJS",
//use custom HTML
										"content": "<p>Dear <b>{{ username }}</b>, <br />The administrator update your account status to <b>{{ status }}</b> on {{ts}}.<br /><br />Regards,<br/>SOAJS Team.</p>"
									},
									"changeEmail": {
										"subject": "Change Account Email at SOAJS"
									}
								}
							}
						}
					}
				}
			]
		},
		{
			"product": "TPROD",
			"package": "TPROD_BASIC",
			"appId": new ObjectId("30d2cb5fc04ce51e06000002"),
			"description": "this is a description for app for test tenant for test product and basic package, and with example03 in acl",
			"acl": {
				"urac": {},
				"example03": {
					"access": true
				},
				"example06": {
					"access": false
				}
			},
			"_TTL": 86400000, // 24 hours
			"keys": [
				{
					"key": "695d3456de70fddc9e1e60a6d85b97d3",
					"extKeys": [
						{
							"expDate": new Date().getTime() + 86400000,
							"extKey": "<KEY>",
							"device": {
								"allow": [{
									"family": "chrome",
									'major': '41',
									'minor': '0',
									'patch': {'min': '2222', 'max': '2229'}
								}],
								"deny": [{'family': 'IE'}]
							},
							"geo": {"allow": ["127.0.0.1", "localhost"], "deny": ['192.168.3.11']}
						}
					],
					"config": {
						"dev": {
							"urac": {},
							"example06": {
								"SOAJS": {
									"IMFV": {
										"schema":{
											"commonFields": {
												"type": {
													"required": false,
													"default": "userTEST",
													"source": ["body.type"],
													"validation": {
														"type": "string"
													}
												}
											},
											"/testRoute": {
												"commonFields": ["type"],
												"email": {
													"required": true,
													"source": ["body.email"],
													"validation": {
														"type": "string",
														"format": "email"
													}
												}
											}
										}
									}
								}
							}
						}
					}
				},
				{
					"key": "3d8443e0d100c24f2246926ae67fed22",
					"extKeys": [
						{
							"expDate": new Date().getTime() + 86400000,
							"extKey": "<KEY>",
							"device": {},
							"geo": {}
						},
						{
							"expDate": new Date().getTime() + (86400000 * 2),
							"extKey": "fa0a469b4d067ee9840c429bf5c68c335d900d114b873f66491588af46c5d673a3fc0c2ff6df6bacecc578c14e3a861f27c429b3015eb76d834fbcaf25a7f79ebe58a11c5a6bf0732da3b507f81ca7535b1d6b1d3bee42363589764ac3c9e459",
							"device": {},
							"geo": {}
						}
					],
					"config": {
						"dev": {
							"urac": {}
						}
					}
				}
			]
		},
		{
			"product": "TPROD",
			"package": "TPROD_EXAMPLE03",
			"appId": new ObjectId("30d2cb5fc04ce51e06000003"),
			"description": "this is a description for app for test tenant for test product and example03 package",
			"_TTL": 86400000, // 24 hours
			"keys": [
				{
					"key": "<KEY>",
					"extKeys": [
						{
							"expDate": new Date().getTime() + 86400000,
							"extKey": "aa39b5490c4a4ed0e56d7ec1232a428f1c5b5dcabc0788ce563402e233386738fc3eb18234a486ce1667cf70bd0e8b08890a86126cf1aa8d38f84606d8a6346359a61678428343e01319e0b784bc7e2ca267bbaafccffcb6174206e8c83f2a25",
							"device": {},
							"geo": {}
						}
					],
					"config": {
						"dev": {
							"urac": {}
						}
					}
				}
			]
		},
		{
			"product": "TPROD",
			"package": "TPROD_BASI2",
			"appId": new ObjectId("570697570548600601bfeed7"),
			"description": "this is a description for app for test tenant for test product and example03 package",
			"_TTL": 86400000, // 24 hours
			"acl":{
				"urac": {},
				"example03":{
					"access": true,
					"apis":{
						"/info2":{
							"access":["owner"]
						}
					}
				}
			},
			"keys": [
				{
					"key": "<KEY>",
					"extKeys": [
						{
							"expDate": new Date().getTime() + 86400000,
							"extKey": "<KEY>",
							"device": {},
							"geo": {}
						}
					],
					"config": {
						"dev": {
							"urac": {}
						}
					}
				}
			]
		}
	]
};
<commit_msg>added oauth to the tenant acl<commit_after>'use strict';

var test = {
	"_id": new ObjectId("10d2cb5fc04ce51e06000001"),
	"oauth": {
		"secret": "shhh this is a secret",
		"redirectUri": "",
		"grants": ["password", "refresh_token"]
	},
	"code": "test",
	"name": "Test Tenant",
	"description": "this is a description for test tenant",
	"applications": [
		{
			"product": "TPROD",
			"package": "TPROD_BASIC",
			"appId": new ObjectId("30d2cb5fc04ce51e06000001"),
			"description": "this is a description for app for test tenant for test product and basic package",
			"acl": {
				"urac": {},
                "oauth": {},
				"dashboard": {}
			},
			"_TTL": 7 * 24 * 3600 * 1000, // 7 days hours
			"keys": [
				{
					"key": "d1eaaf5fdc35c11119330a8a0273fee9",
					"extKeys": [
						{
							"expDate": new Date().getTime() + 7 * 24 * 3600 * 1000, // + 7 days
							"extKey": "aa39b5490c4a4ed0e56d7ec1232a428f771e8bb83cfcee16de14f735d0f5da587d5968ec4f785e38570902fd24e0b522b46cb171872d1ea038e88328e7d973ff47d9392f72b2d49566209eb88eb60aed8534a965cf30072c39565bd8d72f68ac",
							"device": {},
							"geo": {}
						}
					],
					"config": {
						"dev": {
							"mail": {
								"from": '<EMAIL>',
								"transport": {
									"type": "sendmail",
									"options": {}
								}
							},
							"urac": {
								"hashIterations": 1024, //used by hasher
								"seedLength": 32, //used by hasher
								"link": {
									"addUser": "http://dashboard.soajs.org/#/setNewPassword",
									"changeEmail": "http://dashboard.soajs.org/#/changeEmail/validate",
									"forgotPassword": "http://dashboard.soajs.org/#/resetPassword",
									"join": "http://dashboard.soajs.org/#/join/validate"
								},
								"tokenExpiryTTL": 2 * 24 * 3600 * 1000,// token expiry limit in seconds
								"validateJoin": true, //true if registration needs validation
								"mail": { //urac mail options
									"join": {
										"subject": 'Welcome to SOAJS'
									},
									"forgotPassword": {
										"subject": 'Reset Your Password at SOAJS'
									},
									"addUser": {
										"subject": 'Account Created at SOAJS'
									},
									"changeUserStatus": {
										"subject": "Account Status changed at SOAJS",
//use custom HTML
										"content": "<p>Dear <b>{{ username }}</b>, <br />The administrator update your account status to <b>{{ status }}</b> on {{ts}}.<br /><br />Regards,<br/>SOAJS Team.</p>"
									},
									"changeEmail": {
										"subject": "Change Account Email at SOAJS"
									}
								}
							}
						}
					}
				}
			]
		},
		{
			"product": "TPROD",
			"package": "TPROD_BASIC",
			"appId": new ObjectId("30d2cb5fc04ce51e06000002"),
			"description": "this is a description for app for test tenant for test product and basic package, and with example03 in acl",
			"acl": {
				"urac": {},
				"example03": {
					"access": true
				},
				"example06": {
					"access": false
				}
			},
			"_TTL": 86400000, // 24 hours
			"keys": [
				{
					"key": "695d3456de70fddc9e1e60a6d85b97d3",
					"extKeys": [
						{
							"expDate": new Date().getTime() + 86400000,
							"extKey": "<KEY>",
							"device": {
								"allow": [{
									"family": "chrome",
									'major': '41',
									'minor': '0',
									'patch': {'min': '2222', 'max': '2229'}
								}],
								"deny": [{'family': 'IE'}]
							},
							"geo": {"allow": ["127.0.0.1", "localhost"], "deny": ['192.168.3.11']}
						}
					],
					"config": {
						"dev": {
							"urac": {},
							"example06": {
								"SOAJS": {
									"IMFV": {
										"schema":{
											"commonFields": {
												"type": {
													"required": false,
													"default": "userTEST",
													"source": ["body.type"],
													"validation": {
														"type": "string"
													}
												}
											},
											"/testRoute": {
												"commonFields": ["type"],
												"email": {
													"required": true,
													"source": ["body.email"],
													"validation": {
														"type": "string",
														"format": "email"
													}
												}
											}
										}
									}
								}
							}
						}
					}
				},
				{
					"key": "3d8443e0d100c24f2246926ae67fed22",
					"extKeys": [
						{
							"expDate": new Date().getTime() + 86400000,
							"extKey": "<KEY>",
							"device": {},
							"geo": {}
						},
						{
							"expDate": new Date().getTime() + (86400000 * 2),
							"extKey": "fa0a469b4d067ee9840c429bf5c68c335d900d114b873f66491588af46c5d673a3fc0c2ff6df6bacecc578c14e3a861f27c429b3015eb76d834fbcaf25a7f79ebe58a11c5a6bf0732da3b507f81ca7535b1d6b1d3bee42363589764ac3c9e459",
							"device": {},
							"geo": {}
						}
					],
					"config": {
						"dev": {
							"urac": {}
						}
					}
				}
			]
		},
		{
			"product": "TPROD",
			"package": "TPROD_EXAMPLE03",
			"appId": new ObjectId("30d2cb5fc04ce51e06000003"),
			"description": "this is a description for app for test tenant for test product and example03 package",
			"_TTL": 86400000, // 24 hours
			"keys": [
				{
					"key": "<KEY>",
					"extKeys": [
						{
							"expDate": new Date().getTime() + 86400000,
							"extKey": "aa39b5490c4a4ed0e56d7ec1232a428f1c5b5dcabc0788ce563402e233386738fc3eb18234a486ce1667cf70bd0e8b08890a86126cf1aa8d38f84606d8a6346359a61678428343e01319e0b784bc7e2ca267bbaafccffcb6174206e8c83f2a25",
							"device": {},
							"geo": {}
						}
					],
					"config": {
						"dev": {
							"urac": {}
						}
					}
				}
			]
		},
		{
			"product": "TPROD",
			"package": "TPROD_BASI2",
			"appId": new ObjectId("570697570548600601bfeed7"),
			"description": "this is a description for app for test tenant for test product and example03 package",
			"_TTL": 86400000, // 24 hours
			"acl":{
				"urac": {},
				"example03":{
					"access": true,
					"apis":{
						"/info2":{
							"access":["owner"]
						}
					}
				}
			},
			"keys": [
				{
					"key": "<KEY>",
					"extKeys": [
						{
							"expDate": new Date().getTime() + 86400000,
							"extKey": "<KEY>",
							"device": {},
							"geo": {}
						}
					],
					"config": {
						"dev": {
							"urac": {}
						}
					}
				}
			]
		}
	]
};

{'fraction_non_alphanumeric': 0.1735424205870527, 'fraction_numerical': 0.10631282669883393, 'mean_word_length': 1.9722753346080306, 'pattern_counts': {'":': 297, '<': 35, '<?xml version=': 0, '>': 35, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 4, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3505575', 'n_tokens_mistral': 7666, 'n_tokens_neox': 4552, 'n_words': 820}