1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.syncope.common.lib.auth;
20
21 import java.util.Map;
22 import org.apache.syncope.common.lib.to.AuthModuleTO;
23
24 public class SimpleMfaAuthModuleConf implements MFAAuthModuleConf {
25
26 private static final long serialVersionUID = -7663257599139312426L;
27
28 private long timeToKillInSeconds = 30L;
29
30 private int tokenLength = 6;
31
32 private String bypassGroovyScript;
33
34 private String emailAttribute = "email";
35
36 private String emailFrom;
37
38 private String emailSubject;
39
40 private String emailText;
41
42 @Override
43 public String getFriendlyName() {
44 return "CAS Simple Multifactor Authentication";
45 }
46
47 public String getEmailFrom() {
48 return emailFrom;
49 }
50
51 public void setEmailFrom(final String emailFrom) {
52 this.emailFrom = emailFrom;
53 }
54
55 public String getEmailSubject() {
56 return emailSubject;
57 }
58
59 public void setEmailSubject(final String emailSubject) {
60 this.emailSubject = emailSubject;
61 }
62
63 public String getEmailText() {
64 return emailText;
65 }
66
67 public void setEmailText(final String emailText) {
68 this.emailText = emailText;
69 }
70
71 public String getBypassGroovyScript() {
72 return bypassGroovyScript;
73 }
74
75 public void setBypassGroovyScript(final String bypassGroovyScript) {
76 this.bypassGroovyScript = bypassGroovyScript;
77 }
78
79 public String getEmailAttribute() {
80 return emailAttribute;
81 }
82
83 public void setEmailAttribute(final String emailAttribute) {
84 this.emailAttribute = emailAttribute;
85 }
86
87 public long getTimeToKillInSeconds() {
88 return timeToKillInSeconds;
89 }
90
91 public void setTimeToKillInSeconds(final long timeToKillInSeconds) {
92 this.timeToKillInSeconds = timeToKillInSeconds;
93 }
94
95 public int getTokenLength() {
96 return tokenLength;
97 }
98
99 public void setTokenLength(final int tokenLength) {
100 this.tokenLength = tokenLength;
101 }
102
103 @Override
104 public Map<String, Object> map(final AuthModuleTO authModule, final Mapper mapper) {
105 return mapper.map(authModule, this);
106 }
107 }