onCreate-user_application_lnk-set-default-fields.js revision 27b2ac15d8015fcdd3a940b10e788f408903670e
/*!
Math.uuid.js (v1.4)
mailto:robert@broofa.com
Copyright (c) 2010 Robert Kieffer
Dual licensed under the MIT and GPL licenses.
*/
/*
* Generate a random uuid.
*
* USAGE: Math.uuid(length, radix)
* length - the desired number of characters
* radix - the number of allowable values for each character.
*
* EXAMPLES:
* // No arguments - returns RFC4122, version 4 ID
* >>> Math.uuid()
* "92329D39-6F5C-4520-ABFC-AAB64544E172"
*
* // One argument - returns ID of the specified length
* >>> Math.uuid(15) // 15 character ID (default base=62)
* "VcydxgltxrVZSTV"
*
* // Two arguments - returns ID of the specified length, and radix. (Radix must be <= 62)
* >>> Math.uuid(8, 2) // 8 character ID (base=2)
* "01001010"
* >>> Math.uuid(8, 10) // 8 character ID (base=10)
* "47473046"
* >>> Math.uuid(8, 16) // 8 character ID (base=16)
* "098F4D35"
*/
/**
* Generation of uuid should be in other file.
* Move after https://bugster.forgerock.org/jira/browse/OPENIDM-563 is resolved
*/
// Private array of chars to use
if (len) {
// Compact form
} else {
// rfc4122, version 4 form
var r;
// rfc4122 requires these characters
// Fill in random data. At i==19 set the high bits of clock sequence as
// per rfc4122, sec. 4.1.5
for (i = 0; i < 36; i++) {
if (!uuid[i]) {
}
}
}
};
/**
* This script generates user UUID and sets default fields.
* It forces that user role is openidm-authorized and account status
* is active.
*
* It is run every time new user is created.
*/
}