The life time of a token can be adjusted for authentication sessions.#182
The life time of a token can be adjusted for authentication sessions.#182
Conversation
By adding the kwarg token_expiration to a SwaggerClient request you can specify how long before a generated security token expires.
Codecov Report
@@ 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
Continue to review full report at Codecov.
|
kislyuk
left a comment
There was a problem hiding this comment.
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?
|
I like that idea. It's easier to understand. |
kislyuk
left a comment
There was a problem hiding this comment.
Please remove **kwargs forwarding altogether (just remove **kwargs from L123 and L366) unless you have another reason to keep it.
By adding the kwarg token_expiration to a SwaggerClient request you can specify how long before a generated security token expires.