-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Write REAME.go + main.go: cd with args
- Loading branch information
1 parent
143c1e6
commit 540fedc
Showing
2 changed files
with
66 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,52 @@ | ||
# Arveto Auth | ||
|
||
A auth center server. | ||
(public package) [![GoDoc](https://godoc.org/github.com/Arveto/arvetoAuth/pkg/public?status.svg)](https://godoc.org/github.com/Arveto/arvetoAuth/pkg/public) | ||
|
||
**This packages are not stable.** | ||
## Start | ||
|
||
Start this programme with the name of the working directory. | ||
|
||
## Config | ||
|
||
```ini | ||
; 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=...`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters