1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package net.anyflow.lannister.pluginexample;
18
19 import net.anyflow.lannister.plugin.Authenticator;
20 import net.anyflow.lannister.plugin.Plugin;
21
22 public class ExampleAuthenticator implements Authenticator {
23 private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(ExampleAuthenticator.class);
24
25 @Override
26 public Plugin clone() {
27 return new ExampleAuthenticator();
28 }
29
30 @Override
31 public boolean isValid(String clientId) {
32 logger.debug("ExampleAuthenticator.isValid() called [clientId={}]", clientId);
33 return true;
34 }
35
36 @Override
37 public boolean isValid(String clientId, String userName, String password) {
38 logger.debug("ExampleAuthenticator.isValid() called [clientId={}, userName={}, password={}]", clientId,
39 userName, password);
40 return true;
41 }
42 }