All Projects → bwmarrin → Go Alone

bwmarrin / Go Alone

Licence: bsd-2-clause
A simple to use, high-performance, Go (golang) MAC signer.

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to Go Alone

Access
Ponzu Addon to manage API access grants and tokens for authentication
Stars: ✭ 13 (-84.15%)
Mutual labels:  authentication, jwt, token
Jwt
Go JWT signing, verifying and validating
Stars: ✭ 394 (+380.49%)
Mutual labels:  jwt, signing, hmac
Paseto
Java Implementation of Platform-Agnostic Security Tokens - https://paseto.io
Stars: ✭ 32 (-60.98%)
Mutual labels:  authentication, jwt, token
Paseto
Platform-Agnostic Security Tokens implementation in GO (Golang)
Stars: ✭ 461 (+462.2%)
Mutual labels:  authentication, jwt, token
Express Mongodb Rest Api Boilerplate
A boilerplate for Node.js apps / Rest API / Authentication from scratch - express, mongodb (mongoose).
Stars: ✭ 153 (+86.59%)
Mutual labels:  authentication, jwt, token
Django Graphql Jwt
JSON Web Token (JWT) authentication for Graphene Django
Stars: ✭ 649 (+691.46%)
Mutual labels:  authentication, jwt, token
Emqx Auth Jwt
EMQ X JWT Authentication Plugin
Stars: ✭ 26 (-68.29%)
Mutual labels:  authentication, jwt
Devise Jwt
JWT token authentication with devise and rails
Stars: ✭ 881 (+974.39%)
Mutual labels:  authentication, jwt
Php Storageless Sessions
Sessions handler which stores session data in HMAC-signed and encrypted cookies
Stars: ✭ 29 (-64.63%)
Mutual labels:  jwt, hmac
Authentication Server
A simple authentication service to deliver JWT with Hasura claims, based on users with multiples roles stored in a Postgres database.
Stars: ✭ 48 (-41.46%)
Mutual labels:  authentication, jwt
Fastify Esso
The easiest authentication plugin for Fastify, with built-in support for Single sign-on
Stars: ✭ 20 (-75.61%)
Mutual labels:  authentication, jwt
Bottle Jwt
JWT Authentication Plugin for bottle.py applications.
Stars: ✭ 30 (-63.41%)
Mutual labels:  authentication, jwt
Vouch Proxy
an SSO and OAuth / OIDC login solution for Nginx using the auth_request module
Stars: ✭ 1,239 (+1410.98%)
Mutual labels:  authentication, jwt
Aspnetcore.authentication.apitoken
A asp.net core webapi token authentication & generator open source library.
Stars: ✭ 26 (-68.29%)
Mutual labels:  authentication, token
Hapi Auth Keycloak
JSON Web Token based Authentication powered by Keycloak
Stars: ✭ 29 (-64.63%)
Mutual labels:  authentication, jwt
Jose
JSON Object Signing and Encryption for Node.js and the browser
Stars: ✭ 25 (-69.51%)
Mutual labels:  jwt, signing
Flask Restful Authentication
An example for RESTful authentication using nginx, uWSGI, Flask, MongoDB and JSON Web Token(JWT).
Stars: ✭ 63 (-23.17%)
Mutual labels:  authentication, jwt
Ldap Jwt
Lightweight node.js based web service that provides user authentication against LDAP server (Active Directory / Windows network) credentials and returns a JSON Web Token.
Stars: ✭ 58 (-29.27%)
Mutual labels:  authentication, jwt
Grpc Auth Example
Examples of client authentication with gRPC
Stars: ✭ 65 (-20.73%)
Mutual labels:  authentication, jwt
Authex
Authex is an opinionated JWT authentication and authorization library for Elixir.
Stars: ✭ 73 (-10.98%)
Mutual labels:  authentication, jwt

It's dangerous to go-alone! Take this.

GoDoc Go report Build Status Coverage Discord Gophers

go-alone is a Go package that provides

  • Methods to create and verify MAC signatures of data
  • Ability to add timestamps to signed tokens and use custom epoch if needed.
  • BLAKE2b signatures and Base58 time encoding provides outstanding performance and security.
  • A very simple to use API with good documentation and 100% test coverage.
  • Various helper methods for parsing tokens

For more information, please read the wiki

For help with this package or general Go discussion, please join the Discord Gophers chat server.

For a fast and easy to use snowflake ID library, check out this

Getting Started

This assumes you already have a working Go environment, if not please see this page first.

Installing

go get github.com/bwmarrin/go-alone

Usage

Here's a basic example below. There is also an example program in the example folder that demonstrates a few more ways of using Go-Alone. You can read the API documentation on GoDoc.

package main

import (
	"github.com/bwmarrin/go-alone"
)

func main() {

	// This secret is used as the hash key for the signer.
	var secret = []byte("It's a secret to everybody")

	// This data is what we will be signing below.
	var data = []byte("It's dangerous to go alone! Take this.")

	// Create a new Signer using our secret
	s := goalone.New(secret)

	// Sign and return a token in the form of `data.signature`
	token := s.Sign(data)

	// Unsign the token to verify it - if successful the data portion of the
	// token is returned.  If unsuccessful then d will be nil, and an error
	// is returned.
	d, err := s.Unsign(token)
	if err != nil {
		// signature is not valid. Token was tampered with, forged, or maybe it's
		// not even a token at all! Either way, it's not safe to use it.
	} else {
		// signature is valid, it is safe to use the data
		println(string(d))
	}
}

Performance / Testing

To run the tests and benchmarks, use the following command.

go test -bench=. -v
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].