unicon.matthews.security.exception.JwtExpiredTokenException   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 16
rs 10
eloc 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A JwtExpiredTokenException(JwtToken,String,Throwable) 0 3 1
A token() 0 2 1
A JwtExpiredTokenException(String) 0 2 1
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
Best Practice introduced by
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