ark::crypt::JwtClaims

Defined in header “ark/crypt/jwt.hh”.


Extracted JWT claims.

Methods

  • const std::string & payload_claim(const std::string & name)
    Returns the given payload claim as a string, or throws if that claim doesn’t exist.

  • const std::vector< std::string > & payload_claim_as_array(const std::string & name)
    Returns the given payload claim broken into an array, or throws if that claim doesn’t exist.

  • std::optional< std::string > maybe_payload_claim(const std::string & name)
    Returns the given payload claim as a string, if it exists. Otherwise, returns an empty optional.

Variables

  • std::string key_id
    The key id (kid, if any).

  • std::chrono::system_clock::time_point issued_at_time{}
    The time that this JWT was issued at.

  • std::chrono::system_clock::time_point expiration_time{}
    The time that this JWT expires.

  • std::map< std::string, JwtClaim > payload_claims
    A flat list of payload claims (string to string mappings).