AuthenticationTag
is used to simply output a
property of the current Authentication
object to the web
page.
The following JSP fragment illustrates how to use the
AuthenticationTag
:
<security:authentication property="principal.username"/>
This tag would cause the principal's name to be output. Here we
are assuming the Authentication.getPrincipal()
is a
UserDetails
object, which is generally the case
when using one of Spring Security's stadard AuthenticationProvider
implementations.