• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

DataBiosphere / consent / #5848

05 May 2025 03:41PM UTC coverage: 78.738% (-0.03%) from 78.768%
#5848

push

web-flow
DT-1518: Populate AuthUser with full Consent User object (#2488)

97 of 116 new or added lines in 11 files covered. (83.62%)

10091 of 12816 relevant lines covered (78.74%)

0.79 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

81.58
/src/main/java/org/broadinstitute/consent/http/models/AuthUser.java
1
package org.broadinstitute.consent.http.models;
2

3
import java.security.Principal;
4
import org.broadinstitute.consent.http.models.sam.UserStatusInfo;
5

6
/**
7
 * This class is used to represent an authenticated user that may or may not exist in Sam or the
8
 * Consent system.
9
 */
10
public class AuthUser implements Principal {
11

12
  private String authToken;
13
  private String email;
14
  private String name;
15
  private String aud;
16
  private UserStatusInfo userStatusInfo;
17

18
  public AuthUser() {
1✔
19
  }
1✔
20

21
  public AuthUser(AuthUser authUser) {
1✔
22
    this.authToken = authUser.getAuthToken();
1✔
23
    this.email = authUser.getEmail();
1✔
24
    this.name = authUser.getName();
1✔
25
    this.aud = authUser.getAud();
1✔
26
    this.userStatusInfo = authUser.getUserStatusInfo();
1✔
27
  }
1✔
28

29
  public AuthUser(String authToken, String email, String name, String aud) {
1✔
30
    this.authToken = authToken;
1✔
31
    this.email = email;
1✔
32
    this.name = name;
1✔
33
    this.aud = aud;
1✔
34
  }
1✔
35

36
  public AuthUser(String authToken, String email, String name, String aud,
NEW
37
      UserStatusInfo userStatusInfo) {
×
NEW
38
    this.authToken = authToken;
×
NEW
39
    this.email = email;
×
NEW
40
    this.name = name;
×
NEW
41
    this.aud = aud;
×
NEW
42
    this.userStatusInfo = userStatusInfo;
×
NEW
43
  }
×
44

45
  public AuthUser(String email) {
1✔
46
    this.email = email;
1✔
47
  }
1✔
48

49
  public String getAuthToken() {
50
    return authToken;
1✔
51
  }
52

53
  public AuthUser setAuthToken(String authToken) {
54
    this.authToken = authToken;
1✔
55
    return this;
1✔
56
  }
57

58
  public String getEmail() {
59
    return email;
1✔
60
  }
61

62
  public AuthUser setEmail(String email) {
63
    this.email = email;
1✔
64
    return this;
1✔
65
  }
66

67
  @Override
68
  public String getName() {
69
    return name;
1✔
70
  }
71

72
  public AuthUser setName(String name) {
73
    this.name = name;
1✔
74
    return this;
1✔
75
  }
76

77
  public String getAud() {
78
    return aud;
1✔
79
  }
80

81
  public UserStatusInfo getUserStatusInfo() {
82
    return userStatusInfo;
1✔
83
  }
84

85
  public AuthUser setUserStatusInfo(UserStatusInfo userStatusInfo) {
86
    this.userStatusInfo = userStatusInfo;
1✔
87
    return this;
1✔
88
  }
89
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc