diff options
| author | Simeon Simeonov | 2022-03-31 07:21:33 +0200 |
|---|---|---|
| committer | Simeon Simeonov | 2022-03-31 07:21:33 +0200 |
| commit | 4ea3c077bd4111960af1b93195cb25bfb1d6edce (patch) | |
| tree | 9ed0b8fdb4398cf79a8ecc3ab39ade2d374eb65c /otp2289/__init__.py | |
| parent | f19fde48c6b3f65c164c931286e72a0d254c1fb3 (diff) | |
Restructure the project in order to replace distutils with setuptoolsv1.1.0
Diffstat (limited to 'otp2289/__init__.py')
| -rw-r--r-- | otp2289/__init__.py | 68 |
1 files changed, 0 insertions, 68 deletions
diff --git a/otp2289/__init__.py b/otp2289/__init__.py deleted file mode 100644 index 59694a7..0000000 --- a/otp2289/__init__.py +++ /dev/null | |||
| @@ -1,68 +0,0 @@ | |||
| 1 | # -*- coding: utf-8 -*- | ||
| 2 | # SPDX-License-Identifier: BSD-2-Clause-FreeBSD | ||
| 3 | # | ||
| 4 | # Copyright (c) 2020-2022 Simeon Simeonov | ||
| 5 | # All rights reserved. | ||
| 6 | # | ||
| 7 | # Redistribution and use in source and binary forms, with or without | ||
| 8 | # modification, are permitted provided that the following conditions | ||
| 9 | # are met: | ||
| 10 | # 1. Redistributions of source code must retain the above copyright | ||
| 11 | # notice, this list of conditions and the following disclaimer. | ||
| 12 | # 2. Redistributions in binary form must reproduce the above copyright notice, | ||
| 13 | # this list of conditions and the following disclaimer in the documentation | ||
| 14 | # and/or other materials provided with the distribution. | ||
| 15 | # | ||
| 16 | # THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR | ||
| 17 | # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | ||
| 18 | # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | ||
| 19 | # IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, | ||
| 20 | # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
| 21 | # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
| 22 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
| 23 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
| 24 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | ||
| 25 | # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 26 | """A pure Python implementation of RFC-2289""" | ||
| 27 | from .generator import ( | ||
| 28 | OTP_ALGO_MD5, | ||
| 29 | OTP_ALGO_SHA1, | ||
| 30 | OTPChallengeException, | ||
| 31 | OTPGenerator, | ||
| 32 | OTPGeneratorException, | ||
| 33 | ) | ||
| 34 | from .server import ( | ||
| 35 | OTPInvalidResponse, | ||
| 36 | OTPState, | ||
| 37 | OTPStateException, | ||
| 38 | OTPStore, | ||
| 39 | OTPStoreException, | ||
| 40 | ) | ||
| 41 | |||
| 42 | __author__ = 'Simeon Simeonov' | ||
| 43 | __version__ = '1.1.0' | ||
| 44 | __license__ = 'BSD 2-Clause' | ||
| 45 | |||
| 46 | |||
| 47 | def int_or_str(value): | ||
| 48 | """Returns int value of value when possible""" | ||
| 49 | try: | ||
| 50 | return int(value) | ||
| 51 | except ValueError: | ||
| 52 | return value | ||
| 53 | |||
| 54 | |||
| 55 | VERSION = tuple(map(int_or_str, __version__.split('.'))) | ||
| 56 | |||
| 57 | __all__ = [ | ||
| 58 | 'OTP_ALGO_MD5', | ||
| 59 | 'OTP_ALGO_SHA1', | ||
| 60 | 'OTPChallengeException', | ||
| 61 | 'OTPGenerator', | ||
| 62 | 'OTPGeneratorException', | ||
| 63 | 'OTPInvalidResponse', | ||
| 64 | 'OTPState', | ||
| 65 | 'OTPStateException', | ||
| 66 | 'OTPStore', | ||
| 67 | 'OTPStoreException', | ||
| 68 | ] | ||
