mnhlvsk opened a new issue #3353:
URL: https://github.com/apache/camel-quarkus/issues/3353
Hi guys,
I'm trying to use SecurityIdentity with Quarkus Camel, but can't get it
working. Always getting an exception ContextNotActiveException when I call
SecurityIdentity. Could you please help me how to solve it?
application.properties:
quarkus.http.auth.basic=true
quarkus.http.auth.permission.default.paths=/*
quarkus.http.auth.permission.default.policy=authenticated
quarkus.security.users.embedded.enabled=true
quarkus.security.users.embedded.plain-text=true
quarkus.security.users.embedded.users.jdoe=p4ssw0rd
quarkus.security.users.embedded.roles.jdoe=NoRolesUser
Route:
@ApplicationScoped
public class CamelRoute extends EndpointRouteBuilder {
@Inject
GreetingProcessor proc;
@Override
public void configure() throws Exception {
from("platform-http:/myservice")
.process(proc);
}
}
Processor:
@ApplicationScoped
public class GreetingProcessor implements Processor {
@Inject
SecurityIdentity identity;
@Override
public void process(Exchange exchange) throws Exception {
System.out.println(identity.getPrincipal().getName());
}
}
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]