pyauth / pyotp

Python One-Time Password Library
https://pyauth.github.io/pyotp/
Other
2.91k stars 319 forks source link

Steam TOTP #142

Closed einfachIrgendwer0815 closed 1 year ago

einfachIrgendwer0815 commented 1 year ago

It's basically what I have already commented on the corresponding issue (#127), but integrated into pyotp.

A new class is added in a pyotp.contrib.steam submodule. It's a subclass of pyotp.TOTP and overrides the generate_otp method. (all as mentioned in the issue here)

I also added some tests and included the new class in the API Documentation section.

codecov-commenter commented 1 year ago

Codecov Report

Merging #142 (8b79d14) into develop (a7d6e5e) will decrease coverage by 0.86%. The diff coverage is 100.00%.

@@             Coverage Diff             @@
##           develop     #142      +/-   ##
===========================================
- Coverage    98.89%   98.02%   -0.87%     
===========================================
  Files            6        8       +2     
  Lines          181      203      +22     
  Branches        38       43       +5     
===========================================
+ Hits           179      199      +20     
- Misses           1        3       +2     
  Partials         1        1              
Impacted Files Coverage Δ
src/pyotp/__init__.py 100.00% <100.00%> (ø)
src/pyotp/contrib/__init__.py 100.00% <100.00%> (ø)
src/pyotp/contrib/steam.py 100.00% <100.00%> (ø)
src/pyotp/compat.py 60.00% <0.00%> (-40.00%) :arrow_down:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

kislyuk commented 1 year ago

Great work, thank you for your contribution!