Skip to content

Commit

Permalink
Merge pull request #1 from rpmfusion-infra/openid_server
Browse files Browse the repository at this point in the history
set RPMFusion openid server
  • Loading branch information
leigh123linux committed Feb 5, 2024
2 parents a378da7 + 730972e commit b376f1e
Show file tree
Hide file tree
Showing 3 changed files with 919 additions and 2 deletions.
7 changes: 5 additions & 2 deletions rfpkgdb2client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@

import rpmfusion_cert
from fedora.client import AuthError
from fedora.client import OpenIdBaseClient
from rfpkgdb2client.openidbaseclient import OpenIdBaseClient
import re


class NullHandler(logging.Handler):
Expand All @@ -47,6 +48,8 @@ def emit(self, record):
BZ_URL = r'https://bugzilla.rpmfusion.org/xmlrpc.cgi'
KOJI_HUB = r'https://koji.rpmfusion.org/kojihub'
CGIT_URL = r'http://pkgs.rpmfusion.org/cgit'
RPMFUSION_OPENID_API = 'https://id.rpmfusion.org/api/v1/'
RPMFUSION_OPENID_RE = re.compile(r'^http(s)?:\/\/id\.(|stg.|dev.)?rpmfusion\.org(/)?')


class PkgDBException(Exception):
Expand Down Expand Up @@ -145,7 +148,7 @@ def login(self, username, password, otp=None):
for it.
'''
if not self.is_logged_in:
super(PkgDB, self).login(username, password, otp=None)
super(PkgDB, self).login(username, password, otp=None, openid_api=RPMFUSION_OPENID_API, openid_re=RPMFUSION_OPENID_RE)

def call_api(self, path, params=None, data=None):
''' call the API.
Expand Down
Loading

0 comments on commit b376f1e

Please sign in to comment.