Skip to content

Commit

Permalink
update for enum type
Browse files Browse the repository at this point in the history
  • Loading branch information
ekoby committed Oct 11, 2024
1 parent 939a4ab commit b446f24
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion inc_internal/auth_method.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ enum AuthenticationMethod {
};

static const ziti_auth_query_mfa ZITI_MFA = {
.type_id = "MFA",
.type_id = ziti_auth_query_type_MFA,
.provider = "ziti",
};

Expand Down
2 changes: 1 addition & 1 deletion library/auth_queries.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ void ziti_auth_query_mfa_process(ziti_mfa_auth_ctx *mfa_auth_ctx) {
.type = ZitiAuthEvent,
.auth = {
.action = ziti_auth_prompt_totp,
.type = mfa_auth_ctx->auth_query_mfa->type_id,
.type = ziti_auth_query_types.name(mfa_auth_ctx->auth_query_mfa->type_id),
.detail = mfa_auth_ctx->auth_query_mfa->provider,
}
};
Expand Down
2 changes: 1 addition & 1 deletion library/legacy_auth.c
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ void auth_timer_cb(uv_timer_t *t) {
static ziti_auth_query_mfa* get_mfa(ziti_api_session *session) {
ziti_auth_query_mfa *aq;
MODEL_LIST_FOREACH(aq, session->auth_queries) {
if (strcmp(aq->type_id, AUTH_QUERY_TYPE_MFA) == 0 &&
if (aq->type_id == ziti_auth_query_type_MFA &&
strcmp(aq->provider, MFA_PROVIDER_ZITI) == 0) {
return aq;
}
Expand Down
2 changes: 1 addition & 1 deletion library/ziti.c
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ void ziti_set_partially_authenticated(ziti_context ztx, const ziti_auth_query_mf
.type = ZitiAuthEvent,
.auth = {
.action = ziti_auth_prompt_totp,
.type = mfa_q->type_id,
.type = ziti_auth_query_types.name(mfa_q->type_id),
.detail = mfa_q->provider,
}
};
Expand Down

0 comments on commit b446f24

Please sign in to comment.