MCPcopy Create free account
hub / github.com/auth0/JWTDecode.Android / Claim

Interface Claim

lib/src/main/java/com/auth0/android/jwt/Claim.java:10–94  ·  view source on GitHub ↗

The Claim class holds the value in a generic way so that it can be recovered in many representations.

Source from the content-addressed store, hash-verified

8 * The Claim class holds the value in a generic way so that it can be recovered in many representations.
9 */
10public interface Claim {
11
12
13 /**
14 * Get this Claim as a Boolean.
15 * If the value isn't of type Boolean or it can't be converted to a Boolean, null will be returned.
16 *
17 * @return the value as a Boolean or null.
18 */
19 @Nullable
20 Boolean asBoolean();
21
22 /**
23 * Get this Claim as an Integer.
24 * If the value isn't of type Integer or it can't be converted to an Integer, null will be returned.
25 *
26 * @return the value as an Integer or null.
27 */
28 @Nullable
29 Integer asInt();
30
31 /**
32 * Get this Claim as an Long.
33 * If the value isn't of type Long or it can't be converted to an Long, null will be returned.
34 *
35 * @return the value as an Long or null.
36 */
37 @Nullable
38 Long asLong();
39
40 /**
41 * Get this Claim as a Double.
42 * If the value isn't of type Double or it can't be converted to a Double, null will be returned.
43 *
44 * @return the value as a Double or null.
45 */
46 @Nullable
47 Double asDouble();
48
49 /**
50 * Get this Claim as a String.
51 * If the value isn't of type String or it can't be converted to a String, null will be returned.
52 *
53 * @return the value as a String or null.
54 */
55 @Nullable
56 String asString();
57
58 /**
59 * Get this Claim as a Date.
60 * If the value can't be converted to a Date, null will be returned.
61 *
62 * @return the value as a Date or null.
63 */
64 @Nullable
65 Date asDate();
66
67 /**

Callers 15

shouldGetAsBooleanMethod · 0.65
shouldGetAsIntMethod · 0.65
shouldGetAsLongMethod · 0.65
shouldGetAsDoubleMethod · 0.65
shouldGetAllClaimsMethod · 0.95
shouldGetAsStringMethod · 0.65
shouldGetAsDateMethod · 0.65
shouldGetAsArrayMethod · 0.65
shouldGetAsListMethod · 0.65

Implementers 2

BaseClaimlib/src/main/java/com/auth0/android/jw
ClaimImpllib/src/main/java/com/auth0/android/jw

Calls

no outgoing calls

Tested by

no test coverage detected