Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: edits/style, syntax,, scope update from Dev
Scripting_function


Panel
titleDescription

Tests credentials (username and password) against an authentication profile. Returns a boolean based upon whether or not the authentication profile accepts the credentials. If the authentication profile name is omitted, then the current project's default authentication profile is used.

Client permissions restrictions


Panel
titleSyntax

system.security.validateUser(username, password, [authProfile], [timeout])

  • Parameters

String username - The username to validate.

String password - The password for the user.

String authProfile - The name of the authentication profile to run against. Optional. Leaving this out will use the project's default profile. [optional]

Integer timeout - Timeout for clientClient-to-gateway Gateway communication. (default: Default is 60,000ms). [optional]

  • Returns

booleanBoolean - false(0) False if the user failed to authenticate, true(1) ; True if the username/password was a valid combination.

  • Scope

Vision Client

Panel
titleSyntax

system.security.validateUser(username, password, [authProfile])

  • Parameters

String username - User name The username to validate.

String password - User's passwordThe password for the user.

String authProfile - The name of the authentication profile to run against. Optional. Leaving this out will use the project's default profile. [optional]

  • Returns

booleanBoolean - False if the user failed to authenticate; True if valid the username/password was a valid combination.

  • Scope

Gateway, Perspective Session

Panel
titleCode Examples
Code Block
languagepy
titleCode Snippet
# This would require the current user to enter their password again before proceeding.
 
currentUser = system.security.getUsername()
password = system.gui.passwordBox("Confirm Password")
valid = system.security.validateUser(currentUser, password)
if valid:
   # doDo something.
else:
   system.gui.errorBox("Incorrect password")
Panel
titleKeywords

system security validateUser, security.validateUser