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

torresj / infosas-api / 87

12 Jan 2026 02:35PM UTC coverage: 76.32% (-15.3%) from 91.648%
87

push

circleci

torresj
Auth API added

70 of 170 new or added lines in 20 files covered. (41.18%)

477 of 625 relevant lines covered (76.32%)

0.76 hits per line

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

28.57
/src/main/java/com/torresj/infosas/security/CustomUserDetails.java
1
package com.torresj.infosas.security;
2

3
import com.torresj.infosas.entities.client.ClientEntity;
4
import lombok.RequiredArgsConstructor;
5
import org.springframework.security.core.GrantedAuthority;
6
import org.springframework.security.core.authority.SimpleGrantedAuthority;
7
import org.springframework.security.core.userdetails.UserDetails;
8

9
import java.util.Collection;
10
import java.util.List;
11

12
@RequiredArgsConstructor
13
public class CustomUserDetails implements UserDetails {
14

15
    private final ClientEntity clientEntity;
16

17
    @Override
18
    public Collection<? extends GrantedAuthority> getAuthorities() {
19
        return List.of(new SimpleGrantedAuthority(clientEntity.getRole().name()));
1✔
20
    }
21

22
    @Override
23
    public String getPassword() {
NEW
24
        return clientEntity.getPassword();
×
25
    }
26

27
    @Override
28
    public String getUsername() {
29
        return clientEntity.getName();
1✔
30
    }
31

32
    @Override
33
    public boolean isAccountNonExpired() {
NEW
34
        return true;
×
35
    }
36

37
    @Override
38
    public boolean isAccountNonLocked() {
NEW
39
        return true;
×
40
    }
41

42
    @Override
43
    public boolean isCredentialsNonExpired() {
NEW
44
        return true;
×
45
    }
46

47
    @Override
48
    public boolean isEnabled() {
NEW
49
        return true;
×
50
    }
51
}
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