Skip to content

The life time of a token can be adjusted for authentication sessions.#182

Merged
Bento007 merged 3 commits intomasterfrom
tsmith-param-jwt-exp
Sep 17, 2018
Merged

The life time of a token can be adjusted for authentication sessions.#182
Bento007 merged 3 commits intomasterfrom
tsmith-param-jwt-exp

Conversation

@Bento007
Copy link
Copy Markdown
Collaborator

@Bento007 Bento007 commented Sep 7, 2018

By adding the kwarg token_expiration to a SwaggerClient request you can specify how long before a generated security token expires.

By adding the kwarg token_expiration to a SwaggerClient request you can specify how long before a generated security token expires.
@codecov-io
Copy link
Copy Markdown

codecov-io commented Sep 7, 2018

Codecov Report

Merging #182 into master will increase coverage by 0.45%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #182      +/-   ##
==========================================
+ Coverage   86.01%   86.46%   +0.45%     
==========================================
  Files          34       34              
  Lines        1330     1367      +37     
==========================================
+ Hits         1144     1182      +38     
+ Misses        186      185       -1
Impacted Files Coverage Δ
hca/util/__init__.py 89.26% <100%> (ø) ⬆️
hca/dss/__init__.py 87.24% <0%> (+3.59%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 65f62a0...0733ef6. Read the comment docs.

@Bento007 Bento007 requested a review from kislyuk September 7, 2018 20:42
@Bento007 Bento007 changed the title [WIP] The life time of a token can be adjusted for authentication sessions. The life time of a token can be adjusted for authentication sessions. Sep 7, 2018
Copy link
Copy Markdown
Member

@kislyuk kislyuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

imho _request shouldn't slurp up miscellaneous args and route them to get_authenticated_session but not get_session. I would suggest setting these args out of band on the class instead:

c = SwaggerClient()
c.token_expiration = 9000
c.get_bundle(...)

What do you think?

@Bento007
Copy link
Copy Markdown
Collaborator Author

I like that idea. It's easier to understand.

@Bento007 Bento007 requested a review from kislyuk September 11, 2018 17:50
Copy link
Copy Markdown
Member

@kislyuk kislyuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove **kwargs forwarding altogether (just remove **kwargs from L123 and L366) unless you have another reason to keep it.

@Bento007 Bento007 requested a review from kislyuk September 14, 2018 22:35
@Bento007 Bento007 merged commit 0cb323d into master Sep 17, 2018
@Bento007 Bento007 deleted the tsmith-param-jwt-exp branch September 17, 2018 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants