Issues (123)

security/exception/JwtExpiredTokenException.java (2 issues)

1
package unicon.matthews.security.exception;
2
3
import org.springframework.security.core.AuthenticationException;
4
5
import unicon.matthews.security.model.token.JwtToken;
6
7
/**
8
 * 
9
 * @author vladimir.stankovic
10
 *
11
 * Aug 3, 2016
12
 */
13
public class JwtExpiredTokenException extends AuthenticationException {
14
    private static final long serialVersionUID = -5959543783324224864L;
15
    
16
    private JwtToken token;
0 ignored issues
show
Exceptions generally should be immutable since they convey immutable data. Consider making the field token final.
Loading history...
Bug Best Practice introduced by
Fields like token in a serializable class should either be transient or serializable.
Loading history...
17
18
    public JwtExpiredTokenException(String msg) {
19
        super(msg);
20
    }
21
22
    public JwtExpiredTokenException(JwtToken token, String msg, Throwable t) {
23
        super(msg, t);
24
        this.token = token;
25
    }
26
27
    public String token() {
28
        return this.token.getToken();
29
    }
30
}
31