auth: update enum type name for consistency libgit2 does not use `type_t` suffixes as it's redundant; thus, rename `git_http_authtype_t` to `git_http_auth_t` for consistency.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
diff --git a/src/transports/auth.c b/src/transports/auth.c
index 1912737..b5f9b40 100644
--- a/src/transports/auth.c
+++ b/src/transports/auth.c
@@ -47,7 +47,7 @@ on_error:
}
static git_http_auth_context basic_context = {
- GIT_AUTHTYPE_BASIC,
+ GIT_HTTP_AUTH_BASIC,
GIT_CREDTYPE_USERPASS_PLAINTEXT,
0,
NULL,
diff --git a/src/transports/auth.h b/src/transports/auth.h
index aeea6ce..7624676 100644
--- a/src/transports/auth.h
+++ b/src/transports/auth.h
@@ -14,16 +14,16 @@
#include "netops.h"
typedef enum {
- GIT_AUTHTYPE_BASIC = 1,
- GIT_AUTHTYPE_NEGOTIATE = 2,
- GIT_AUTHTYPE_NTLM = 4,
-} git_http_authtype_t;
+ GIT_HTTP_AUTH_BASIC = 1,
+ GIT_HTTP_AUTH_NEGOTIATE = 2,
+ GIT_HTTP_AUTH_NTLM = 4,
+} git_http_auth_t;
typedef struct git_http_auth_context git_http_auth_context;
struct git_http_auth_context {
/** Type of scheme */
- git_http_authtype_t type;
+ git_http_auth_t type;
/** Supported credentials */
git_credtype_t credtypes;
@@ -46,7 +46,7 @@ struct git_http_auth_context {
typedef struct {
/** Type of scheme */
- git_http_authtype_t type;
+ git_http_auth_t type;
/** Name of the scheme (as used in the Authorization header) */
const char *name;
diff --git a/src/transports/auth_negotiate.c b/src/transports/auth_negotiate.c
index 2631543..260fc1c 100644
--- a/src/transports/auth_negotiate.c
+++ b/src/transports/auth_negotiate.c
@@ -274,7 +274,7 @@ int git_http_auth_negotiate(
return -1;
}
- ctx->parent.type = GIT_AUTHTYPE_NEGOTIATE;
+ ctx->parent.type = GIT_HTTP_AUTH_NEGOTIATE;
ctx->parent.credtypes = GIT_CREDTYPE_DEFAULT;
ctx->parent.connection_affinity = 1;
ctx->parent.set_challenge = negotiate_set_challenge;
diff --git a/src/transports/auth_ntlm.c b/src/transports/auth_ntlm.c
index 240c9ed..7d9c597 100644
--- a/src/transports/auth_ntlm.c
+++ b/src/transports/auth_ntlm.c
@@ -207,7 +207,7 @@ int git_http_auth_ntlm(
return -1;
}
- ctx->parent.type = GIT_AUTHTYPE_NTLM;
+ ctx->parent.type = GIT_HTTP_AUTH_NTLM;
ctx->parent.credtypes = GIT_CREDTYPE_USERPASS_PLAINTEXT;
ctx->parent.connection_affinity = 1;
ctx->parent.set_challenge = ntlm_set_challenge;
diff --git a/src/transports/http.c b/src/transports/http.c
index b581d6f..045b721 100644
--- a/src/transports/http.c
+++ b/src/transports/http.c
@@ -26,9 +26,9 @@
#include "streams/socket.h"
git_http_auth_scheme auth_schemes[] = {
- { GIT_AUTHTYPE_NEGOTIATE, "Negotiate", GIT_CREDTYPE_DEFAULT, git_http_auth_negotiate },
- { GIT_AUTHTYPE_NTLM, "NTLM", GIT_CREDTYPE_USERPASS_PLAINTEXT, git_http_auth_ntlm },
- { GIT_AUTHTYPE_BASIC, "Basic", GIT_CREDTYPE_USERPASS_PLAINTEXT, git_http_auth_basic },
+ { GIT_HTTP_AUTH_NEGOTIATE, "Negotiate", GIT_CREDTYPE_DEFAULT, git_http_auth_negotiate },
+ { GIT_HTTP_AUTH_NTLM, "NTLM", GIT_CREDTYPE_USERPASS_PLAINTEXT, git_http_auth_ntlm },
+ { GIT_HTTP_AUTH_BASIC, "Basic", GIT_CREDTYPE_USERPASS_PLAINTEXT, git_http_auth_basic },
};
static const char *upload_pack_service = "upload-pack";
@@ -78,7 +78,7 @@ typedef struct {
git_net_url url;
git_stream *stream;
- git_http_authtype_t authtypes;
+ git_http_auth_t authtypes;
git_credtype_t credtypes;
git_cred *cred;