Skip to content

Commit

Permalink
removed spring security confiugs in customer entitiy
Browse files Browse the repository at this point in the history
  • Loading branch information
ved-asole committed Feb 13, 2024
1 parent 6198704 commit 7d3d1bb
Showing 1 changed file with 1 addition and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,8 @@
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.validation.annotation.Validated;
import java.time.LocalDateTime;
import java.util.Collection;
import java.util.HashSet;

@AllArgsConstructor
@NoArgsConstructor
Expand All @@ -20,7 +16,7 @@
@Validated
@Entity
@Table(name = "customer")
public class Customer implements UserDetails {
public class Customer {

@Id
@Column(updatable = false)
Expand All @@ -38,39 +34,4 @@ public class Customer implements UserDetails {
@OneToOne
@JoinColumn(name = "address_id")
private Address address;

@Override
public Collection<? extends GrantedAuthority> getAuthorities() {
return new HashSet<>();
}

@Override
public String getPassword() {
return this.password;
}

@Override
public String getUsername() {
return this.email;
}

@Override
public boolean isAccountNonExpired() {
return false;
}

@Override
public boolean isAccountNonLocked() {
return false;
}

@Override
public boolean isCredentialsNonExpired() {
return false;
}

@Override
public boolean isEnabled() {
return false;
}
}

0 comments on commit 7d3d1bb

Please sign in to comment.