I am trying to accomplish converting the logged in userName to UPPERCASE irrespective of the case they enter in login page and carry it across the entire application, like it should be stored in the DB and all other calls with regard to user name should be done with upper case.
I've tried the below in by extending the AMImpl. prepareSession method.
The above code snippet ensures that the outcome of the below is UPPERCASE.
public String getUserPrincipalName()
But how to override the one in SecurityContext?
Getting the userName from Principal principal = FacesContext.getCurrentInstance().getExternalContext().getUserPrincipal().getName(); from BackingBean does NOT return me the logged in user in UPPERCASE.
Any thoughts on how I can override the logged in user name across the application?
Or if you have custom login page then you can convert this on server side(better option): http://docs.oracle.com/cd/E14571_01/web.1111/b31974/adding_security.htm#BABDEICH
I believe the conversion to upper case in login page would just help in case sensitive authentication...but getting the principal user or the user from the security context would still return the one that is created in LDAD..in my case is camelCase :(
+"create wrapper function for ADFContext.getCurrent().getSecurityContext().getUserName()"+
can you please brief a little bit more on this? Creating a wrapper on this one requires identifying all places where we've obtained user name from SecurityContext and replacing it with the wrapper function which would be same as getting it and converting the userName toUpperCase..Isn't it so?