com.prosysopc.ua.server
Interface UserValidator


public interface UserValidator

An interface used for custom user validation in UaServer.


Method Summary
 boolean onValidate(Session session, ServerUserIdentity userIdentity)
          Validate the user specified by token.
 void onValidationError(Session session, org.opcfoundation.ua.core.UserIdentityToken userToken, Exception exception)
          Notification of a validation error.
 

Method Detail

onValidate

boolean onValidate(Session session,
                   ServerUserIdentity userIdentity)
                   throws StatusException
Validate the user specified by token.

Parameters:
session - The session which the user is logging in.
userIdentity - the user identity.
Returns:
true, if the user is allowed access.
Throws:
StatusException - if there is a problem with the validation. For example, if the session is active, and you do not want to enable user identity change, throw the exception with StatusCodes.Bad_IdentityChangeNotSupported.

onValidationError

void onValidationError(Session session,
                       org.opcfoundation.ua.core.UserIdentityToken userToken,
                       Exception exception)
Notification of a validation error. This may occur due to password validation failure or because the user was not accepted .

Parameters:
session - The session which the user was logging in.
userToken - The user token that was used.
exception - The validation exception: StatusException if the user is not accepted. SecureIdentityException if the token was not valid.


Copyright © 2018. All rights reserved.