diff --git a/example/flask_op/private/cookie_jwks.json b/example/flask_op/private/cookie_jwks.json index 528741ff..dd515ec4 100644 --- a/example/flask_op/private/cookie_jwks.json +++ b/example/flask_op/private/cookie_jwks.json @@ -1 +1 @@ -{"keys": [{"kty": "oct", "use": "enc", "kid": "enc", "k": "GCizp3ewVRV0VZEef3VQwFve7n2QwAFI"}, {"kty": "oct", "use": "sig", "kid": "sig", "k": "QC2JxpVJXPDMpYv_h76jIrt_lA1P4KSu"}]} \ No newline at end of file +{"keys": [{"kty": "oct", "use": "enc", "kid": "enc", "k": "GEmhZ9UKLSq60zECQRyAtmMLG5smRpCl"}, {"kty": "oct", "use": "sig", "kid": "sig", "k": "Px8EGB-oWk-DfMlYWXBHTjED372mvtBt"}]} \ No newline at end of file diff --git a/src/idpyoidc/__init__.py b/src/idpyoidc/__init__.py index 0b77ba88..626ef98f 100644 --- a/src/idpyoidc/__init__.py +++ b/src/idpyoidc/__init__.py @@ -1,5 +1,5 @@ __author__ = "Roland Hedberg" -__version__ = "4.1.0" +__version__ = "4.2.0" VERIFIED_CLAIM_PREFIX = "__verified" diff --git a/src/idpyoidc/impexp.py b/src/idpyoidc/impexp.py index ff8938ea..f3af2e5b 100644 --- a/src/idpyoidc/impexp.py +++ b/src/idpyoidc/impexp.py @@ -46,7 +46,16 @@ def dump_attr(self, cls, item, exclude_attributes: Optional[List[str]] = None) - elif cls == b"": val = f"BYTES:{base64.b64encode(item).decode('utf-8')}" elif cls == {} and isinstance(item, dict): - val = {k: self.dump_attr(type2cls(v), v, exclude_attributes) for k, v in item.items()} + val = {} + for k, v in item.items(): + if k != "upstream_get": + if k == "class": + if isinstance(v, str): + val[k] = v + else: + val[k] = fully_qualified_name(v) + else: + val[k] = self.dump_attr(type2cls(v), v, exclude_attributes) elif cls == [] and isinstance(item, list): val = [self.dump_attr(type2cls(v), v, exclude_attributes) for v in item] elif cls == "DICT_TYPE": @@ -161,7 +170,6 @@ def load_attr( return val def load(self, item: dict, init_args: Optional[dict] = None, load_args: Optional[dict] = None): - if load_args: _kwargs = {"load_args": load_args} _load_args = load_args @@ -180,6 +188,20 @@ def load(self, item: dict, init_args: Optional[dict] = None, load_args: Optional if attr not in item or attr in self.special_load_dump: continue + _cls_init_args = getattr(cls, "init_args", {}) + + for param, target in {"upstream_get": "unit_get", "conf": "conf", + "token_handler_args": "token_handler_args"}.items(): + target_val = getattr(self, target, None) + if not target_val: + continue + + if param in _cls_init_args and param not in _kwargs: + if _kwargs["init_args"] is None: + _kwargs["init_args"] = {param: target_val} + else: + _kwargs["init_args"][param] = target_val + setattr(self, attr, self.load_attr(cls, item[attr], **_kwargs)) for attr, func in self.special_load_dump.items(): diff --git a/src/idpyoidc/server/__init__.py b/src/idpyoidc/server/__init__.py index 5946113d..14fe949e 100644 --- a/src/idpyoidc/server/__init__.py +++ b/src/idpyoidc/server/__init__.py @@ -32,7 +32,7 @@ def do_endpoints(conf, upstream_get): class Server(Unit): - parameter = {"endpoint": [Endpoint], "context": EndpointContext} + parameter = {"context": EndpointContext} def __init__( self, diff --git a/src/idpyoidc/server/endpoint_context.py b/src/idpyoidc/server/endpoint_context.py index e43e74a2..0b5d2ffa 100755 --- a/src/idpyoidc/server/endpoint_context.py +++ b/src/idpyoidc/server/endpoint_context.py @@ -8,6 +8,7 @@ from cryptojwt import KeyJar from jinja2 import Environment from jinja2 import FileSystemLoader +from requests import request from idpyoidc.context import OidcContext from idpyoidc.server import authz @@ -19,13 +20,11 @@ from idpyoidc.server.scopes import SCOPE2CLAIMS from idpyoidc.server.scopes import Scopes from idpyoidc.server.session.manager import SessionManager -from idpyoidc.server.session.manager import create_session_manager from idpyoidc.server.template_handler import Jinja2TemplateHandler from idpyoidc.server.user_authn.authn_context import populate_authn_broker from idpyoidc.server.util import get_http_params from idpyoidc.util import importer from idpyoidc.util import rndstr -from requests import request logger = logging.getLogger(__name__) @@ -61,14 +60,14 @@ def get_token_handler_args(conf: dict) -> dict: :param conf: The configuration :rtype: dict """ - th_args = conf.get("token_handler_args", None) - if not th_args: - th_args = { + token_handler_args = conf.get("token_handler_args", None) + if not token_handler_args: + token_handler_args = { typ: {"lifetime": tid} for typ, tid in [("code", 600), ("token", 3600), ("refresh", 86400)] } - return th_args + return token_handler_args class EndpointContext(OidcContext): @@ -88,7 +87,7 @@ class EndpointContext(OidcContext): "jwks_uri": "", "keyjar": KeyJar, "login_hint_lookup": None, - "login_hint2acrs": {}, + "login_hint2acrs": None, "par_db": {}, "provider_info": {}, "registration_access_token": {}, @@ -102,19 +101,19 @@ class EndpointContext(OidcContext): "client_authn_method": {}, } - init_args = ["upstream_get", "handler"] + init_args = ["upstream_get", "conf"] def __init__( - self, - conf: Union[dict, OPConfiguration], - upstream_get: Callable, - cwd: Optional[str] = "", - cookie_handler: Optional[Any] = None, - httpc: Optional[Any] = None, - server_type: Optional[str] = "", - entity_id: Optional[str] = "", - keyjar: Optional[KeyJar] = None, - claims_class: Optional[Claims] = None, + self, + conf: Union[dict, OPConfiguration], + upstream_get: Callable, + cwd: Optional[str] = "", + cookie_handler: Optional[Any] = None, + httpc: Optional[Any] = None, + server_type: Optional[str] = "", + entity_id: Optional[str] = "", + keyjar: Optional[KeyJar] = None, + claims_class: Optional[Claims] = None, ): _id = entity_id or conf.get("issuer", "") OidcContext.__init__(self, conf, entity_id=_id) @@ -185,7 +184,7 @@ def __init__( except KeyError: pass - self.th_args = get_token_handler_args(conf) + self.token_handler_args = get_token_handler_args(conf) # session db self._sub_func = {} @@ -249,12 +248,11 @@ def __init__( self.setup_authentication() - self.session_manager = create_session_manager( - self.unit_get, - self.th_args, + self.session_manager = SessionManager( + self.token_handler_args, sub_func=self._sub_func, - conf=self.conf, - ) + conf=conf, + upstream_get=self.unit_get) self.do_userinfo() @@ -276,7 +274,8 @@ def setup_authz(self): return authz.Implicit(self.unit_get) def setup_client_authn_methods(self): - self.client_authn_methods = client_auth_setup(self.unit_get, self.conf.get("client_authn_methods")) + self.client_authn_methods = client_auth_setup(self.unit_get, + self.conf.get("client_authn_methods")) def setup_login_hint_lookup(self): _conf = self.conf.get("login_hint_lookup") diff --git a/src/idpyoidc/server/session/manager.py b/src/idpyoidc/server/session/manager.py index 81b06c1f..1c7c35a4 100644 --- a/src/idpyoidc/server/session/manager.py +++ b/src/idpyoidc/server/session/manager.py @@ -13,21 +13,21 @@ from idpyoidc.server.exception import ConfigurationError from idpyoidc.server.session.grant_manager import GrantManager from idpyoidc.util import rndstr - -from ..token import UnknownToken -from ..token import WrongTokenClass -from ..token import handler -from ..token.handler import TokenHandler from .database import Database from .grant import Grant from .grant import SessionToken from .info import ClientSessionInfo from .info import UserSessionInfo +from ..token import handler +from ..token import UnknownToken +from ..token import WrongTokenClass +from ..token.handler import TokenHandler logger = logging.getLogger(__name__) class RawID(object): + def __init__(self, *args, **kwargs): pass @@ -42,6 +42,7 @@ def pairwise_id(uid, sector_identifier, salt="", **kwargs): class PairWiseID(object): + def __init__(self, salt: Optional[str] = "", filename: Optional[str] = ""): if salt: self.salt = salt @@ -49,7 +50,7 @@ def __init__(self, salt: Optional[str] = "", filename: Optional[str] = ""): if os.path.isfile(filename): self.salt = open(filename).read() elif not os.path.isfile(filename) and os.path.exists( - filename + filename ): # Not a file, Something else raise ConfigurationError("Salt filename points to something that is not a file") else: @@ -70,6 +71,7 @@ def public_id(uid, salt="", **kwargs): class PublicID(PairWiseID): + def __call__(self, uid, sector_identifier, *args, **kwargs): return public_id(uid, self.salt) @@ -81,20 +83,22 @@ def ephemeral_id(*args, **kwargs): class SessionManager(GrantManager): parameter = Database.parameter.copy() # parameter.update({"salt": ""}) - init_args = ["handler"] + init_args = ["token_handler_args", "upstream_get"] def __init__( - self, - handler: TokenHandler, - conf: Optional[dict] = None, - sub_func: Optional[dict] = None, - remember_token: Optional[Callable] = None, - remove_inactive_token: Optional[bool] = False, + self, + token_handler_args: dict, + conf: Optional[dict] = None, + sub_func: Optional[dict] = None, + remember_token: Optional[Callable] = None, + remove_inactive_token: Optional[bool] = False, + upstream_get: Optional[Callable] = None, ): self.conf = conf or {"session_params": {"encrypter": default_crypt_config()}} - session_params = self.conf.get("session_params") or {} - super(SessionManager, self).__init__(handler, self.conf) + self.token_handler = self.create_token_handler(upstream_get, token_handler_args) + + super(SessionManager, self).__init__(self.token_handler, self.conf) self.node_type = session_params.get("node_type", ["user", "client", "grant"]) # Make sure node_type is a list and must contain at least one element. @@ -108,7 +112,6 @@ def __init__( {"user": UserSessionInfo, "client": ClientSessionInfo, "grant": Grant}, ) - self.token_handler = handler self.remember_token = remember_token self.remove_inactive_token = remove_inactive_token @@ -131,6 +134,9 @@ def __init__( self.auth_req_id_map = {} + def create_token_handler(self, upstream_get, token_handler_args) -> TokenHandler: + return handler.factory(upstream_get, **token_handler_args) + def get_user_info(self, uid: str) -> UserSessionInfo: usi = self.get([uid]) if isinstance(usi, UserSessionInfo): @@ -160,14 +166,14 @@ def make_path(self, **kwargs): return _path def create_grant( - self, - authn_event: AuthnEvent, - auth_req: AuthorizationRequest, - user_id: Optional[str] = "", - client_id: Optional[str] = "", - sub_type: Optional[str] = "public", - token_usage_rules: Optional[dict] = None, - scopes: Optional[list] = None, + self, + authn_event: AuthnEvent, + auth_req: AuthorizationRequest, + user_id: Optional[str] = "", + client_id: Optional[str] = "", + sub_type: Optional[str] = "public", + token_usage_rules: Optional[dict] = None, + scopes: Optional[list] = None, ) -> str: """ @@ -210,15 +216,15 @@ def create_grant( ) def create_exchange_grant( - self, - exchange_request: TokenExchangeRequest, - original_grant: Grant, - original_session_id: str, - user_id: str, - client_id: Optional[str] = "", - sub_type: Optional[str] = "public", - token_usage_rules: Optional[dict] = None, - scopes: Optional[list] = None, + self, + exchange_request: TokenExchangeRequest, + original_grant: Grant, + original_session_id: str, + user_id: str, + client_id: Optional[str] = "", + sub_type: Optional[str] = "public", + token_usage_rules: Optional[dict] = None, + scopes: Optional[list] = None, ) -> str: """ @@ -242,14 +248,14 @@ def create_exchange_grant( ) def create_session( - self, - authn_event: AuthnEvent, - auth_req: AuthorizationRequest, - user_id: Optional[str] = "", - client_id: Optional[str] = "", - sub_type: Optional[str] = "public", - token_usage_rules: Optional[dict] = None, - scopes: Optional[list] = None, + self, + authn_event: AuthnEvent, + auth_req: AuthorizationRequest, + user_id: Optional[str] = "", + client_id: Optional[str] = "", + sub_type: Optional[str] = "public", + token_usage_rules: Optional[dict] = None, + scopes: Optional[list] = None, ) -> str: """ Create part of a user session. The parts added are user- and client @@ -276,15 +282,15 @@ def create_session( ) def create_exchange_session( - self, - exchange_request: TokenExchangeRequest, - original_grant: Grant, - original_session_id: str, - user_id: str, - client_id: Optional[str] = "", - sub_type: Optional[str] = "public", - token_usage_rules: Optional[dict] = None, - scopes: Optional[list] = None, + self, + exchange_request: TokenExchangeRequest, + original_grant: Grant, + original_session_id: str, + user_id: str, + client_id: Optional[str] = "", + sub_type: Optional[str] = "public", + token_usage_rules: Optional[dict] = None, + scopes: Optional[list] = None, ) -> str: """ Create part of a user session. The parts added are user- and client @@ -372,10 +378,10 @@ def revoke_token(self, session_id: str, token_value: str, recursive: bool = Fals grant.revoke_token(value=token.value) def get_authentication_events( - self, - session_id: Optional[str] = "", - user_id: Optional[str] = "", - client_id: Optional[str] = "", + self, + session_id: Optional[str] = "", + user_id: Optional[str] = "", + client_id: Optional[str] = "", ) -> List[AuthnEvent]: """ Return the authentication events that exists for a user/client combination. @@ -449,13 +455,13 @@ def revoke_grant(self, session_id: str): # return [self.get([user_id, client_id, gid]) for gid in _csi.subordinate] def get_session_info( - self, - session_id: str, - user_session_info: bool = False, - client_session_info: bool = False, - grant: bool = False, - authentication_event: bool = False, - authorization_request: bool = False, + self, + session_id: str, + user_session_info: bool = False, + client_session_info: bool = False, + grant: bool = False, + authentication_event: bool = False, + authorization_request: bool = False, ) -> dict: """ Returns information connected to a session. @@ -480,14 +486,14 @@ def get_session_info( return res def get_session_info_by_token( - self, - token_value: str, - user_session_info: Optional[bool] = False, - client_session_info: Optional[bool] = False, - grant: Optional[bool] = False, - authentication_event: Optional[bool] = False, - authorization_request: Optional[bool] = False, - handler_key: Optional[str] = "", + self, + token_value: str, + user_session_info: Optional[bool] = False, + client_session_info: Optional[bool] = False, + grant: Optional[bool] = False, + authentication_event: Optional[bool] = False, + authorization_request: Optional[bool] = False, + handler_key: Optional[str] = "", ) -> dict: if handler_key: @@ -533,7 +539,5 @@ def encrypted_session_id(self, *args): def unpack_session_key(self, key): return self.unpack_branch_key(key) - -def create_session_manager(upstream_get, token_handler_args, sub_func=None, conf=None): - _token_handler = handler.factory(upstream_get, **token_handler_args) - return SessionManager(_token_handler, sub_func=sub_func, conf=conf) +# def create_session_manager(upstream_get, token_handler_args, sub_func=None, conf=None): +# return SessionManager(token_handler_args, sub_func=sub_func, conf=conf, upstream_get=upstream_get) diff --git a/src/idpyoidc/time_util.py b/src/idpyoidc/time_util.py index 9e0d7e18..f9ebb095 100644 --- a/src/idpyoidc/time_util.py +++ b/src/idpyoidc/time_util.py @@ -27,7 +27,7 @@ from datetime import timezone TIME_FORMAT = "%Y-%m-%dT%H:%M:%SZ" -TIME_FORMAT_WITH_FRAGMENT = re.compile("^(\d{4,4}-\d{2,2}-\d{2,2}T\d{2,2}:\d{2,2}:\d{2,2})\.\d*Z$") +TIME_FORMAT_WITH_FRAGMENT = re.compile(r"^(\d{4,4}-\d{2,2}-\d{2,2}T\d{2,2}:\d{2,2}:\d{2,2})\.\d*Z$") logger = logging.getLogger(__name__) diff --git a/tests/private/cookie_jwks.json b/tests/private/cookie_jwks.json index 18019707..9d47588c 100644 --- a/tests/private/cookie_jwks.json +++ b/tests/private/cookie_jwks.json @@ -1 +1 @@ -{"keys": [{"kty": "oct", "use": "enc", "kid": "enc", "k": "7xG8oXkNgtAL19-iaCL-bj-DQouoqBw7"}, {"kty": "oct", "use": "sig", "kid": "sig", "k": "NRm9wloPSJPtH3q6cweE60-opMnq556G"}]} \ No newline at end of file +{"keys": [{"kty": "oct", "use": "enc", "kid": "enc", "k": "4L_0vvQ5QsJvswvh5qCNFyLF4BTSI6xf"}, {"kty": "oct", "use": "sig", "kid": "sig", "k": "UsJ7o_W_ND7aoKnbeWEes3MJOECMMY_c"}]} \ No newline at end of file diff --git a/tests/private/token_jwks.json b/tests/private/token_jwks.json index e587b2a1..3790bbf7 100644 --- a/tests/private/token_jwks.json +++ b/tests/private/token_jwks.json @@ -1 +1 @@ -{"keys": [{"kty": "oct", "use": "enc", "kid": "code", "k": "vSHDkLBHhDStkR0NWu8519rmV5zmnm5_"}, {"kty": "oct", "use": "enc", "kid": "refresh", "k": "Ps_KwX5Kw9lB89TaXnArVOZGClLgW2CX"}]} \ No newline at end of file +{"keys": [{"kty": "oct", "use": "enc", "kid": "code", "k": "vSHDkLBHhDStkR0NWu8519rmV5zmnm5_"}, {"kty": "oct", "use": "enc", "kid": "refresh", "k": "LxZS5XrgcQJSv6ldNDNYd3xNE7ldifF2"}]} \ No newline at end of file diff --git a/tests/pub_client.jwks b/tests/pub_client.jwks index d5ce25ed..84a27042 100644 --- a/tests/pub_client.jwks +++ b/tests/pub_client.jwks @@ -1 +1 @@ -{"keys": [{"kty": "EC", "use": "sig", "kid": "azZQQ2FEQjh3QnVZWVdrbHJkMEZSaWR6aVJ0LTBjeUFfeWRlbTRrRFZ5VQ", "crv": "P-256", "x": "2ADe18caWWGp6hpRbfa9HqQHDFNpid9xUmR56Wzm_wc", "y": "HnD_8QBanz4Y-UF8mKQFZXfqkGkXUSm34mLsdDKtSyk"}, {"kty": "RSA", "use": "sig", "kid": "SHEyYWcwNVk0LTdROTZzZ2FUWndIVXdack0xWUM5SEpwcS03dVUxWU4zRQ", "n": "rRz52ddyP9Y2ezSlRsnkt-sjXfV_Ii7vOFX-cStLE3IUlVeSJGEe_kAASLr2r3BE2unjntaxj67NP8D95h_rzG1SpCklTEn-aTe3FOwNyTzUH_oiDVeRoEcf04Y43ciRGYRB5PhI6ii-2lYuig6hyUr776Qxiu6-0zw-M_ay2MgGSy5CEj55dDSvcUyxStUObxGpPWnEvybO1vnE7iJEWGNe0L5uPe5nLidOiR-JwjxSWEx1xZYtIjxaf2Ulu-qu4hwgwBUQdx4bNZyBfljKj55skWuHqPMG3xMjnedQC6Ms5bR3rIkbBpvmgI3kJK-4CZikM6ruyLo94-Lk19aYQw", "e": "AQAB"}]} \ No newline at end of file +{"keys": [{"kty": "EC", "use": "sig", "kid": "azZQQ2FEQjh3QnVZWVdrbHJkMEZSaWR6aVJ0LTBjeUFfeWRlbTRrRFZ5VQ", "crv": "P-256", "x": "2ADe18caWWGp6hpRbfa9HqQHDFNpid9xUmR56Wzm_wc", "y": "HnD_8QBanz4Y-UF8mKQFZXfqkGkXUSm34mLsdDKtSyk"}, {"kty": "RSA", "use": "sig", "kid": "SHEyYWcwNVk0LTdROTZzZ2FUWndIVXdack0xWUM5SEpwcS03dVUxWU4zRQ", "e": "AQAB", "n": "rRz52ddyP9Y2ezSlRsnkt-sjXfV_Ii7vOFX-cStLE3IUlVeSJGEe_kAASLr2r3BE2unjntaxj67NP8D95h_rzG1SpCklTEn-aTe3FOwNyTzUH_oiDVeRoEcf04Y43ciRGYRB5PhI6ii-2lYuig6hyUr776Qxiu6-0zw-M_ay2MgGSy5CEj55dDSvcUyxStUObxGpPWnEvybO1vnE7iJEWGNe0L5uPe5nLidOiR-JwjxSWEx1xZYtIjxaf2Ulu-qu4hwgwBUQdx4bNZyBfljKj55skWuHqPMG3xMjnedQC6Ms5bR3rIkbBpvmgI3kJK-4CZikM6ruyLo94-Lk19aYQw"}]} \ No newline at end of file diff --git a/tests/pub_iss.jwks b/tests/pub_iss.jwks index 77081f40..9b062907 100644 --- a/tests/pub_iss.jwks +++ b/tests/pub_iss.jwks @@ -1 +1 @@ -{"keys": [{"kty": "EC", "use": "sig", "kid": "SmdKMlVGcG1zMnprdDdXZGpGWEczdHhlZVpGbkx1THpPdUY4d0w4bnZkSQ", "crv": "P-256", "x": "tRHJYm0fsOi0icpGEb33qiDVgt68ltMoYSWdLGhDGz4", "y": "fRpX0i6p5Jigf5I0qwW34PyStosMShwWAWS8x_w5o7E"}, {"kty": "RSA", "use": "sig", "kid": "R0FsaFdqREFaUFp1c0MwbUpsbHVSZ200blBJZWJVMTUtNGsyVlBmdHk5UQ", "n": "2ilgsKVqF92KfhwmosSVeZOaDgb3RF1mbg-pqkmLO6YpOO06LF4V4angF-GhP-ysAm2E75aSIU4tnHVThFlcxTgKFqjYKJQXyVzTVK2r-L2IbvFPaDtvoU6WteybpMlIUVk2po3cFDGObCWYKCm7CUOLlwH0uOpui66P9VSCqdKVKbJRAQBvTSbP10KWPxulfqjWGJtHO5fY7-JVWwOBkG-eHSJIT_uaoPjyvKCZjknq04bLUV9qP78KRQpRyYijBN60w2v8F79baN9CN10TIEjjWKGz0uX0M_YYQzTUoSY5l5ka9RkL3wT4o2iQ1t5nHphX6aA-gqwgCQmi-nvjaw", "e": "AQAB"}]} \ No newline at end of file +{"keys": [{"kty": "EC", "use": "sig", "kid": "SmdKMlVGcG1zMnprdDdXZGpGWEczdHhlZVpGbkx1THpPdUY4d0w4bnZkSQ", "crv": "P-256", "x": "tRHJYm0fsOi0icpGEb33qiDVgt68ltMoYSWdLGhDGz4", "y": "fRpX0i6p5Jigf5I0qwW34PyStosMShwWAWS8x_w5o7E"}, {"kty": "RSA", "use": "sig", "kid": "R0FsaFdqREFaUFp1c0MwbUpsbHVSZ200blBJZWJVMTUtNGsyVlBmdHk5UQ", "e": "AQAB", "n": "2ilgsKVqF92KfhwmosSVeZOaDgb3RF1mbg-pqkmLO6YpOO06LF4V4angF-GhP-ysAm2E75aSIU4tnHVThFlcxTgKFqjYKJQXyVzTVK2r-L2IbvFPaDtvoU6WteybpMlIUVk2po3cFDGObCWYKCm7CUOLlwH0uOpui66P9VSCqdKVKbJRAQBvTSbP10KWPxulfqjWGJtHO5fY7-JVWwOBkG-eHSJIT_uaoPjyvKCZjknq04bLUV9qP78KRQpRyYijBN60w2v8F79baN9CN10TIEjjWKGz0uX0M_YYQzTUoSY5l5ka9RkL3wT4o2iQ1t5nHphX6aA-gqwgCQmi-nvjaw"}]} \ No newline at end of file diff --git a/tests/test_server_11_session_manager_pairwise.py b/tests/test_server_11_session_manager_pairwise.py index efd38c90..3b8991c1 100644 --- a/tests/test_server_11_session_manager_pairwise.py +++ b/tests/test_server_11_session_manager_pairwise.py @@ -42,7 +42,3 @@ def cleanup(self): class TestSessionManagerPublicID: pw = PublicID() pw("diana", "that-sector") - - -class TestSessionManagerConf: - sman = SessionManager(handler=TokenHandler(), conf={"password": "hola!"}) diff --git a/tests/test_server_26_oidc_userinfo_endpoint.py b/tests/test_server_26_oidc_userinfo_endpoint.py index d53331d2..1d76e453 100755 --- a/tests/test_server_26_oidc_userinfo_endpoint.py +++ b/tests/test_server_26_oidc_userinfo_endpoint.py @@ -285,7 +285,7 @@ def test_parse(self): session_id = self._create_session(AUTH_REQ) grant = self.session_manager[session_id] - # Free standing access token, not based on an authorization code + # Freestanding access token, not based on an authorization code access_token = self._mint_token("access_token", grant, session_id) http_info = {"headers": {"authorization": "Bearer {}".format(access_token.value)}} _req = self.endpoint.parse_request({}, http_info=http_info)