@Override
	public Principal getUserPrincipal() {
		Authentication auth = getAuthentication();

		if ((auth == null) || (auth.getPrincipal() == null)) {
			return null;
		}

		return auth;
	}
@Override
	public Principal getUserPrincipal() {
		Authentication auth = getAuthentication();

		if ((auth == null) || (auth.getPrincipal() == null)) {
			return null;
		}

		return auth;
	}
@ Override public Principal getUserPrincipal ( ) { Authentication auth = getAuthentication ( ) ; if ( ( auth == null ) || ( auth . getPrincipal ( ) == null ) ) { return null ; } return auth ; }
Returns the <code>Authentication</code> (which is a subclass of
<code>Principal</code>), or <code>null</code> if unavailable.

@return the <code>Authentication</code>, or <code>null</code>
Returns the <code > Authentication< / code > ( which is a subclass of <code > Principal< / code > ) or <code > null< / code > if unavailable .