createTokenFormatWithRandomTokenLength()
createTokenFormatWithRandomTokenLength() creates a new token format which can be used to generate a token with a random length.
Request URL
http://localhost:8080/tmrest/SafeNetTokenManager/createTokenFormatWithRandomTokenLength
Method
POST
Request Parameters
Parameters | Descriptions |
---|---|
naeUser | A Key Manager user with access to the AES and HMAC keys. |
naePassword | The Key Manager user’s password. |
dbUser (optional) | A database user with access to the token table. |
dbPassword (optional) | The database user’s password. |
formatForToken | The format in which token is required. |
minLength | The minimum length for the token, default is 0. |
maxLength | The maximum length for the token, default is 0. |
leadMask (optional) | A fixed number of digits to mask the leading positions. For example, if the leadMask is set to 7777, the first four digits of the token will be 7’s. |
dbHost (optional) | The database host name. |
dbPort (optional) | The database port. |
dbName (optional) | The database name. |
Note
The dbHost, dbPort, and dbName parameters are supported for MySQL database only.
Returned Values
An integer value which represents the new token format, the value will be greater than 100.
Example
{
"naeUser":"rajesh",
"naePassword":"xxxxxxxx",
"dbUser":"sa",
"dbPassword":"xxxxxxxx",
"formatForToken":10,
"minLength":"10",
"maxLength":"19",
"leadMask":"7777"
}
Example with Database Properties
{
"naeUser":"rajesh",
"naePassword":"xxxxxxxx",
"dbUser":"sa",
"dbPassword":"xxxxxxxx",
"dbHost":"10.164.14.111",
"dbPort":"3306",
"dbName":"test"
"formatForToken":10,
"minLength":"10",
"maxLength":"19",
"leadMask":"7777"
}
Result
{
format: 105
}