73 lines
1.2 KiB
Java
73 lines
1.2 KiB
Java
/**
|
|
*
|
|
*/
|
|
package de.bstly.board.security;
|
|
|
|
import java.util.Collection;
|
|
|
|
import org.springframework.security.core.GrantedAuthority;
|
|
import org.springframework.security.core.userdetails.User;
|
|
|
|
/**
|
|
* The Class LocalUserDetails.
|
|
*/
|
|
public class LocalUserDetails extends User {
|
|
|
|
/**
|
|
* default serialVersionUID
|
|
*/
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
private double gravity;
|
|
private long karma;
|
|
|
|
/**
|
|
* Instantiates a new local user details.
|
|
*
|
|
* @param username the username
|
|
* @param password the password
|
|
* @param authorities the authorities
|
|
*/
|
|
public LocalUserDetails(String username, String password,
|
|
Collection<? extends GrantedAuthority> authorities) {
|
|
super(username, password, authorities);
|
|
}
|
|
|
|
/**
|
|
* Gets the gravity.
|
|
*
|
|
* @return the gravity
|
|
*/
|
|
public double getGravity() {
|
|
return gravity;
|
|
}
|
|
|
|
/**
|
|
* Sets the gravity.
|
|
*
|
|
* @param gravity the new gravity
|
|
*/
|
|
public void setGravity(double gravity) {
|
|
this.gravity = gravity;
|
|
}
|
|
|
|
/**
|
|
* Gets the karma.
|
|
*
|
|
* @return the karma
|
|
*/
|
|
public long getKarma() {
|
|
return karma;
|
|
}
|
|
|
|
/**
|
|
* Sets the karma.
|
|
*
|
|
* @param karma the new karma
|
|
*/
|
|
public void setKarma(long karma) {
|
|
this.karma = karma;
|
|
}
|
|
|
|
}
|