All Downloads are FREE. Search and download functionalities are using the official Maven repository.

profiles.input.microsoftLive.json Maven / Gradle / Ivy

{
	"ver": "2",
	"name": "sys:microsoftLive",
	"description": "Translation profile for microsoft live  authn",
	"type": "INPUT",
	"rules": [
		{
			"condition": {
				"conditionValue": "true"
			},
			"action": {
				"name": "mapIdentity",
				"parameters": [
					"identifier",
					"attr['id']",
					"sys:all",
					"CREATE_OR_MATCH"
				]
			}
		},
		{
			"condition": {
				"conditionValue": "true"
			},
			"action": {
				"name": "mapAttribute",
				"parameters": [
					"uid",
					"/",
					"attr['user_id']",
					"CREATE_OR_UPDATE"
				]
			}
		},
		{
			"condition": {
				"conditionValue": "true"
			},
			"action": {
				"name": "mapAttribute",
				"parameters": [
					"name",
					"/",
					"attr['name']",
					"CREATE_OR_UPDATE"
				]
			}
		},
		{
			"condition": {
				"conditionValue": "true"
			},
			"action": {
				"name": "mapAttribute",
				"parameters": [
					"firstname",
					"/",
					"attr['first_name']",
					"CREATE_OR_UPDATE"
				]
			}
		},
		{
			"condition": {
				"conditionValue": "true"
			},
			"action": {
				"name": "mapAttribute",
				"parameters": [
					"surname",
					"/",
					"attr['last_name']",
					"CREATE_OR_UPDATE"
				]
			}
		},
		{
			"condition": {
				"conditionValue": "true"
			},
			"action": {
				"name": "mapAttribute",
				"parameters": [
					"profileURL",
					"/",
					"attr['link']",
					"CREATE_OR_UPDATE"
				]
			}
		},
		{
			"condition": {
				"conditionValue": "(attr contains 'birth_day') && (attr contains 'birth_month') && (attr contains 'birth_year')"
			},
			"action": {
				"name": "mapAttribute",
				"parameters": [
					"birthday",
					"/",
					"String.format('%02d', Integer.parseInt(attr['birth_day'])) + '/' +  String.format('%02d', Integer.parseInt(attr['birth_month'])) + '/' + attr['birth_year']",
					"CREATE_OR_UPDATE"
				]
			}
		},
		{
			"condition": {
				"conditionValue": "true"
			},
			"action": {
				"name": "mapAttribute",
				"parameters": [
					"company",
					"/",
					"attr['employer']",
					"CREATE_OR_UPDATE"
				]
			}
		},
		{
			"condition": {
				"conditionValue": "(attrObj contains 'emails') && (attrObj['emails'] contains 'account')"
			},
			"action": {
				"name": "mapAttribute",
				"parameters": [
					"email",
					"/",
					"attrObj.?emails.?account + '[CONFIRMED]'",
					"CREATE_OR_UPDATE"
				]
			}
		},
		{
			"condition": {
				"conditionValue": "(attrObj contains 'phones') && (attrObj['phones'] contains 'personal') && (attrObj.?phones.?personal != null)"
			},
			"action": {
				"name": "mapAttribute",
				"parameters": [
					"telephoneNumber",
					"/",
					"String.valueOf(attrObj.phones.personal).replace('(','').replace(')','').replace('.','').replace('-','').replace(' ','')",
					"CREATE_OR_UPDATE"
				]
			}
		},
		{
			"condition": {
				"conditionValue": "(attrObj contains 'phones') && (attrObj['phones'] contains 'mobile') && (attrObj.?phones.?mobile != null)"
			},
			"action": {
				"name": "mapAttribute",
				"parameters": [
					"mobile",
					"/",
					"String.valueOf(attrObj.phones.mobile).replace('(','').replace(')','').replace('.','').replace('-','').replace(' ','')",
					"CREATE_OR_UPDATE"
				]
			}
		},
		{
			"condition": {
				"conditionValue": "true"
			},
			"action": {
				"name": "mapAttribute",
				"parameters": [
					"locale",
					"/",
					"attr['locale']",
					"CREATE_OR_UPDATE"
				]
			}
		},
		{
			"condition": {
				"conditionValue": "(attrObj contains 'addresses') && (attrObj['addresses]'] contains 'personal')"
			},
			"action": {
				"name": "mapAttribute",
				"parameters": [
					"address",
					"/",
					"attrObj.?addresses.?personal.?street + ',' + attrObj.?addresses.?personal.?street2 + ',' + attrObj.?addresses.?personal.?city + ',' + attrObj.?addresses.?personal.?state + ',' + attrObj.?addresses.?personal.?postal_code + ',' + attrObj.?addresses.?personal.?region",
					"CREATE_OR_UPDATE"
				]
			}
		}
		,
		{
			"condition": {
				"conditionValue": "true"
			},
			"action": {
				"name": "mapAttribute",
				"parameters": [
					"street",
					"/",
					"attrObj.?addrresses.?personal.?street",
					"CREATE_OR_UPDATE"
				]
			}
		},
		{
			"condition": {
				"conditionValue": "true"
			},
			"action": {
				"name": "mapAttribute",
				"parameters": [
					"postalCode",
					"/",
					"attrObj.?addresses.?personal.?postal_code",
					"CREATE_OR_UPDATE"
				]
			}
		}
		,
		{
			"condition": {
				"conditionValue": "true"
			},
			"action": {
				"name": "mapAttribute",
				"parameters": [
					"city",
					"/",
					"attrObj.?addresses.?personal.?city",
					"CREATE_OR_UPDATE"
				]
			}
		},
		{
			"condition": {
				"conditionValue": "true"
			},
			"action": {
				"name": "mapAttribute",
				"parameters": [
					"provinceName",
					"/",
					"attrObj.?addresses.?personal.?state",
					"CREATE_OR_UPDATE"
				]
			}
		},
		{
			"condition": {
				"conditionValue": "true"
			},
			"action": {
				"name": "mapAttribute",
				"parameters": [
					"country",
					"/",
					"attrObj.?addresses.?personal.?region",
					"CREATE_OR_UPDATE"
				]
			}
		}
	]
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy