mirror of
https://github.com/status-im/PyGithub.git
synced 2026-09-01 11:21:16 +00:00
Added onetime_password to create_authorization
github.AuthenticatedUser.create_authorization has been modified to support two-factor authentication. When two-factor authentication is enabled create_authorization will throw an TwoFactorException. The onetime password can be then be passed to create_authorization on a subsequent call.
This commit is contained in:
@@ -60,7 +60,6 @@ class BadCredentialsException(GithubException):
|
||||
Exception raised in case of bad credentials (when Github API replies with a 401 or 403 HTML status)
|
||||
"""
|
||||
|
||||
|
||||
class UnknownObjectException(GithubException):
|
||||
"""
|
||||
Exception raised when a non-existing object is requested (when Github API replies with a 404 HTML status)
|
||||
@@ -108,3 +107,8 @@ class BadAttributeException(Exception):
|
||||
The exception raised when PyGithub tried to parse the value
|
||||
"""
|
||||
return self.__transformationException
|
||||
|
||||
class TwoFactorException(GithubException):
|
||||
"""
|
||||
Exception raised when Github requires a onetime password for two-factor authentication
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user