1
19
20 package com.liferay.portal.security.auth;
21
22 import com.liferay.portal.service.UserLocalServiceUtil;
23
24 import java.util.Map;
25
26
33 public class LoginFailure implements AuthFailure {
34
35 public void onFailureByEmailAddress(
36 long companyId, String emailAddress,
37 Map<String, String[]> headerMap, Map<String, String[]> parameterMap)
38 throws AuthException {
39
40 try {
41 UserLocalServiceUtil.checkLoginFailureByEmailAddress(
42 companyId, emailAddress);
43 }
44 catch (Exception e) {
45 throw new AuthException(e);
46 }
47 }
48
49 public void onFailureByScreenName(
50 long companyId, String screenName, Map<String, String[]> headerMap,
51 Map<String, String[]> parameterMap)
52 throws AuthException {
53
54 try {
55 UserLocalServiceUtil.checkLoginFailureByScreenName(
56 companyId, screenName);
57 }
58 catch (Exception e) {
59 throw new AuthException(e);
60 }
61 }
62
63 public void onFailureByUserId(
64 long companyId, long userId, Map<String, String[]> headerMap,
65 Map<String, String[]> parameterMap)
66 throws AuthException {
67
68 try {
69 UserLocalServiceUtil.checkLoginFailureById(userId);
70 }
71 catch (Exception e) {
72 throw new AuthException(e);
73 }
74 }
75
76 }