use of org.eclipse.milo.opcua.sdk.server.identity.IdentityValidator in project milo by eclipse.
the class SessionManager method validateIdentityToken.
private Object validateIdentityToken(Session session, Object tokenObject, SignatureData tokenSignature) throws UaException {
IdentityValidator identityValidator = server.getConfig().getIdentityValidator();
UserTokenPolicy tokenPolicy = validatePolicyId(session, tokenObject);
if (tokenObject instanceof UserIdentityToken) {
return identityValidator.validateIdentityToken(session, (UserIdentityToken) tokenObject, tokenPolicy, tokenSignature);
} else {
throw new UaException(StatusCodes.Bad_IdentityTokenInvalid);
}
}
Aggregations