MCPcopy Create free account
hub / github.com/jwtk/jjwt / Claims

Interface Claims

api/src/main/java/io/jsonwebtoken/Claims.java:40–166  ·  view source on GitHub ↗

A JWT Claims set . This is an immutable JSON map with convenient type-safe getters for JWT standard claim names. Additionally, this interface also extends Map<String, Object> , so you can use standard {@

Source from the content-addressed store, hash-verified

38 * @since 0.1
39 */
40public interface Claims extends Map<String, Object>, Identifiable {
41
42 /**
43 * JWT {@code Issuer} claims parameter name: <code>"iss"</code>
44 */
45 String ISSUER = "iss";
46
47 /**
48 * JWT {@code Subject} claims parameter name: <code>"sub"</code>
49 */
50 String SUBJECT = "sub";
51
52 /**
53 * JWT {@code Audience} claims parameter name: <code>"aud"</code>
54 */
55 String AUDIENCE = "aud";
56
57 /**
58 * JWT {@code Expiration} claims parameter name: <code>"exp"</code>
59 */
60 String EXPIRATION = "exp";
61
62 /**
63 * JWT {@code Not Before} claims parameter name: <code>"nbf"</code>
64 */
65 String NOT_BEFORE = "nbf";
66
67 /**
68 * JWT {@code Issued At} claims parameter name: <code>"iat"</code>
69 */
70 String ISSUED_AT = "iat";
71
72 /**
73 * JWT {@code JWT ID} claims parameter name: <code>"jti"</code>
74 */
75 String ID = "jti";
76
77 /**
78 * Returns the JWT <a href="https://www.rfc-editor.org/rfc/rfc7519.html#section-4.1.1">
79 * <code>iss</code></a> (issuer) value or {@code null} if not present.
80 *
81 * @return the JWT {@code iss} value or {@code null} if not present.
82 */
83 String getIssuer();
84
85 /**
86 * Returns the JWT <a href="https://www.rfc-editor.org/rfc/rfc7519.html#section-4.1.2">
87 * <code>sub</code></a> (subject) value or {@code null} if not present.
88 *
89 * @return the JWT {@code sub} value or {@code null} if not present.
90 */
91 String getSubject();
92
93 /**
94 * Returns the JWT <a href="https://www.rfc-editor.org/rfc/rfc7519.html#section-4.1.3">
95 * <code>aud</code></a> (audience) value or {@code null} if not present.
96 *
97 * @return the JWT {@code aud} value or {@code null} if not present.

Callers 27

testExampleJweAESKWMethod · 0.65
testExampleJwsRSAMethod · 0.65
testExampleJwsECDSAMethod · 0.65
testExampleJwsEdDSAMethod · 0.65
testExampleJweRSAMethod · 0.65
testExampleJweECDHESMethod · 0.65
parseMethod · 0.95
parseMethod · 0.95
testExampleSecretJwkMethod · 0.65

Implementers 1

DefaultClaimsimpl/src/main/java/io/jsonwebtoken/imp

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…