I was wondering what the best way is to replace the genericPrincipal with my own CustomGenericPrincipal.
At the moment I have something like this but I aint sure if it\'
You are missing a subtle detail, the thread.
Context.User = Thread.CurrentPrincipal = new CustomPrincipal....
Will get you where you need to go.
Also I notice you mention that you need to only replace the principal. If this is the case, you can simply reuse the FormsIdentity that has already been constructed for you as shown below.
Context.User = Thread.CurrentPrincipal = new CustomPrincipal(Context.User.Identity /*, add roles here if desired*/ );