this.ticketRegistry = new DefaultTicketRegistry();
this.authenticationManager = new DirectMappingAuthenticationManagerImpl();
final Map<Class<? extends Credentials>, DirectAuthenticationHandlerMappingHolder> credentialsMapping = new HashMap<Class<? extends Credentials>, DirectAuthenticationHandlerMappingHolder>();
final DirectAuthenticationHandlerMappingHolder holder = new DirectAuthenticationHandlerMappingHolder();
final OpenIdCredentialsAuthenticationHandler handler = new OpenIdCredentialsAuthenticationHandler();
handler.setTicketRegistry(this.ticketRegistry);
holder.setAuthenticationHandler(handler);
holder.setCredentialsToPrincipalResolver(new OpenIdCredentialsToPrincipalResolver());
this.authenticationManager.setCredentialsMapping(credentialsMapping);
credentialsMapping.put(OpenIdCredentials.class, holder);
final Map<String, UniqueTicketIdGenerator> generator = new HashMap<String, UniqueTicketIdGenerator>();