Commit 917ba762 by Edward Thomson

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.
parent b59c71d8
......@@ -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,
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment