class SecurityUtil {

    public static UserInfo getTokenUserInfo(OAuth2AccessToken token) {
        TokenProperties tokenProperties = TokenProperties.fromToken(token);
        return new UserInfo(tokenProperties.getUserId(), tokenProperties.getUserName(), token);
    }

    private  SecurityUtil();

}