@Override
    public Function<ContainerRequest, ?> getValueProvider(Parameter parameter) {

        if (parameter.getAnnotation(TokenParam.class) == null)
            return null;

        return (request) -> authenticationService.getAuthenticationToken(request);

    }
Service for authenticating users and working with the resulting
authentication tokens.
guacamole/src/main/java/org/apache/guacamole/rest/TokenParamProvider.java