Key Features • How To Use • API Functions •
- 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
NOTE: The HWID implementation is not safe to use since it can be easily manipulated. We recommend using your own way of getting the users unique ID!
Create an account on the AuthSpire website. Create your application.
Install Go Windows - Linux
Install repository and drag to Desktop for example
Open with your IDE
Change information in main.go to your details
Open terminal and navigate to the project folder
Use go run . or go run main.go to run the project
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
main.go file
// replace with your details!
var name = ""
var userid = ""
var secret = ""
var currentVersion = "1.0"
var publicKey = ""
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.
func main() {
authspire.API(name, userid, secret, currentVersion, publicKey) // IMPORTANT FOR API TO WORK
authspire.InitApp()
}
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
registered := authspire.Register(username, password, license, email)
if registered {
fmt.Println("Thanks for registering!")
}
Authenticate a user
To login and add retrieve all user data you can call this method
loggedIn := authspire.Login(username, password)
if loggedIn {
fmt.Println("Welcome back " + authspire.User.Username)
fmt.Println()
fmt.Println(authspire.User.Email)
fmt.Println(authspire.User.IP)
fmt.Println(authspire.User.Expires)
fmt.Println(authspire.User.HWID)
fmt.Println(authspire.User.Last_Login)
fmt.Println(authspire.User.Created_At)
fmt.Println(authspire.User.Variable)
fmt.Println(authspire.User.Level)
}
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.
authspire.AddLog(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.
authspire.GetVariable(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
if authspire.License(license) {
fmt.Println("Welcome back " + authspire.User.Username)
fmt.Println()
fmt.Println(authspire.User.Email)
fmt.Println(authspire.User.IP)
fmt.Println(authspire.User.Expires)
fmt.Println(authspire.User.HWID)
fmt.Println(authspire.User.Last_Login)
fmt.Println(authspire.User.Created_At)
fmt.Println(authspire.User.Variable)
fmt.Println(authspire.User.Level)
}
MIT