liuxiaolong
2019-05-06 a7bed6b4cfecd61ec153818945f982c5bb796b98
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package com.cloud.model.common;
 
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
 
import java.io.Serializable;
 
@Slf4j
@Data
public class TokenInfo implements Serializable {
    private static final long serialVersionUID = -1L;
    public static final int EXPRISE_IN = 8 * 60 * 60;  // 8 * 60 * 60
    public static final String BEARER_TYPE = "Bearer";
 
    private String access_token;
    private String token_type;
    private String refresh_token;
    private int expires_in;
    private String scope;
 
    public TokenInfo(){}
 
    public TokenInfo(String access_token){
        this.access_token = access_token;
        this.token_type = "bearer";
        this.refresh_token = access_token;
        this.expires_in = TokenInfo.EXPRISE_IN;
        this.scope = "app";
    }
}