- decode
int decode(size_t cycles, jwt_alg alg, string token, string secret)
Undocumented in source. Be warned that the author may not have intended to support it.
- encode
int encode(size_t cycles, jwt_alg alg, string payload, string secret)
Undocumented in source. Be warned that the author may not have intended to support it.
- jwt_add_grant
int jwt_add_grant(jwt_t* jwt, const(char)* grant, const(char)* val)
Add a new string grant to this JWT object.
- jwt_add_grant_bool
int jwt_add_grant_bool(jwt_t* jwt, const(char)* grant, int val)
Add a new boolean grant to this JWT object.
- jwt_add_grant_int
int jwt_add_grant_int(jwt_t* jwt, const(char)* grant, c_long val)
Add a new integer grant to this JWT object.
- jwt_add_grants_json
int jwt_add_grants_json(jwt_t* jwt, const(char)* json)
Add grants from a JSON encoded object string.
- jwt_add_header
int jwt_add_header(jwt_t* jwt, const(char)* header, const(char)* val)
Add a new string header to this JWT object.
- jwt_add_header_bool
int jwt_add_header_bool(jwt_t* jwt, const(char)* header, int val)
Add a new boolean header to this JWT object.
- jwt_add_header_int
int jwt_add_header_int(jwt_t* jwt, const(char)* header, c_long val)
Add a new integer header to this JWT object.
- jwt_add_headers_json
int jwt_add_headers_json(jwt_t* jwt, const(char)* json)
Add headers from a JSON encoded object string.
- jwt_alg_str
const(char)* jwt_alg_str(jwt_alg_t alg)
Convert alg type to it's string representation.
- jwt_decode
int jwt_decode(jwt_t** jwt, const(char)* token, const(ubyte)* key, int key_len)
Verify an existing JWT and allocate a new JWT object from it.
- jwt_del_grant
int jwt_del_grant(jwt_t* jwt, const(char)* grant)
@deprecated
Delete a grant from this JWT object.
- jwt_del_grants
int jwt_del_grants(jwt_t* jwt, const(char)* grant)
Delete a grant from this JWT object.
- jwt_del_headers
int jwt_del_headers(jwt_t* jwt, const(char)* header)
Delete a header from this JWT object.
- jwt_dump_fp
int jwt_dump_fp(jwt_t* jwt, FILE* fp, int pretty)
Output plain text representation to a FILE pointer.
- jwt_dump_str
char* jwt_dump_str(jwt_t* jwt, int pretty)
Return plain text representation as a string.
- jwt_dup
jwt_t* jwt_dup(jwt_t* jwt)
Duplicate an existing JWT object.
- jwt_encode_fp
int jwt_encode_fp(jwt_t* jwt, FILE* fp)
Fully encode a JWT object and write it to FILE.
- jwt_encode_str
char* jwt_encode_str(jwt_t* jwt)
Fully encode a JWT object and return as a string.
- jwt_free
void jwt_free(jwt_t* jwt)
Free a JWT object and any other resources it is using.
- jwt_free_str
void jwt_free_str(char* str)
Free a string returned from the library.
- jwt_get_alg
jwt_alg_t jwt_get_alg(jwt_t* jwt)
Get the jwt_alg_t set for this JWT object.
- jwt_get_alloc
void jwt_get_alloc(jwt_malloc_t* pmalloc, jwt_realloc_t* prealloc, jwt_free_t* pfree)
Get functions used for allocating and freeing memory.
- jwt_get_grant
const(char)* jwt_get_grant(jwt_t* jwt, const(char)* grant)
Return the value of a string grant.
- jwt_get_grant_bool
int jwt_get_grant_bool(jwt_t* jwt, const(char)* grant)
Return the value of an boolean grant.
- jwt_get_grant_int
c_long jwt_get_grant_int(jwt_t* jwt, const(char)* grant)
Return the value of an integer grant.
- jwt_get_grants_json
char* jwt_get_grants_json(jwt_t* jwt, const(char)* grant)
Return the value of a grant as JSON encoded object string.
- jwt_get_header
const(char)* jwt_get_header(jwt_t* jwt, const(char)* header)
Return the value of a string header.
- jwt_get_header_bool
int jwt_get_header_bool(jwt_t* jwt, const(char)* header)
Return the value of an boolean header.
- jwt_get_header_int
c_long jwt_get_header_int(jwt_t* jwt, const(char)* header)
Return the value of an integer header.
- jwt_get_headers_json
char* jwt_get_headers_json(jwt_t* jwt, const(char)* header)
Return the value of a header as JSON encoded object string.
- jwt_new
int jwt_new(jwt_t** jwt)
Allocate a new, empty, JWT object.
- jwt_set_alg
int jwt_set_alg(jwt_t* jwt, jwt_alg_t alg, const(ubyte)* key, int len)
Set an algorithm from jwt_alg_t for this JWT object.
- jwt_set_alloc
int jwt_set_alloc(jwt_malloc_t pmalloc, jwt_realloc_t prealloc, jwt_free_t pfree)
Set functions to be used for allocating and freeing memory.
- jwt_str_alg
jwt_alg_t jwt_str_alg(const(char)* alg)
Convert alg string to type.
- jwt_valid_add_grant
int jwt_valid_add_grant(jwt_valid_t* jwt_valid, const(char)* grant, const(char)* val)
Add a new string grant requirement to this JWT validation object.
- jwt_valid_add_grant_bool
int jwt_valid_add_grant_bool(jwt_valid_t* jwt_valid, const(char)* grant, int val)
Add a new boolean required grant to this JWT validation object.
- jwt_valid_add_grant_int
int jwt_valid_add_grant_int(jwt_valid_t* jwt_valid, const(char)* grant, c_long val)
Add a new integer grant requirement to this JWT validation object.
- jwt_valid_add_grants_json
int jwt_valid_add_grants_json(jwt_valid_t* jwt_valid, const(char)* json)
Add required grants from a JSON encoded object string.
- jwt_valid_del_grants
int jwt_valid_del_grants(jwt_valid_t* jwt, const(char)* grant)
Delete a grant from this JWT object.
- jwt_valid_free
void jwt_valid_free(jwt_valid_t* jwt_valid)
Free a JWT validation object and any other resources it is using.
- jwt_valid_get_grant
const(char)* jwt_valid_get_grant(jwt_valid_t* jwt_valid, const(char)* grant)
Return the value of a string required grant.
- jwt_valid_get_grant_bool
int jwt_valid_get_grant_bool(jwt_valid_t* jwt_valid, const(char)* grant)
Return the value of an boolean required grant.
- jwt_valid_get_grant_int
c_long jwt_valid_get_grant_int(jwt_valid_t* jwt_valid, const(char)* grant)
Return the value of an integer required grant.
- jwt_valid_get_grants_json
char* jwt_valid_get_grants_json(jwt_valid_t* jwt_valid, const(char)* grant)
Return the value of a grant as JSON encoded object string.
- jwt_valid_get_status
uint jwt_valid_get_status(jwt_valid_t* jwt_valid)
Return the status string for the validation object.
- jwt_valid_new
int jwt_valid_new(jwt_valid_t** jwt_valid, jwt_alg_t alg)
Allocate a new, JWT validation object.
- jwt_valid_set_headers
int jwt_valid_set_headers(jwt_valid_t* jwt_valid, int hdr)
Set validation for replicated claims in headers.
- jwt_valid_set_now
int jwt_valid_set_now(jwt_valid_t* jwt_valid, time_t now)
Set the time for which expires and not-before claims should be evaluated.
- jwt_validate
uint jwt_validate(jwt_t* jwt, jwt_valid_t* jwt_valid)
Validate a JWT object with a validation object.
- main
int main(string[] args)
Undocumented in source. Be warned that the author may not have intended to support it.
- validate
int validate(size_t cycles, jwt_alg alg, string token, string secret)
Undocumented in source. Be warned that the author may not have intended to support it.
- JWT_ALG_INVAL
enum JWT_ALG_INVAL;
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
- JWT_VALIDATION_ALG_MISMATCH
enum JWT_VALIDATION_ALG_MISMATCH;
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
- JWT_VALIDATION_AUD_MISMATCH
enum JWT_VALIDATION_AUD_MISMATCH;
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
- JWT_VALIDATION_ERROR
enum JWT_VALIDATION_ERROR;
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
- JWT_VALIDATION_EXPIRED
enum JWT_VALIDATION_EXPIRED;
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
- JWT_VALIDATION_GRANT_MISMATCH
enum JWT_VALIDATION_GRANT_MISMATCH;
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
- JWT_VALIDATION_GRANT_MISSING
enum JWT_VALIDATION_GRANT_MISSING;
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
- JWT_VALIDATION_ISS_MISMATCH
enum JWT_VALIDATION_ISS_MISMATCH;
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
- JWT_VALIDATION_SUB_MISMATCH
enum JWT_VALIDATION_SUB_MISMATCH;
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
- JWT_VALIDATION_SUCCESS
enum JWT_VALIDATION_SUCCESS;
JWT Validation exception types. These are bit values.
- JWT_VALIDATION_TOO_NEW
enum JWT_VALIDATION_TOO_NEW;
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.