I have written a custom loginModule used by a web application, which sets a specific CustomPrincipal for the subject.
The problem is that request.getUserPrincipal always returns a JBossUserPrincipal.
I have been able to get the authenticated subject and then my CustomPrincipal by SecurityAssociation.getSubject by I would prefer a non JBoss-specific way of doing this.
Is this a normal behaviour ? If not, how to force the container to use my CustomPrincipal for the request identity ?