1. Is there any way of space trimming the username prior to
authentication? Not at the authentication handler level, but at the CAS
level.

Yes, the PrincipalNameTransformer [1] component exists for this purpose. Although none ships with CAS that provides trimming capability, it should be straightforward to develop. You might review the source for PrefixSuffixPrincipalNameTransformer [2] for inspiration.

2. How about making it lower case? Same thing, not at the auth handler
level.

You could do it with a trivial implementation of PrefixSuffixPrincipalNameTransformer, but I'd recommend simply assigning your CAS principal based on what your CredentialToPrincipalResolver returns. That's really what you want: to use the canonical principal name from your system of record in all CAS-enabled applications.

M

[1] https://github.com/Jasig/cas/blob/master/cas-server-core/src/main/java/org/jasig/cas/authentication/handler/PrincipalNameTransformer.java [2] https://github.com/Jasig/cas/blob/master/cas-server-core/src/main/java/org/jasig/cas/authentication/handler/PrefixSuffixPrincipalNameTransformer.java


--
You are currently subscribed to [email protected] as: 
[email protected]
To unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/cas-user

Reply via email to