package org.lingniu.idp.security.token;

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

import java.util.Collection;

// 手机号+密码+验证码登录Token
public class MobilePasswordAuthenticationToken extends BaseAuthenticationToken {
    private String code;
    private String uuid;
    
    public MobilePasswordAuthenticationToken(String mobile, String password, String code, String uuid) {
        super(mobile, password);
        this.code = code;
        this.uuid = uuid;
    }
    
    public MobilePasswordAuthenticationToken(UserDetails userDetails,
                                             Collection<? extends GrantedAuthority> authorities) {
        super(userDetails, "", authorities);
    }

    public String getCode() {
        return code;
    }

    public String getUuid() {
        return uuid;
    }
}