-
Notifications
You must be signed in to change notification settings - Fork 25
Minor fixes #31
Minor fixes #31
Conversation
src/oidcop/oauth2/introspection.py
Outdated
| _token = grant.get_token(request_token) | ||
|
|
||
| _info = self._introspect( | ||
| _token, _session_info["client_id"], _session_info["grant"]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have test if the _session_info doesn't have a grant key?
anyway ILGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm, this wouldn't fail, but I think that https://github.com/IdentityPython/oidc-op/pull/31/files#diff-315b01569b3a7bd24a653670e83e37c463e9e86cce66153b84931bccb96ed963R83 could raise an error in that case.
Good catch, I'll look into it and try to write some tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should not be possible to have a session without a grant.
As the code is right now when a session is created a grant is added to the session.
This is before user consent or application of service policies so the grant will not really allow anything but it's there.
|
An item in issued_tokens should always be an instance of a SessionToken or a sub class of SessionToken You obviously creates ID Tokens 'outside' session management. |
|
You are right. I'm not sure whether we should store ID tokens, it's something that I have thought about too. And I don't see a reason other than for the introspection endpoint (some providers allow introspection of ID tokens). The minting of ID tokens is done in https://github.com/IdentityPython/oidc-op/blob/develop/src/oidcop/oauth2/authorization.py#L764. I thought that that behavior was intentional, that's why I allowed strings in Whether we want ID tokens to inherit from SessionToken or not we should do it in another PR. |
|
Probably I miss the storytelling about the session tokens and the id token but I'm wondering on the meaning of "issued tokens". If a SSO session issued some tokens well these token should be related to that session. Actually the session carries as issued tokens only access and authz token @roland that's ok, I understand that we could have many token of many nature and these will not belong to the session ... But it's a fact THAT the session issued all those tokens. Finally, OK, where to store the issued id token and how to have them in a dump? |
|
I'm just putting the last touches on making ID Tokens session tokens. This means that in the future if we want an ID Token you used the |
Ok, great. |
|
@nsklikas you should probably go back and see what of this is still needed to change. |
|
You didn't have to go back. :-) |

This PR contains some minor fixes.
grant.get_tokento reduce db queries.grant.issued_tokensrefresh_tokenandtoken_exchangegrants (it should do nothing)