5#include "Stroika/Foundation/Characters/String2Int.h"
14 inline Mapping<String, String> JWT::GetHeaderClaims ()
const
16 return fHeaderClaims_;
20 return fPayloadClaims_;
22 inline optional<String> JWT::GetIssuer ()
const
26 inline optional<String> JWT::GetSubject ()
const
30 inline optional<String> JWT::GetAudience ()
const
34 inline optional<DateTime> JWT::GetExpirationTime ()
const
37 return DateTime{Characters::String2Int<time_t> (*i)};
41 inline optional<DateTime> JWT::GetNotBefore ()
const
44 return DateTime{Characters::String2Int<time_t> (*i)};
50 return Range<DateTime>{GetNotBefore ().value_or (DateTime::kMin), GetExpirationTime ().value_or (DateTime::kMax)};
52 inline optional<DateTime> JWT::GetIssuedAt ()
const
55 return DateTime{Characters::String2Int<time_t> (*i)};
59 inline optional<String> JWT::GetJWTID ()
const
nonvirtual Mapping< String, String > GetPayloadClaims() const
this is probably what you want to look at
nonvirtual optional< Range< DateTime > > GetValidFor() const
combined exp and nbf, to produce a datetime range the token is to be considered valid
constexpr string_view kIssuedAt
The "iat" (issued at) claim identifies the time at which the JWT was issued.
constexpr string_view kSubject
The "sub" (subject) claim identifies the principal that is the subject of the JWT.
constexpr string_view kExpirationTime
The "exp" (expiration time) claim identifies the expiration time on or after which the JWT MUST NOT b...
constexpr string_view kAudience
The "aud" (audience) claim identifies the recipients that the JWT is intended for.
constexpr string_view kIssuer
The "iss" (issuer) claim identifies the principal that issued the JWT.
constexpr string_view kJWTID
The "jti" (JWT ID) claim provides a unique identifier for the JWT.
constexpr string_view kNotBefore
The "nbf" (not before) claim identifies the time before which the JWT MUST NOT be accepted for proces...