Clover icon

sunshower-core

  1. Project Clover database Fri Apr 6 2018 03:27:42 UTC
  2. Package io.sunshower.model.core.auth

File UsernamePasswordCredential.java

 

Coverage histogram

../../../../../img/srcFileCovDistChart4.png
46% of files have more coverage

Code metrics

0
7
8
1
49
37
8
1.14
0.88
8
1

Classes

Class Line # Actions
UsernamePasswordCredential 11 7 8
0.3333333433.3%
 

Contributing tests

This file is covered by 1 test. .

Source view

1    package io.sunshower.model.core.auth;
2   
3    import io.sunshower.model.core.Schemata;
4    import javax.persistence.Basic;
5    import javax.persistence.Entity;
6    import javax.persistence.Table;
7    import javax.validation.constraints.NotNull;
8   
9    @Entity
10    @Table(name = "USERNAME_PASSWORD_CREDENTIAL", schema = Schemata.SUNSHOWER)
 
11    public class UsernamePasswordCredential extends Credential {
12   
13    @Basic @NotNull private String username;
14   
15    @Basic @NotNull private String password;
16   
 
17  1 toggle public UsernamePasswordCredential() {}
18   
 
19  0 toggle public String getUsername() {
20  0 return username;
21    }
22   
 
23  1 toggle public void setUsername(String username) {
24  1 this.username = username;
25    }
26   
 
27  0 toggle public String getPassword() {
28  0 return password;
29    }
30   
 
31  1 toggle public void setPassword(String password) {
32  1 this.password = password;
33    }
34   
 
35  0 toggle @Override
36    public String getSecret() {
37  0 return password;
38    }
39   
 
40  0 toggle @Override
41    public CredentialType getType() {
42  0 return CredentialType.UsernamePassword;
43    }
44   
 
45  0 toggle @Override
46    public void setSecret(String secret) {
47  0 this.setPassword(secret);
48    }
49    }