AuthTokenUtil.java 387 字节
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
package cn.ibizlab.util.security;

import org.springframework.security.core.userdetails.UserDetails;

import java.util.Date;

public interface AuthTokenUtil {

    String generateToken(UserDetails userDetails);

    Boolean validateToken(String token, UserDetails userDetails);

    String getUsernameFromToken(String token);
    
    Date getExpirationDateFromToken(String token) ;

}