Hello,
Having the GraphQL endpoint annotated with @GraphQLAPI and @RequestScoped I cant inject SecurityContext in the CDI.
I can inject Principal, but because this is a WELD proxy, I can not cast it to get an access to the roles. graphql-java provides the DataFetchingEnvironment, which in my understanding contains security context (?), but it doesn't work in Wildfly.
I see that the problem is that the CDI is called from another thread (Callable) and loose the context.
What is the correct way to provide programmatic security?
Kind regards,
Dmitry
Hello,
Having the GraphQL endpoint annotated with @GraphQLAPI and @RequestScoped I cant inject SecurityContext in the CDI.
I can inject Principal, but because this is a WELD proxy, I can not cast it to get an access to the roles. graphql-java provides the DataFetchingEnvironment, which in my understanding contains security context (?), but it doesn't work in Wildfly.
I see that the problem is that the CDI is called from another thread (Callable) and loose the context.
What is the correct way to provide programmatic security?
Kind regards,
Dmitry