<commit_before><commit_msg>Remember me 구현 2<commit_after>package com.libqa.web.domain;

/**
 * @Author : yion
 * @Date : 2015. 10. 11.
 * @Description :
 */

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.extern.slf4j.Slf4j;
import org.springframework.security.web.authentication.rememberme.PersistentRememberMeToken;

import javax.persistence.*;
import java.util.Date;


/**
 * @Author : yion
 * @Date : 2015. 9. 14.
 * @Description :
 */
@Data
@Entity
@Table(name = "persistent_logins")
@Slf4j
@EqualsAndHashCode
public class PersistentLogin {
    @Id
    @Column(length = 64, nullable = false)
    private String series;

    @Column(length = 64, nullable = false)
    private String username;

    @Column(length = 64, nullable = false)
    private String token;

    @Temporal(TemporalType.TIMESTAMP)
    @Column(nullable = false)
    private Date lastUsed;


    public PersistentLogin(PersistentRememberMeToken persistentRememberMeToken) {
        log.info("########## PersistentLogins : {}", persistentRememberMeToken.toString());
        this.username = persistentRememberMeToken.getUsername();
        this.series = persistentRememberMeToken.getSeries();
        this.lastUsed = persistentRememberMeToken.getDate();
        this.token = persistentRememberMeToken.getTokenValue();
    }
}
{'fraction_non_alphanumeric': 0.12148823082763857, 'fraction_numerical': 0.018982536066818528, 'mean_word_length': 4.049808429118774, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '976700', 'n_tokens_mistral': 437, 'n_tokens_neox': 401, 'n_words': 82}