Skip to content

Fix expires_in in OAuth2 Token is too huge #39

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

YoitoFes
Copy link

@YoitoFes YoitoFes commented Aug 11, 2022

According to RFC6749, expires_in in OAuth2 Token is the lifetime in seconds of the access token.

But mockoidc set MockOIDC.AccessTTL directly to expires_in, making expires_in huge; e.g. if AccessTTL = 10 * time.Seconds (1000000000), expires_in becomes 10000000000 in seconds.

Fix it.

Close #38

Signed-off-by: Naoto Kobayashi naoto.kobayashi4c@gmail.com

According to RFC6749, expires_in in OAuth2 Token is the lifetime in
seconds of the access token.

- https://www.rfc-editor.org/rfc/rfc6749#section-4.2.2

But mockoidc set MockOIDC.AccessTTL directly to expires_in, making
expires_in huge; e.g. if AccessTTL = 10 * time.Seconds (1000000000),
expires_in becomes 10000000000 in seconds.

Fix it.

Signed-off-by: Naoto Kobayashi <naoto.kobayashi4c@gmail.com>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

expires_in in OAuth2 Token is too huge
1 participant