Skip to content

Commit b4d5a0a

Browse files
committed
fixed a part of mistakes
1 parent d3f6b29 commit b4d5a0a

File tree

15 files changed

+199
-222
lines changed

15 files changed

+199
-222
lines changed

docs/web/authentication.md

+22-24
Original file line numberDiff line numberDiff line change
@@ -9,28 +9,26 @@ the results stored on a server.
99
1010
Table of Contents
1111
=================
12-
- [CodeChecker authentication subsystem](#codechecker-authentication-subsystem)
13-
- [Table of Contents](#table-of-contents)
14-
- [Server-side configuration ](#server-side-configuration-)
15-
- [Dictionary authentication ](#dictionary-authentication-)
16-
- [External authentication methods ](#external-authentication-methods-)
17-
- [PAM authentication ](#pam-authentication-)
18-
- [LDAP authentication ](#ldap-authentication-)
19-
- [Configuration options ](#configuration-options-)
20-
- [Membership in custom groups with regex\_groups](#membership-in-custom-groups-with-regex_groups)
21-
- [OAUTH authentication ](#oauth-authentication-)
22-
- [OAUTH Configuration options ](#oauth-configuration-options-)
23-
- [Details per each provider ](#details-per-each-provider-)
24-
- [Client-side configuration ](#client-side-configuration-)
25-
- [Web-browser client ](#web-browser-client-)
26-
- [Command-line client ](#command-line-client-)
27-
- [Preconfigured credentials ](#preconfigured-credentials-)
28-
- [Automatic login ](#automatic-login-)
29-
- [Currently active tokens ](#currently-active-tokens-)
30-
- [Personal access token ](#personal-access-token-)
31-
- [New personal access token ](#new-personal-access-token-)
32-
- [List personal access tokens ](#list-personal-access-tokens-)
33-
- [Remove personal access token ](#remove-personal-access-token-)
12+
* [Server-side configuration](#server-side-configuration)
13+
* [<i>Dictionary</i> authentication](#dictionary-authentication)
14+
* [External authentication methods](#external-auth-methods)
15+
* [<i>PAM</i> authentication](#pam-authentication)
16+
* [<i>LDAP</i> authentication](#ldap-authentication)
17+
* [Configuration options](#configuration-options)
18+
* Membership in custom groups with [<i>regex_groups</i>](#regex_groups-authentication)
19+
* [<i>OAUTH</i> authentication](#oauth-authentication)
20+
* [<i>OAUTH</i> Configuration options](#oauth-configuration-options)
21+
* [<i>OAUTH</i> details per each provider](#oauth-details-per-each-provider)
22+
* [Client-side configuration](#client-side-configuration)
23+
* [Web-browser client](#web-browser-client)
24+
* [Command-line client](#command-line-client)
25+
* [Preconfigured credentials](#preconfigured-credentials)
26+
* [Automatic login](#automatic-login)
27+
* [Currently active tokens](#currently-active-tokens)
28+
* [Personal access token](#personal-access-token)
29+
* [`new`](#new-personal-access-token)
30+
* [`list`](#list-personal-access-token)
31+
* [`del`](#remove-personal-access-token)
3432

3533
# Server-side configuration <a name="server-side-configuration"></a>
3634

@@ -386,7 +384,7 @@ CodeChecker also supports OAUTH-based authentication. The `authentication.method
386384
Field for the fullname.
387385
* `allowed_users`
388386

389-
A list of allowed users differently configured for each provider
387+
A list of allowed users differently configured for each provider
390388

391389
~~~{.json}
392390
"method_oauth": {
@@ -435,7 +433,7 @@ CodeChecker also supports OAUTH-based authentication. The `authentication.method
435433
}
436434
~~~
437435

438-
#### Details per each provider <a name ="details-per-each-provider"></a>
436+
#### Oauth Details per each provider <a name ="oauth-details-per-each-provider"></a>
439437

440438
* For Google OAuth to function correctly, the `oauth_redirect_uri` in application's configuration must exactly match the `Authorized redirect URIs` specified in the Google API Console.
441439

web/api/authentication.thrift

+2-6
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,8 @@ service codeCheckerAuthentication {
7070
throws (1: codechecker_api_shared.RequestFailed requestError),
7171

7272
// Create a link for the user to log in for github Oauth.
73-
string createLinkGithub()
74-
throws (1: codechecker_api_shared.RequestFailed requestError),
75-
76-
// Create a link for the use to log in for google Oauth
77-
string createLinkGoogle()
78-
throws (1: codechecker_api_shared.RequestFailed requestError),
73+
string createLink(1: string provider)
74+
throws (1: codechecker_api_shared.RequestFailed requestError),
7975

8076
// Performs logout action for the user. Must be called from the
8177
// corresponding valid session which is to be destroyed.
Binary file not shown.
Binary file not shown.
Binary file not shown.

web/client/codechecker_client/client.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
import getpass
1414
import sys
1515
from thrift.Thrift import TApplicationException
16-
from authlib.integrations.requests_client import OAuth2Session
16+
1717

1818
import codechecker_api_shared
1919
from codechecker_api.Authentication_v6 import ttypes as AuthTypes
@@ -136,7 +136,7 @@ def login_user(protocol, host, port, username, login=False):
136136
sys.exit(1)
137137

138138

139-
def perform_auth_for_handler(auth_client, host, port, manager):
139+
def perform_auth_for_handler(auth_client, host, port, manager):
140140
# Before actually communicating with the server,
141141
# we need to check authentication first.
142142

web/client/codechecker_client/helpers/authentication.py

+18-22
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
from codechecker_api.Authentication_v6 import codeCheckerAuthentication
1313

14-
from codechecker_client.thrift_call import ThriftClientCall
14+
from codechecker_client.thrift_call import thrift_client_call
1515
from .base import BaseClientHelper
1616

1717

@@ -21,74 +21,70 @@ def __init__(self, protocol, host, port, uri, session_token=None):
2121

2222
self.client = codeCheckerAuthentication.Client(self.protocol)
2323

24-
@ThriftClientCall
24+
@thrift_client_call
2525
def checkAPIVersion(self):
2626
pass
2727

2828
# ============= Authentication and session handling =============
29-
@ThriftClientCall
29+
@thrift_client_call
3030
def getAuthParameters(self):
3131
pass
3232

33-
@ThriftClientCall
33+
@thrift_client_call
3434
def getAcceptedAuthMethods(self):
3535
pass
3636

37-
@ThriftClientCall
37+
@thrift_client_call
3838
def getAccessControl(self):
3939
pass
4040

41-
@ThriftClientCall
41+
@thrift_client_call
4242
def performLogin(self, auth_method, auth_string):
4343
pass
44-
45-
@ThriftClientCall
46-
def createLinkGithub(self):
47-
pass
4844

49-
@ThriftClientCall
50-
def createLinkGoogle(self):
45+
@thrift_client_call
46+
def createLink(self, provider):
5147
pass
5248

53-
@ThriftClientCall
49+
@thrift_client_call
5450
def destroySession(self):
5551
pass
5652

5753
# ============= Authorization, permission management =============
58-
@ThriftClientCall
54+
@thrift_client_call
5955
def getPermissions(self, scope):
6056
pass
6157

62-
@ThriftClientCall
58+
@thrift_client_call
6359
def getPermissionsForUser(self, scope, extra_params, filter):
6460
pass
6561

66-
@ThriftClientCall
62+
@thrift_client_call
6763
def getAuthorisedNames(self, permission, extra_params):
6864
pass
6965

70-
@ThriftClientCall
66+
@thrift_client_call
7167
def addPermission(self, permission, auth_name, is_group, extra_params):
7268
pass
7369

74-
@ThriftClientCall
70+
@thrift_client_call
7571
def removePermission(self, permission, auth_name, is_group, extra_params):
7672
pass
7773

78-
@ThriftClientCall
74+
@thrift_client_call
7975
def hasPermission(self, permission, extra_params):
8076
pass
8177

8278
# ============= Token management =============
8379

84-
@ThriftClientCall
80+
@thrift_client_call
8581
def newToken(self, description):
8682
pass
8783

88-
@ThriftClientCall
84+
@thrift_client_call
8985
def removeToken(self, token):
9086
pass
9187

92-
@ThriftClientCall
88+
@thrift_client_call
9389
def getTokens(self):
9490
pass

0 commit comments

Comments
 (0)