Skip to content

dekusms/Deku-Verify-Plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deku Verify Plugin

Afkanerd Deku verification plugin

Installation

Please make sure you have Python 3.7 or newer (python --version).

Create a Virtual Environments

$ python3 -m venv venv
$ . venv/bin/activate

PyPI

$ pip install --upgrade pip wheel
$ pip install "git+https://github.com/Afkanerd/Deku-Verify-Plugin.git@main#egg=DekuVerify"

Install upgrades

$ pip install --force-reinstall "git+https://github.com/Afkanerd/Deku-Verify-Plugin.git@main#egg=DekuVerify"

From source

$ git clone https://github.com/Afkanerd/Deku-Verify-Plugin.git
$ cd Deku-Verify-Plugin
$ python3 setup.py install

Usage

Table of Content


  1. Create Method
  2. Check Method
  3. Cancel Method

Create

from DekuVerify import Verification, MySQL

try:
    db_config = MySQL(
        database="",
        user="",
        host="",
        password="",
    )

    verify = Verification(database_params=db_config)

    result = verify.create(identifier="")

except Exception as error:
    # Handle exception here ...

response

{ "code": "", "sid": "", "identifier": "", "expires": "", "status": "" }

Check

from DekuVerify import Verification, MySQL

try:
    db_config = MySQL(
        database="",
        user="",
        host="",
        password="",
    )

    verify = Verification(database_params=db_config)

    result = verify.check(code="", identifier="")

except Exception as error:
    # Handle exception here ...

response

{ "status": "", "sid": "", "identifier": "", "expires": "" }

Cancel

from DekuVerify import Verification, MySQL

try:
    db_config = MySQL(
        database="",
        user="",
        host="",
        password="",
    )

    verify = Verification(database_params=db_config)

    result = verify.cancel(sid)

except Exception as error:
    # Handle exception here ...

response

bool

Exceptions

  • SessionNotFound: Exception raised when a verification session is not found.

    return: String

  • IncorrectCode: Exception raised when a given verification code is incorrect

    return: String

  • InvalidIdentifier: Exception raised when a given identifier is incorrect the mapped session

    return: String

Licensing

This project is licensed under the GNU General Public License v3.0.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published