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

Class BasicHeader

lib/src/main/java/com/auth0/jwt/impl/BasicHeader.java:17–71  ·  view source on GitHub ↗

The BasicHeader class implements the Header interface.

Source from the content-addressed store, hash-verified

15 * The BasicHeader class implements the Header interface.
16 */
17class BasicHeader implements Header, Serializable {
18 private static final long serialVersionUID = -4659137688548605095L;
19
20 private final String algorithm;
21 private final String type;
22 private final String contentType;
23 private final String keyId;
24 private final Map<String, JsonNode> tree;
25 private final ObjectCodec objectCodec;
26
27 BasicHeader(
28 String algorithm,
29 String type,
30 String contentType,
31 String keyId,
32 Map<String, JsonNode> tree,
33 ObjectCodec objectCodec
34 ) {
35 this.algorithm = algorithm;
36 this.type = type;
37 this.contentType = contentType;
38 this.keyId = keyId;
39 this.tree = tree == null ? Collections.emptyMap() : Collections.unmodifiableMap(tree);
40 this.objectCodec = objectCodec;
41 }
42
43 Map<String, JsonNode> getTree() {
44 return tree;
45 }
46
47 @Override
48 public String getAlgorithm() {
49 return algorithm;
50 }
51
52 @Override
53 public String getType() {
54 return type;
55 }
56
57 @Override
58 public String getContentType() {
59 return contentType;
60 }
61
62 @Override
63 public String getKeyId() {
64 return keyId;
65 }
66
67 @Override
68 public Claim getHeaderClaim(String name) {
69 return extractClaim(name, tree, objectCodec);
70 }
71}

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…