1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-23 04:47:02 +00:00

add an example for sessions + view data as requested

This commit is contained in:
Gerasimos (Makis) Maropoulos
2020-11-02 18:46:38 +02:00
parent f1ebddb6d9
commit ed38047385
9 changed files with 241 additions and 12 deletions

View File

@@ -1,7 +1,6 @@
package main
import (
"context"
"time"
"github.com/kataras/iris/v12"
@@ -62,14 +61,6 @@ func main() {
app.Listen(":8080")
}
// generateID optionally to set the value for `jwt.ID` on Sign,
// which sets the standard claims value "jti".
// If you use a blocklist with the default Blocklist.GetKey you have to set it.
var generateID = func(*context.Context) string {
id, _ := uuid.NewRandom()
return id.String()
}
func authenticate(ctx iris.Context) {
claims := userClaims{
Username: "kataras",