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 info.magnolia.cms.security;
35
36 import info.magnolia.context.MgnlContext;
37
38 import java.util.Collection;
39
40 import javax.security.auth.Subject;
41
42
43
44
45
46
47 public class ExternalUserManager implements UserManager {
48
49 public User getUser(String name) throws UnsupportedOperationException {
50
51
52 if (name.equalsIgnoreCase(MgnlContext.getUser().getName())) {
53 return MgnlContext.getUser();
54 }
55 throw new UnsupportedOperationException("not implemented yet");
56 }
57
58
59
60
61
62
63 public User getUser(Subject subject) throws UnsupportedOperationException {
64 return new ExternalUser(subject);
65 }
66
67 public Collection<User> getAllUsers() throws UnsupportedOperationException {
68 throw new UnsupportedOperationException("not implemented yet");
69 }
70
71 public User createUser(String name, String pw) throws UnsupportedOperationException {
72 throw new UnsupportedOperationException("not implemented yet");
73 }
74
75 public void changePassword(User user, String newPassword) throws UnsupportedOperationException {
76 throw new UnsupportedOperationException("not implemented yet");
77 }
78
79
80
81
82 public User getSystemUser() throws UnsupportedOperationException {
83 throw new UnsupportedOperationException();
84 }
85
86
87
88
89 public User getAnonymousUser() throws UnsupportedOperationException {
90 throw new UnsupportedOperationException();
91 }
92
93 public long getLockTimePeriod() throws UnsupportedOperationException{
94 throw new UnsupportedOperationException("Not supported by this user manager.");
95 }
96
97 public int getMaxFailedLoginAttempts() throws UnsupportedOperationException {
98 throw new UnsupportedOperationException("Not supported by this user manager.");
99 }
100
101 public void setLockTimePeriod(long lockTimePeriod) throws UnsupportedOperationException {
102 throw new UnsupportedOperationException("Not supported by this user manager.");
103 }
104
105 public void setMaxFailedLoginAttempts(int maxFailedLoginAttempts) throws UnsupportedOperationException {
106 throw new UnsupportedOperationException("Not supported by this user manager.");
107 }
108 }