edgex-auth

module
v0.0.0-...-4168d8d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 19, 2018 License: Apache-2.0

README

Go Auth Server

go report card license

Authentication server in Go.

Install

Installing EdgeX Auth Server is trivial go get:

go get github.com/drasko/edgex-auth
cd edgex-auth/cmd
go buld -o edgex-auth
./edgex-auth
Features
  • JWT
  • User account creation
  • MongoDB persistance
  • Login
  • Access (AuthN and AuthZ) check
Usage
# Create user
curl -isS -X POST -k --cacert proxy/nginx/ssl/certs/mainflux-server.crt https://localhost/users -d '{"username":"drasko", "password":"123"}'

# Get the token
curl -isS -X POST -k --cacert proxy/nginx/ssl/certs/mainflux-server.crt https://localhost/login -d '{"username":"drasko", "password":"123"}'

# Use the token in `Authorization` header
curl -k --cacert proxy/nginx/ssl/certs/mainflux-server.crt -H "Authorization: <user_token>" https://localhost/api/hello
License

Apache License, version 2.0

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL