Compare commits
2 Commits
7974b78b66
...
1f39df281d
Author | SHA1 | Date |
---|---|---|
Tracker-Friendly | 1f39df281d | |
Tracker-Friendly | 22b50cba73 |
7
main.go
7
main.go
|
@ -728,6 +728,7 @@ func main() {
|
||||||
codemethod := c.Request.URL.Query().Get("code_challenge_method")
|
codemethod := c.Request.URL.Query().Get("code_challenge_method")
|
||||||
redirect_uri := c.Request.URL.Query().Get("redirect_uri")
|
redirect_uri := c.Request.URL.Query().Get("redirect_uri")
|
||||||
state := c.Request.URL.Query().Get("state")
|
state := c.Request.URL.Query().Get("state")
|
||||||
|
nonce := c.Request.URL.Query().Get("nonce")
|
||||||
|
|
||||||
userid, norows := get_user_from_session(secretKey)
|
userid, norows := get_user_from_session(secretKey)
|
||||||
|
|
||||||
|
@ -767,6 +768,10 @@ func main() {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if nonce == "" {
|
||||||
|
nonce = genSalt(512)
|
||||||
|
}
|
||||||
|
|
||||||
datatemplate := jwt.MapClaims{
|
datatemplate := jwt.MapClaims{
|
||||||
"sub": username,
|
"sub": username,
|
||||||
"iss": "https://auth.hectabit.org",
|
"iss": "https://auth.hectabit.org",
|
||||||
|
@ -776,7 +781,7 @@ func main() {
|
||||||
"iat": time.Now().Unix(),
|
"iat": time.Now().Unix(),
|
||||||
"auth_time": time.Now().Unix(),
|
"auth_time": time.Now().Unix(),
|
||||||
"session": secretKey,
|
"session": secretKey,
|
||||||
"nonce": genSalt(512),
|
"nonce": nonce,
|
||||||
}
|
}
|
||||||
|
|
||||||
datatemplate2 := jwt.MapClaims{
|
datatemplate2 := jwt.MapClaims{
|
||||||
|
|
Reference in New Issue