public void authorize(final AuthenticatedUser user, final RequestMessage msg) throws AuthorizationException {
        if (!usernamesSandbox.contains(user.getName())) {
            throw new AuthorizationException(REJECT_STRING);
        }
    }
Checks whether a user is authorized to have a script request from a gremlin client answered and raises an
{@link AuthorizationException} if this is not the case.

@param user {@link AuthenticatedUser} that needs authorization.
@param msg {@link RequestMessage} in which the {@link Tokens}.ARGS_GREMLIN argument can contain an arbitrary succession of script statements.
gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/authz/AllowListAuthorizer.java