MCPcopy Index your code
hub / github.com/auth0/java-jwt / PayloadImpl

Class PayloadImpl

lib/src/main/java/com/auth0/jwt/impl/PayloadImpl.java:25–129  ·  view source on GitHub ↗

Decoder of string JSON Web Tokens into their POJO representations. This class is thread-safe. @see Payload

Source from the content-addressed store, hash-verified

23 * @see Payload
24 */
25class PayloadImpl implements Payload, Serializable {
26
27 private static final long serialVersionUID = 1659021498824562311L;
28
29 private final String issuer;
30 private final String subject;
31 private final List<String> audience;
32 private final Instant expiresAt;
33 private final Instant notBefore;
34 private final Instant issuedAt;
35 private final String jwtId;
36 private final Map<String, JsonNode> tree;
37 private final ObjectCodec objectCodec;
38
39 PayloadImpl(
40 String issuer,
41 String subject,
42 List<String> audience,
43 Instant expiresAt,
44 Instant notBefore,
45 Instant issuedAt,
46 String jwtId,
47 Map<String, JsonNode> tree,
48 ObjectCodec objectCodec
49 ) {
50 this.issuer = issuer;
51 this.subject = subject;
52 this.audience = audience != null ? Collections.unmodifiableList(audience) : null;
53 this.expiresAt = expiresAt;
54 this.notBefore = notBefore;
55 this.issuedAt = issuedAt;
56 this.jwtId = jwtId;
57 this.tree = tree != null ? Collections.unmodifiableMap(tree) : Collections.emptyMap();
58 this.objectCodec = objectCodec;
59 }
60
61 Map<String, JsonNode> getTree() {
62 return tree;
63 }
64
65 @Override
66 public String getIssuer() {
67 return issuer;
68 }
69
70 @Override
71 public String getSubject() {
72 return subject;
73 }
74
75 @Override
76 public List<String> getAudience() {
77 return audience;
78 }
79
80 @Override
81 public Date getExpiresAt() {
82 return (expiresAt != null) ? Date.from(expiresAt) : null;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…