Generates a new credential that is in compliance with the provided policy.
Syntax
String
generateCredential
(
CredentialPolicy
policy
,
boolean
numericOnly
,
final long
callerId
) throws CredentialStrengthException
Parameters
-
policy –
the CredentialPolicy that the credential must adhere to.
-
numericOnly –
indicates if the credential should only contain numbers.
-
callerId –
represents the ID of the caller of the operation. Used for tracking/audit purposes.
Returns
the generated credential in plain text
Exceptions
-
CredentialGenerationException –
if it was not possible to generate a credential that is compliant to the policy. Probably means that the policy is wrongly configured.
Usage
the generated credential in plain text