Giter Club home page Giter Club logo

authspire-php's Introduction


AuthSpire
AuthSpire

A FREE and secure licensing & authentication solution
using hybrid encryption.

Key FeaturesHow To UseAPI Functions

Key Features

  • License your software / application
    • Restrict access from other users and increase security
  • Manage Users
    • See who uses your application, set expiry dates for your licenses & more
  • Variables
    • Set custom hidden variables that are secured on our server and can not be cracked
  • Blacklists
    • Block users by IP or a Unique Identifier from accessing your application
  • Logging
    • Handle all logs and see what is happening inside of your application
  • Hybrid Encryption System
    • Encryption combined using AES 256 (Advanced Encryption Standard) and RSA to ensure the most security

How To Use

This piece of code uses phpseclib. The installation steps can be found on their page.

Create an account on the AuthSpire website. Create your application.

Name: Name of your application in the dashboard
UserID: UserID found in your account page
Secret: Secret of your application in the dashboard
Version: Version 1.0 by default (for updates change the version accordingly)
Public Key: Public Key for encryption found in the dashboard

<?php
  $app_name = "";     // Name of your application found in the dashboard
  $userid = "";      // ixwupMLC Your userid can be found in your account settings.
  $secret = ""; // Application secret found in the dashboard
  $currentVersion = "1.0"; // Current application version.
  $publicKey = ""; // Your public key for encryption.
?>

Functions

Initializing your application

Before using any other functions it is necessary to initialize your application with our server and retrieve all data. This can be done by calling this method in your main index.php file.

<?php
error_reporting(0);

include 'authspire.php';
include 'details.php';

session_start();

$authSpireAPI = new authSpire\api($app_name, $userid, $secret, $currentVersion, $publicKey);


if(!$_SESSION['initialized'])
{
  $authSpireAPI->init();
}

?>

Register a user

To register and add a new user to your application you will first require a valid license key which you can generate in your authspire dashboard in your selected application.

Register a user by calling this method and validate the registration

$authSpireAPI->register("username", "password", "license", "email");

Authenticate a user

To login and add retrieve all user data you can call this method

$authSpireAPI->login("username", "password");

Adding logs

Sometimes it is necessary to have an overview of what is going on inside your application. For that you can use logs

To add a log you can call this method.

$authSpireAPI->add_log("username", "action");

Getting Variables

You can store server-sided strings. Your application can then retrieve these strings with a secret key that will be generated in your panel when you generate your variable. This protects your strings from being decompiled or cracked.

$authSpireAPI->get_variable("secret");

Authenticate with only a license

Sometimes you want to keep it simple. A user can register/login with only using a license. For this you can use this function

$authSpireAPI->license("license");

License

MIT

authspire-php's People

Contributors

authspire avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.