Search in sources :

Example 1 with DefaultSecurityContextFactory

use of org.mule.runtime.core.internal.security.DefaultSecurityContextFactory in project mule by mulesoft.

the class MuleEventTestCase method createTestAuthentication.

private SecurityContext createTestAuthentication() {
    Authentication auth = new DefaultMuleAuthentication(new DefaultMuleCredentials("dan", new char[] { 'd', 'f' }));
    SecurityContext securityContext = new DefaultSecurityContextFactory().create(auth.setProperties(singletonMap("key1", "value1")));
    return securityContext;
}
Also used : DefaultSecurityContextFactory(org.mule.runtime.core.internal.security.DefaultSecurityContextFactory) DefaultMuleAuthentication(org.mule.runtime.api.security.DefaultMuleAuthentication) Authentication(org.mule.runtime.api.security.Authentication) SecurityContext(org.mule.runtime.api.security.SecurityContext) DefaultMuleCredentials(org.mule.runtime.core.api.security.DefaultMuleCredentials) DefaultMuleAuthentication(org.mule.runtime.api.security.DefaultMuleAuthentication)

Aggregations

Authentication (org.mule.runtime.api.security.Authentication)1 DefaultMuleAuthentication (org.mule.runtime.api.security.DefaultMuleAuthentication)1 SecurityContext (org.mule.runtime.api.security.SecurityContext)1 DefaultMuleCredentials (org.mule.runtime.core.api.security.DefaultMuleCredentials)1 DefaultSecurityContextFactory (org.mule.runtime.core.internal.security.DefaultSecurityContextFactory)1