use of org.wildfly.extension.camel.security.EncodedUsernamePasswordPrincipal in project wildfly-camel by wildfly-extras.
the class SecuredSpringRouteTestCase method getAuthenticationToken.
Subject getAuthenticationToken(String domain, String username, String password) {
Subject subject = new Subject();
subject.getPrincipals().add(new DomainPrincipal(domain));
subject.getPrincipals().add(new EncodedUsernamePasswordPrincipal(username, password.toCharArray()));
return subject;
}
use of org.wildfly.extension.camel.security.EncodedUsernamePasswordPrincipal in project wildfly-camel by wildfly-extras.
the class AnnotatedSLSB method secureRouteAccess.
@RolesAllowed({ "Role2" })
public String secureRouteAccess(String msg) {
// [TODO #725] Add support for security context propagation
Subject subject = new Subject();
String username = ejbctx.getCallerPrincipal().getName();
subject.getPrincipals().add(new DomainPrincipal("user-domain"));
subject.getPrincipals().add(new EncodedUsernamePasswordPrincipal(username, PASSWORD.toCharArray()));
ProducerTemplate producer = camelctx.createProducerTemplate();
return producer.requestBodyAndHeader("direct:start", msg, Exchange.AUTHENTICATION, subject, String.class);
}
use of org.wildfly.extension.camel.security.EncodedUsernamePasswordPrincipal in project wildfly-camel by wildfly-extras.
the class ClientLoginIntegrationTest method getAuthenticationToken.
Subject getAuthenticationToken(String domain, String username, String password) {
Subject subject = new Subject();
subject.getPrincipals().add(new DomainPrincipal(domain));
subject.getPrincipals().add(new EncodedUsernamePasswordPrincipal(username, password.toCharArray()));
return subject;
}
use of org.wildfly.extension.camel.security.EncodedUsernamePasswordPrincipal in project wildfly-camel by wildfly-extras.
the class AuthorizationPolicyTestCase method getAuthenticationToken.
Subject getAuthenticationToken(String domain, String username, String password) {
Subject subject = new Subject();
subject.getPrincipals().add(new DomainPrincipal(domain));
subject.getPrincipals().add(new EncodedUsernamePasswordPrincipal(username, password.toCharArray()));
return subject;
}
use of org.wildfly.extension.camel.security.EncodedUsernamePasswordPrincipal in project wildfly-camel by wildfly-extras.
the class SecuredRouteTestCase method getAuthenticationToken.
Subject getAuthenticationToken(String domain, String username, String password) {
Subject subject = new Subject();
subject.getPrincipals().add(new DomainPrincipal(domain));
subject.getPrincipals().add(new EncodedUsernamePasswordPrincipal(username, password.toCharArray()));
return subject;
}
Aggregations