이 콘텐츠는 선택한 언어로 제공되지 않습니다.
15.3.3. Writing a login form
The
credentials
component provides both username
and password
properties, catering for the most common authentication scenario. These properties can be bound directly to the username and password fields on a login form. Once these properties are set, calling identity.login()
authenticates the user with the credentials provided. An example of a simple login form is as follows:
Similarly, the user is logged out by calling
#{identity.logout}
. This action clears the security state of the currently authenticated user and invalidate the user's session.