Test Failed
Push — master ( cfc629...7c8fa2 )
by Misagh
14:48
created

setRegistrationUrl(String)   A

Complexity

Conditions 1

Size

Total Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
c 0
b 0
f 0
dl 0
loc 2
rs 10
1
package org.apereo.cas.configuration.model.support.mfa;
2
3
import org.apereo.cas.configuration.support.RequiresModule;
4
import org.apereo.cas.configuration.support.RequiredProperty;
5
6
/**
7
 * This is {@link DuoSecurityMultifactorProperties}.
8
 *
9
 * @author Misagh Moayyed
10
 * @since 5.2.0
11
 */
12
@RequiresModule(name = "cas-server-support-duo")
13
public class DuoSecurityMultifactorProperties extends BaseMultifactorProviderProperties {
14
    /**
15
     * Provider id by default.
16
     */
17
    public static final String DEFAULT_IDENTIFIER = "mfa-duo";
18
    
19
    private static final long serialVersionUID = -4655375354167880807L;
20
    
21
    /**
22
     * Duo integration key.
23
     */
24
    @RequiredProperty
25
    private String duoIntegrationKey;
26
    /**
27
     * Duo secret key.
28
     */
29
    @RequiredProperty
30
    private String duoSecretKey;
31
    /**
32
     * The duoApplicationKey is a string, at least 40 characters long,
33
     * that you generate and keep secret from Duo.
34
     * You can generate a random string in Python with:
35
     * <pre>
36
     * import os, hashlib
37
     * print hashlib.sha1(os.urandom(32)).hexdigest()
38
     * </pre>
39
     */
40
    @RequiredProperty
41
    private String duoApplicationKey;
42
    /**
43
     * Duo API host and url.
44
     */
45
    @RequiredProperty
46
    private String duoApiHost;
47
48
    /**
49
     * Link to a registration app, typically developed in-house
50
     * in order to allow new users to sign-up for duo functionality.
51
     * If the user account status requires enrollment and this link
52
     * is specified, CAS will redirect the authentication flow
53
     * to this registration app. Otherwise, the default duo mechanism
54
     * for new-user registrations shall take over.
55
     */
56
    private String registrationUrl;
57
    /**
58
     * Indicates whether this provider should support trusted devices.
59
     */
60
    private boolean trustedDeviceEnabled;
61
62
    public DuoSecurityMultifactorProperties() {
63
        setId(DEFAULT_IDENTIFIER);
64
    }
65
66
    public boolean isTrustedDeviceEnabled() {
67
        return trustedDeviceEnabled;
68
    }
69
70
    public void setTrustedDeviceEnabled(final boolean trustedDeviceEnabled) {
71
        this.trustedDeviceEnabled = trustedDeviceEnabled;
72
    }
73
74
    public String getDuoIntegrationKey() {
75
        return duoIntegrationKey;
76
    }
77
78
    public void setDuoIntegrationKey(final String duoIntegrationKey) {
79
        this.duoIntegrationKey = duoIntegrationKey;
80
    }
81
82
    public String getDuoSecretKey() {
83
        return duoSecretKey;
84
    }
85
86
    public void setDuoSecretKey(final String duoSecretKey) {
87
        this.duoSecretKey = duoSecretKey;
88
    }
89
90
    public String getDuoApplicationKey() {
91
        return duoApplicationKey;
92
    }
93
94
    public void setDuoApplicationKey(final String duoApplicationKey) {
95
        this.duoApplicationKey = duoApplicationKey;
96
    }
97
98
    public String getDuoApiHost() {
99
        return duoApiHost;
100
    }
101
102
    public void setDuoApiHost(final String duoApiHost) {
103
        this.duoApiHost = duoApiHost;
104
    }
105
106
    public String getRegistrationUrl() {
107
        return registrationUrl;
108
    }
109
110
    public void setRegistrationUrl(final String registrationUrl) {
111
        this.registrationUrl = registrationUrl;
112
    }
113
}
114