arvetoauth

command module
v0.0.0-...-b2296ca Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2020 License: BSD-3-Clause Imports: 8 Imported by: 0

README

Arveto Auth

(public package) GoDoc

Start

Start this programme with the name of the working directory.

Config

; URL of the server
url = "http://localhost:8000/"
; Listen address
listen = ":8000"

; Enable develpment mode
; ! NO USE IT IN PRODUCTION !
dev = true

[github]
; The GitHub Oauth tocken
client = ""
secret = ""

[google]
; The Google Oauth tocken
client = ""
secret = ""

[mail]
; Mail configuration
login = "auth@example.com"
password = "xxx"
host = "smtp.example.com"

JWT

You can get the RSA public key from /publickey URI.

The JWT claims:

  • id (string): an string id.
  • pseudo (string)
  • email (string): email address.
  • avatar (string): The URL of teh avatar or a default avatar.
  • level (string): The level of the user. Values are Ban < Candidate < Visitor < Std < Admin.

To auth a client, redirect it to http(s)://server/auth?app=appID&r=base64. The params r is an optionnal redirect URL encoding in URL base64. The client come back on the URI: /login?jwt=...?r=....

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

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