1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34 package fr.paris.lutece.portal.service.security;
35
36 import java.util.Arrays;
37 import java.util.Collection;
38
39 import javax.security.auth.login.FailedLoginException;
40 import javax.security.auth.login.LoginException;
41
42 import javax.servlet.http.HttpServletRequest;
43
44
45
46
47 public class MokeLuteceAuthentication implements LuteceAuthentication
48 {
49
50 public MokeLuteceAuthentication( )
51 {
52 }
53
54 public String getAuthServiceName( )
55 {
56 return "MOKE AUTHENTICATION SERVICE";
57 }
58
59 public String getAuthType( HttpServletRequest request )
60 {
61 return null;
62 }
63
64 public LuteceUser login( final String strUserName, final String strUserPassword, HttpServletRequest request ) throws LoginException
65 {
66 if ( "admin".equals( strUserName ) && "adminadmin".equals( strUserPassword ) )
67 {
68 return new MokeLuteceUser( strUserName, this );
69 }
70 else
71 {
72 throw new FailedLoginException( );
73 }
74 }
75
76 public void logout( LuteceUser user )
77 {
78 }
79
80 public boolean findResetPassword( HttpServletRequest request, String strLogin )
81 {
82 return false;
83 }
84
85 public LuteceUser getAnonymousUser( )
86 {
87 return null;
88 }
89
90 public boolean isUserInRole( LuteceUser user, HttpServletRequest request, String strRole )
91 {
92 return Arrays.asList( user.getRoles( ) ).contains( strRole );
93 }
94
95 public String [ ] getRolesByUser( LuteceUser user )
96 {
97 return null;
98 }
99
100 public boolean isExternalAuthentication( )
101 {
102 return false;
103 }
104
105 public LuteceUser getHttpAuthenticatedUser( HttpServletRequest request )
106 {
107 return null;
108 }
109
110 public String getLoginPageUrl( )
111 {
112 return null;
113 }
114
115 public String getDoLoginUrl( )
116 {
117 return null;
118 }
119
120 public String getDoLogoutUrl( )
121 {
122 return null;
123 }
124
125 public String getNewAccountPageUrl( )
126 {
127 return null;
128 }
129
130 public String getViewAccountPageUrl( )
131 {
132 return null;
133 }
134
135 public String getLostPasswordPageUrl( )
136 {
137 return null;
138 }
139
140 public String getResetPasswordPageUrl( HttpServletRequest request )
141 {
142 return null;
143 }
144
145 public String getAccessDeniedTemplate( )
146 {
147 return null;
148 }
149
150 public String getAccessControledTemplate( )
151 {
152 return null;
153 }
154
155 public boolean isUsersListAvailable( )
156 {
157 return false;
158 }
159
160 public Collection<LuteceUser> getUsers( )
161 {
162 return null;
163 }
164
165 public LuteceUser getUser( String strUserLogin )
166 {
167 return null;
168 }
169
170 public boolean isDelegatedAuthentication( )
171 {
172 return false;
173 }
174
175 public boolean isMultiAuthenticationSupported( )
176 {
177 return false;
178 }
179
180 public String getIconUrl( )
181 {
182 return null;
183 }
184
185 public String getName( )
186 {
187 return null;
188 }
189
190 public String getPluginName( )
191 {
192 return null;
193 }
194
195 public void updateDateLastLogin( LuteceUser user, HttpServletRequest request )
196 {
197 }
198
199 @Override
200 public String getLostLoginPageUrl( )
201 {
202 return null;
203 }
204 }