Skip to main content

Authentication

Project description

Open Kage's useful Auth methods But, this is develope version. So, suddenly it will be big change when I got some more good idea.

Install

pip3 install kAuth

Custom Dictionary Class

Contents

  1. Added New commands

    1. is_right_password() : Check requirements in the password string
    2. gen_random() : Generate random password
    3. enc_passwd() : Encript password
    4. dec_passwd() : decript password
    5. is_right_email() : check right email format
    6. is_right_domain() : check right domain (not yet)
    7. update_password_to_system() : update password to Linux system
    8. check_password_to_system() : check username and password from the linux system
    9. read_otp_key_from_user_account() :
    10. send_otp_to_email() : Send my opt number to email
    11. verify_otp() : Verify OTP number
  2. requirements requirement package names are crypt, pyotp, pyqrcode, kmisc

  3. Initialize Auth method

import kAuth 
  1. is_right_password() : Check right password or not
  • default check everything
  • RL=True/False : Check Low characters
  • RC=True/False : Check Capital characters
  • RI=True/False : Check Integer (0-9)
  • RS=True/False : Check Symbols
  • LN=8 : Password length (default 8)
>>> password='Test Password'
>>> rt=is_right_password(password,RI=False,RS=False)
    if rt[0]:
        print('right format')
    else:
        print(rt[1])
  1. gen_random() : generate random string
  • req=[,,] : requirements
    • 'str' : Strings (Capital and Lower)
    • 'lower' : lower strings
    • 'captial' : Capital strings
    • 'int' : integer (0-9)
    • 'sym' : symbols
  • length : make a string length (default 8)
>>> print(gen_random(req=['lower','int'],length=12))
'h06ypaeay1mn'

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kAuth-1.0.3.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

kAuth-1.0.3-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file kAuth-1.0.3.tar.gz.

File metadata

  • Download URL: kAuth-1.0.3.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.10

File hashes

Hashes for kAuth-1.0.3.tar.gz
Algorithm Hash digest
SHA256 1179292421b3a643b50645f933d5f9fe8c803e29717378ad489797c095f8b979
MD5 5748ebc9d6b722f127f3ece6d0710718
BLAKE2b-256 6d9415cdd3b13181facf860d3a10c7d65910fb9d923017825aa8db61b64ed1c8

See more details on using hashes here.

Provenance

File details

Details for the file kAuth-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: kAuth-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 3.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.10

File hashes

Hashes for kAuth-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 2f45ea6eebc98ed880e4115fef30a9d3032468b186d69af274bf00e3f8405dc0
MD5 0803447ac740cf76bf23f2fbc69a5401
BLAKE2b-256 99e15b259edfb562af3e1e9ad4e68c0f522695c0536791500103f494fa88fa83

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page