Skip to content

Commit b74985b

Browse files
committed
feat(thirdparty): introduce gssapi into http client
1 parent 4372af4 commit b74985b

File tree

2 files changed

+16
-15
lines changed

2 files changed

+16
-15
lines changed

src/http/http_client.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -221,21 +221,21 @@ dsn::error_s http_client::set_method(http_method method)
221221

222222
dsn::error_s http_client::set_auth(http_auth_type authType)
223223
{
224-
switch(authType){
224+
switch (authType) {
225225
case http_auth_type::SPNEGO:
226-
RETURN_IF_SETOPT_NOT_OK(CURLOPT_HTTPAUTH, CURLAUTH_NEGOTIATE);
227-
break;
226+
RETURN_IF_SETOPT_NOT_OK(CURLOPT_HTTPAUTH, CURLAUTH_NEGOTIATE);
227+
break;
228228
case http_auth_type::DIGEST:
229-
RETURN_IF_SETOPT_NOT_OK(CURLOPT_HTTPAUTH, CURLAUTH_DIGEST);
230-
break;
229+
RETURN_IF_SETOPT_NOT_OK(CURLOPT_HTTPAUTH, CURLAUTH_DIGEST);
230+
break;
231231
case http_auth_type::BASIC:
232-
RETURN_IF_SETOPT_NOT_OK(CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
233-
break;
232+
RETURN_IF_SETOPT_NOT_OK(CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
233+
break;
234234
case http_auth_type::NONE:
235-
break;
235+
break;
236236
default:
237-
RETURN_IF_SETOPT_NOT_OK(CURLOPT_HTTPAUTH, CURLAUTH_ANY);
238-
break;
237+
RETURN_IF_SETOPT_NOT_OK(CURLOPT_HTTPAUTH, CURLAUTH_ANY);
238+
break;
239239
}
240240

241241
return dsn::error_s::ok();

src/http/http_method.h

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,12 @@ enum class http_method
2828
INVALID = 100,
2929
};
3030

31-
enum class http_auth_type {
32-
NONE,
33-
BASIC,
34-
DIGEST,
35-
SPNEGO,
31+
enum class http_auth_type
32+
{
33+
NONE,
34+
BASIC,
35+
DIGEST,
36+
SPNEGO,
3637
};
3738

3839
ENUM_BEGIN(http_method, http_method::INVALID)

0 commit comments

Comments
 (0)