Package com.jangular.backend.security

# Class UserPrincipal

java.lang.Object
com.jangular.backend.security.UserPrincipal

All Implemented Interfaces:
  `Serializable`, `org.springframework.security.core.userdetails.UserDetails`

public class UserPrincipal extends Object implements org.springframework.security.core.userdetails.UserDetails

See Also:
  - Serialized Form

## Constructor Summary

Constructors
Constructor
Description
`UserPrincipal(Long id, String username, String email, String password, Collection<? extends org.springframework.security.core.GrantedAuthority> authorities, boolean isActive, boolean accountNonLocked)`

## Method Summary

Modifier and Type
Method
Description
`static UserPrincipal`
`create(User user)`
`Collection<? extends org.springframework.security.core.GrantedAuthority>`
`getAuthorities()`
`String`
`getEmail()`
`Long`
`getId()`
`String`
`getPassword()`
`String`
`getUsername()`
`boolean`
`isAccountNonExpired()`
`boolean`
`isAccountNonLocked()`
`boolean`
`isCredentialsNonExpired()`
`boolean`
`isEnabled()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### UserPrincipal

public UserPrincipal(Long id, String username, String email, String password, Collection<? extends org.springframework.security.core.GrantedAuthority> authorities, boolean isActive, boolean accountNonLocked)

## Method Details

### create

public static UserPrincipal create(User user)

### getId

public Long getId()

### getEmail

public String getEmail()

### getUsername

public String getUsername()

Specified by:
  `getUsername` in interface `org.springframework.security.core.userdetails.UserDetails`

### getPassword

public String getPassword()

Specified by:
  `getPassword` in interface `org.springframework.security.core.userdetails.UserDetails`

### getAuthorities

public Collection<? extends org.springframework.security.core.GrantedAuthority> getAuthorities()

Specified by:
  `getAuthorities` in interface `org.springframework.security.core.userdetails.UserDetails`

### isAccountNonExpired

public boolean isAccountNonExpired()

Specified by:
  `isAccountNonExpired` in interface `org.springframework.security.core.userdetails.UserDetails`

### isAccountNonLocked

public boolean isAccountNonLocked()

Specified by:
  `isAccountNonLocked` in interface `org.springframework.security.core.userdetails.UserDetails`

### isCredentialsNonExpired

public boolean isCredentialsNonExpired()

Specified by:
  `isCredentialsNonExpired` in interface `org.springframework.security.core.userdetails.UserDetails`

### isEnabled

public boolean isEnabled()

Specified by:
  `isEnabled` in interface `org.springframework.security.core.userdetails.UserDetails`