Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 20 additions & 3 deletions includes/ziti/ziti.h
Original file line number Diff line number Diff line change
Expand Up @@ -875,6 +875,15 @@ typedef void (*ziti_mfa_enroll_cb)(ziti_context ztx, int status, ziti_mfa_enroll
*/
typedef void (*ziti_mfa_cb)(ziti_context ztx, int status, void *ctx);

/**
* @brief Callback called by ziti_ext_auth to complete external authentication
*
*
* @param ztx the handle to the Ziti Edge identity context needed for other Ziti C SDK functions
* @param url the URL to open
* @param ctx additional context to be passed into the original authentication call
*/
typedef void (*ziti_ext_auth_launch_cb)(ziti_context ztx, const char *url, void *ctx);

/**
* @brief Callback called after ziti_mfa_get_recovery_codes() and ziti_mfa_new_recovery_codes()
Expand Down Expand Up @@ -993,9 +1002,17 @@ extern void ziti_mfa_new_recovery_codes(ziti_context ztx, char *code, ziti_mfa_r
ZITI_FUNC
extern void ziti_mfa_auth(ziti_context ztx, const char *code, ziti_mfa_cb auth_cb, void *ctx);

extern int ziti_ext_auth(ziti_context ztx,
void (*ziti_ext_launch)(ziti_context, const char* url, void*),
void *ctx);
/**
* @brief Authenticate with an external JWT signer
*
* @param ztx the handle to the Ziti Edge identity context needed for other Ziti C SDK functions
* @param launch_cb callback to complete authentication with the JWT provider
* @param ctx additional context to be passed into the callback
*
* @see ziti_use_ext_jwt_signer()
*/
ZITI_FUNC
extern int ziti_ext_auth(ziti_context ztx, ziti_ext_auth_launch_cb launch_cb, void *ctx);

extern int ziti_ext_auth_token(ziti_context ztx, const char *token);

Expand Down
Loading