X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FNBI.git;a=blobdiff_plain;f=osm_nbi%2Fauthconn_internal.py;fp=osm_nbi%2Fauthconn_internal.py;h=2d2ddabda1315546d107de0f7d7921a249a225a8;hp=40d32152f0f5ada08b54b272e42d6691ed74df58;hb=e1eb3b2c0bdb7462d330703702677b3354ceb9ff;hpb=1546f2a46d99a4741b23857e6ceb4b813223e297 diff --git a/osm_nbi/authconn_internal.py b/osm_nbi/authconn_internal.py index 40d3215..2d2ddab 100644 --- a/osm_nbi/authconn_internal.py +++ b/osm_nbi/authconn_internal.py @@ -47,9 +47,6 @@ class AuthconnInternal(Authconn): self.logger = logging.getLogger("nbi.authenticator.internal") - # Get Configuration - # self.xxx = config.get("xxx", "default") - self.db = db self.token_cache = token_cache @@ -99,12 +96,7 @@ class AuthconnInternal(Authconn): else: raise except AuthException: - if self.config["global"].get("test.user_not_authorized"): - return {"id": "fake-token-id-for-test", - "project_id": self.config["global"].get("test.project_not_authorized", "admin"), - "username": self.config["global"]["test.user_not_authorized"], "admin": True} - else: - raise + raise except Exception: self.logger.exception("Error during token validation using internal backend") raise AuthException("Error during token validation using internal backend",