@Override
public AuthenticationInfo getAuthenticationInfo(AuthenticationToken token) {
AuthenticationInfoBuilder authenticationInfoBuilder = new AuthenticationInfoBuilder();
authenticationInfoBuilder.principalId(principalId++).name(token.getPrincipal().toString());
// TODO: Change for production. Here we use username as password
authenticationInfoBuilder.realmName("MyApp").password(token.getPrincipal());
return authenticationInfoBuilder.build();
}