
be.looorent.security.jwt.UserDetailsFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spring-security-jwt Show documentation
Show all versions of spring-security-jwt Show documentation
Create stateless security on your Spring endpoints using JWT.
package be.looorent.security.jwt;
import io.jsonwebtoken.Claims;
import org.springframework.security.core.userdetails.UserDetails;
import javax.servlet.http.HttpServletRequest;
/**
* The interface you have to provide an implementation.
* Finds/creates/whatever a UserDetails based on your own needs.
* This implementation also defines how GrantedAuthorities must be assigned to your UserDetails instance.
* e.g. retrieves a User from database using the token property.
* @author Lorent Lempereur - [email protected]
*/
public interface UserDetailsFactory {
UserDetails createFrom(Claims tokenClaims, HttpServletRequest request) throws UserDoesNotExistException;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy