unicon.matthews.admin.AdminUserConfig   A
last analyzed

Complexity

Total Complexity 9

Size/Duplication

Total Lines 52
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 52
rs 10
eloc 30
wmc 9

9 Methods

Rating   Name   Duplication   Size   Complexity  
A isEncrypted() 0 2 1
A getPassword() 0 2 1
A setAdminuser(String) 0 2 1
A getEmailAddress() 0 2 1
A toString() 0 8 1
A setPassword(String) 0 2 1
A setEncrypted(boolean) 0 2 1
A setEmailAddress(String) 0 2 1
A getAdminuser() 0 2 1
1
package unicon.matthews.admin;
2
3
import org.springframework.boot.context.properties.ConfigurationProperties;
4
import org.springframework.context.annotation.Configuration;
5
6
/**
7
 * Configuration values to create a super admin user
8
 */
9
@Configuration
10
@ConfigurationProperties(prefix = "matthews.users")
11
public class AdminUserConfig {
12
13
    private String adminuser;
14
15
    private String password;
16
17
    private String emailAddress;
18
19
    private boolean encrypted;
20
21
    public String getAdminuser() {
22
        return adminuser;
23
    }
24
25
    public void setAdminuser(String adminuser) {
26
        this.adminuser = adminuser;
27
    }
28
29
    public String getPassword() {
30
        return password;
31
    }
32
33
    public void setPassword(String password) {
34
        this.password = password;
35
    }
36
37
    public String getEmailAddress() {
38
        return emailAddress;
39
    }
40
41
    public void setEmailAddress(String emailAddress) {
42
        this.emailAddress = emailAddress;
43
    }
44
45
    public boolean isEncrypted() {
46
        return encrypted;
47
    }
48
49
    public void setEncrypted(boolean encrypted) {
50
        this.encrypted = encrypted;
51
    }
52
53
    @Override
54
    public String toString() {
55
        return "SuperAdminUser{" +
56
                "adminuser='" + adminuser + '\'' +
57
                ", password='" + password + '\'' +
0 ignored issues
show
Security introduced by
Hard-coding user names and passwords is a very insecure and inefficient practice. Consider reading the credentials from an outside file or other source, which you may not want to put in your source code repository.
Loading history...
58
                ", emailAddress='" + emailAddress + '\'' +
59
                ", encrypted=" + encrypted +
60
                '}';
61
    }
62
}
63