public String toLocal ( Principal principal ) { // This technically does not conform with rfc1964, but should work so // long as you don't have any really odd names in your KDC. return principal == null ? null : principal . getName ( ) . split ( "[/@]" ) [ 0 ] ; }
Convert a Principal to a local user name .