1 package cn.home1.oss.lib.security.api; 2 3 import com.fasterxml.jackson.annotation.JsonIgnore; 4 5 import org.springframework.security.core.CredentialsContainer; 6 import org.springframework.security.core.GrantedAuthority; 7 import org.springframework.security.core.userdetails.UserDetails; 8 9 import java.util.Map; 10 import java.util.Set; 11 12 public interface User extends UserDetails, CredentialsContainer { 13 14 Set<GrantedAuthority> getAuthorities(); 15 16 String getId(); 17 18 String getName(); 19 20 @JsonIgnore 21 String getType(); 22 23 @JsonIgnore 24 Map<String, String> getProperties(); 25 26 void enable(); 27 }