Skip to content

Commit

Permalink
fixed a part of mistakes
Browse files Browse the repository at this point in the history
  • Loading branch information
feyruzb committed Jul 31, 2024
1 parent d3f6b29 commit b4d5a0a
Show file tree
Hide file tree
Showing 15 changed files with 199 additions and 222 deletions.
46 changes: 22 additions & 24 deletions docs/web/authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,26 @@ the results stored on a server.
Table of Contents
=================
- [CodeChecker authentication subsystem](#codechecker-authentication-subsystem)
- [Table of Contents](#table-of-contents)
- [Server-side configuration ](#server-side-configuration-)
- [Dictionary authentication ](#dictionary-authentication-)
- [External authentication methods ](#external-authentication-methods-)
- [PAM authentication ](#pam-authentication-)
- [LDAP authentication ](#ldap-authentication-)
- [Configuration options ](#configuration-options-)
- [Membership in custom groups with regex\_groups](#membership-in-custom-groups-with-regex_groups)
- [OAUTH authentication ](#oauth-authentication-)
- [OAUTH Configuration options ](#oauth-configuration-options-)
- [Details per each provider ](#details-per-each-provider-)
- [Client-side configuration ](#client-side-configuration-)
- [Web-browser client ](#web-browser-client-)
- [Command-line client ](#command-line-client-)
- [Preconfigured credentials ](#preconfigured-credentials-)
- [Automatic login ](#automatic-login-)
- [Currently active tokens ](#currently-active-tokens-)
- [Personal access token ](#personal-access-token-)
- [New personal access token ](#new-personal-access-token-)
- [List personal access tokens ](#list-personal-access-tokens-)
- [Remove personal access token ](#remove-personal-access-token-)
* [Server-side configuration](#server-side-configuration)
* [<i>Dictionary</i> authentication](#dictionary-authentication)
* [External authentication methods](#external-auth-methods)
* [<i>PAM</i> authentication](#pam-authentication)
* [<i>LDAP</i> authentication](#ldap-authentication)
* [Configuration options](#configuration-options)
* Membership in custom groups with [<i>regex_groups</i>](#regex_groups-authentication)
* [<i>OAUTH</i> authentication](#oauth-authentication)
* [<i>OAUTH</i> Configuration options](#oauth-configuration-options)
* [<i>OAUTH</i> details per each provider](#oauth-details-per-each-provider)
* [Client-side configuration](#client-side-configuration)
* [Web-browser client](#web-browser-client)
* [Command-line client](#command-line-client)
* [Preconfigured credentials](#preconfigured-credentials)
* [Automatic login](#automatic-login)
* [Currently active tokens](#currently-active-tokens)
* [Personal access token](#personal-access-token)
* [`new`](#new-personal-access-token)
* [`list`](#list-personal-access-token)
* [`del`](#remove-personal-access-token)

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

Expand Down Expand Up @@ -386,7 +384,7 @@ CodeChecker also supports OAUTH-based authentication. The `authentication.method
Field for the fullname.
* `allowed_users`

A list of allowed users differently configured for each provider
A list of allowed users differently configured for each provider

~~~{.json}
"method_oauth": {
Expand Down Expand Up @@ -435,7 +433,7 @@ CodeChecker also supports OAUTH-based authentication. The `authentication.method
}
~~~

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

* 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.

Expand Down
8 changes: 2 additions & 6 deletions web/api/authentication.thrift
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,8 @@ service codeCheckerAuthentication {
throws (1: codechecker_api_shared.RequestFailed requestError),

// Create a link for the user to log in for github Oauth.
string createLinkGithub()
throws (1: codechecker_api_shared.RequestFailed requestError),

// Create a link for the use to log in for google Oauth
string createLinkGoogle()
throws (1: codechecker_api_shared.RequestFailed requestError),
string createLink(1: string provider)
throws (1: codechecker_api_shared.RequestFailed requestError),

// Performs logout action for the user. Must be called from the
// corresponding valid session which is to be destroyed.
Expand Down
Binary file modified web/api/js/codechecker-api-node/dist/codechecker-api-6.59.0.tgz
Binary file not shown.
Binary file modified web/api/py/codechecker_api/dist/codechecker_api.tar.gz
Binary file not shown.
Binary file not shown.
4 changes: 2 additions & 2 deletions web/client/codechecker_client/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import getpass
import sys
from thrift.Thrift import TApplicationException
from authlib.integrations.requests_client import OAuth2Session


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


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

Expand Down
40 changes: 18 additions & 22 deletions web/client/codechecker_client/helpers/authentication.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

from codechecker_api.Authentication_v6 import codeCheckerAuthentication

from codechecker_client.thrift_call import ThriftClientCall
from codechecker_client.thrift_call import thrift_client_call
from .base import BaseClientHelper


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

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

@ThriftClientCall
@thrift_client_call
def checkAPIVersion(self):
pass

# ============= Authentication and session handling =============
@ThriftClientCall
@thrift_client_call
def getAuthParameters(self):
pass

@ThriftClientCall
@thrift_client_call
def getAcceptedAuthMethods(self):
pass

@ThriftClientCall
@thrift_client_call
def getAccessControl(self):
pass

@ThriftClientCall
@thrift_client_call
def performLogin(self, auth_method, auth_string):
pass

@ThriftClientCall
def createLinkGithub(self):
pass

@ThriftClientCall
def createLinkGoogle(self):
@thrift_client_call
def createLink(self, provider):
pass

@ThriftClientCall
@thrift_client_call
def destroySession(self):
pass

# ============= Authorization, permission management =============
@ThriftClientCall
@thrift_client_call
def getPermissions(self, scope):
pass

@ThriftClientCall
@thrift_client_call
def getPermissionsForUser(self, scope, extra_params, filter):
pass

@ThriftClientCall
@thrift_client_call
def getAuthorisedNames(self, permission, extra_params):
pass

@ThriftClientCall
@thrift_client_call
def addPermission(self, permission, auth_name, is_group, extra_params):
pass

@ThriftClientCall
@thrift_client_call
def removePermission(self, permission, auth_name, is_group, extra_params):
pass

@ThriftClientCall
@thrift_client_call
def hasPermission(self, permission, extra_params):
pass

# ============= Token management =============

@ThriftClientCall
@thrift_client_call
def newToken(self, description):
pass

@ThriftClientCall
@thrift_client_call
def removeToken(self, token):
pass

@ThriftClientCall
@thrift_client_call
def getTokens(self):
pass
Loading

0 comments on commit b4d5a0a

Please sign in to comment.