new Authentication(server, events)
This class provides the core authentication functionality.
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
server |
Server configuration object. Properties
|
||||||||||
events |
Event configuration object. Properties
|
- Source:
Methods
-
Dispose()
-
Disposes of the Authentication class instance and frees up allocated resources.
- Source:
-
DisplayLogin()
-
Displays a login dialog, creating it first if necessary.
- Source:
-
Login(username, password, saveUsername, savePassword)
-
Sends login message to server.
Parameters:
Name Type Description username
string password
string saveUsername
boolean savePassword
boolean - Source:
-
Logout()
-
Sends logout message to server.
- Source:
-
RemoveDialog()
-
Removes the login dialog and clears references to it.
- Source:
-
Socket_Authenticated(parameters)
-
Server authentication message handling.
Parameters:
Name Type Description parameters
Parameter information object.
Properties
Name Type Description SavePassword
boolean Determines whether or not to save the password used during this authentication request.
SaveUsername
boolean Determines whether or not to save the username used during this authentication request.
SessionKey
string The allocated session key for the handled authentication request.
UserID
number The user id of the authenticated user.
Username
string The username of the authenticated user.
- Source:
-
Socket_Connect()
-
The socket connect event handler will process the state of the Authentication class and either send login information or session key if appropriate. May be called multiple times to resume connections.
- Source:
-
Socket_Disconnect()
-
The socket disconnect event handler will log the disconnection event.
- Source:
-
Socket_InfoChanged(server)
-
Handles socket events signaling a change in authentication dialog info.
Parameters:
Name Type Description server
Object Server object containing changed information.
- Source:
-
Socket_InvalidLogin()
-
Processes an invalid login attempt as reported by the server.
- Source:
-
Socket_LoggedOut()
-
Handles a message from the server stating the authentication session has been logged out.
- Source:
-
Socket_Unauthorized()
-
Handles a message from the server stating that the authorization attempt was unauthorized.
- Source:
-
Initialize(parent)
-
Handles a message from the server stating that the authorization attempt was unauthorized.
Parameters:
Name Type Description parent
JQuery The object into which authentication dialogs may be injected.
- Source:
Type Definitions
-
AuthenticatedCallback(authentication)
-
Callback used by Authentication class when it has confirmed authentication.
Parameters:
Name Type Description authentication
Authentication The Authentication class used during the authentication.
- Source:
-
RequireLoginCallback(authentication)
-
Callback used by Authentication class when it has determined that login is required.
Parameters:
Name Type Description authentication
Authentication The Authentication class which has determined authentication to be required.
- Source: