Listing 8 illustrates how to modify the LoginAction to store the username of the currently logged-in user.
清单8显示了如何修改LoginAction以存储当前登录用户的用户名。
Then, the LoginAction obtains and verifies user credentials, and authenticates the user for subsequent requests.
然后,LoginAction获取和确认用户证书,并针对后续请求验证用户。
Add some code to the LoginAction that reads the credentials submitted by the user and checks them against the database (Listing 33).
向LoginAction添加一些代码,以便读取由用户提交的凭证并针对数据库检查凭证(参见清单33)。
The final step is to update the LoginAction to retrieve the privileges of each user from the database at login-time, and assign them to the user object. Listing 16 contains the updated code.
最后一个步骤是更新LoginAction以在登录时从数据库获取每个用户的特权,并将它们分配给用户对象。
The final step is to update the LoginAction to retrieve the privileges of each user from the database at login-time, and assign them to the user object. Listing 16 contains the updated code.
最后一个步骤是更新LoginAction以在登录时从数据库获取每个用户的特权,并将它们分配给用户对象。
应用推荐