use of io.pivotal.cla.security.Login.UserAuthentication in project pivotal-cla by pivotalsoftware.
the class WithSigningUserFactory method createSecurityContext.
@Override
public SecurityContext createSecurityContext(WithSigningUser user) {
User principal = create();
principal.setAdminAccessRequested(user.requestedAdmin());
UserAuthentication auth = new UserAuthentication(principal);
SecurityContext context = SecurityContextHolder.createEmptyContext();
context.setAuthentication(auth);
return context;
}
use of io.pivotal.cla.security.Login.UserAuthentication in project pivotal-cla by pivotalsoftware.
the class WithClaAuthorUserFactory method createSecurityContext.
@Override
public SecurityContext createSecurityContext(WithClaAuthorUser user) {
User adminUser = create();
UserAuthentication auth = new UserAuthentication(adminUser);
SecurityContext context = SecurityContextHolder.createEmptyContext();
context.setAuthentication(auth);
return context;
}
use of io.pivotal.cla.security.Login.UserAuthentication in project pivotal-cla by pivotalsoftware.
the class WithAdminUserFactory method createSecurityContext.
@Override
public SecurityContext createSecurityContext(WithAdminUser user) {
User adminUser = create();
UserAuthentication auth = new UserAuthentication(adminUser);
SecurityContext context = SecurityContextHolder.createEmptyContext();
context.setAuthentication(auth);
return context;
}
Aggregations