Advanced JSS Authentication Extension

Use advanced authentication when the password or password hash are unknown by the authenticator; usually when authentication is being handled by an external system.

There are two methods that needs to be implemented are:

checkUserName(userName, userInfo)
authenticate(userName, password, authInfo)

When the server call these methods in your authenticator, it supplies user information that enables your extension to look up that user's authentication details from an external source.

Optionally, a setPassword() method can be defined, which enables users who have logged in via this authenticator to change their passwords:

setPassword(userName, newPassword, oldPassword)

function checkUserName(userName, userInfo)

Indicates whether or not the given user-name is valid. If true is returned the CompleteFTP won't allow other authenticators to try to authenticate this user.

If it's not possible to determine whether or not a user-name is valid also having a password then this method may return true regardless of the value of userName. However, if this is done then no authenticators (with lesser precedence) will be utilized.

The first argument is a string containing the user-name. If that's all that's required then the second argument may be left out.

The second argument, userInfo, has the following fields:

function authenticate(userName, password, authInfo)

Authenticates the client. This method will only be called if checkUserName return true.

The first and second arguments are strings containing the user-name and the password, respectively. If that's all that's required then the third argument may be left out.

The third argument, authInfo, has the following fields.

This method may return either a boolean or an object containing the following fields:

The methods isValidDSAKey(key) and isValidRSAKey(key) may be used to check keys. The argument must be a public key in a common format such as OpenSSH.

function setPassword(userName, newPassword, oldPassword)

Sets the password of the user to newPassword.