Advertisement
andersonalmada2

Untitled

Aug 2nd, 2022
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.33 KB | None | 0 0
  1. package br.ufc.mandacaru5.model;
  2.  
  3. import java.util.Collection;
  4.  
  5. import javax.persistence.Column;
  6. import javax.persistence.Entity;
  7. import javax.persistence.GeneratedValue;
  8. import javax.persistence.Id;
  9.  
  10. import org.springframework.security.core.GrantedAuthority;
  11. import org.springframework.security.core.userdetails.UserDetails;
  12.  
  13. @Entity
  14. public class User implements UserDetails {
  15.  
  16.     @Id
  17.     @GeneratedValue
  18.     private int id;
  19.     @Column(nullable = false, unique = true)
  20.     private String email;
  21.     @Column(nullable = false)
  22.     private String password;
  23.  
  24.     @Override
  25.     public Collection<? extends GrantedAuthority> getAuthorities() {
  26.         // TODO Auto-generated method stub
  27.         return null;
  28.     }
  29.  
  30.     @Override
  31.     public String getPassword() {
  32.         // TODO Auto-generated method stub
  33.         return password;
  34.     }
  35.  
  36.     @Override
  37.     public String getUsername() {
  38.         // TODO Auto-generated method stub
  39.         return email;
  40.     }
  41.  
  42.     @Override
  43.     public boolean isAccountNonExpired() {
  44.         // TODO Auto-generated method stub
  45.         return true;
  46.     }
  47.  
  48.     @Override
  49.     public boolean isAccountNonLocked() {
  50.         // TODO Auto-generated method stub
  51.         return true;
  52.     }
  53.  
  54.     @Override
  55.     public boolean isCredentialsNonExpired() {
  56.         // TODO Auto-generated method stub
  57.         return true;
  58.     }
  59.  
  60.     @Override
  61.     public boolean isEnabled() {
  62.         // TODO Auto-generated method stub
  63.         return true;
  64.     }
  65. }
  66.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement