Compare commits
No commits in common. "4f3ac8362390a395676e0a3d272ed31d18783e5a" and "50041cbc397831e37701eb47a31648f221445f24" have entirely different histories.
4f3ac83623
...
50041cbc39
@ -37,17 +37,15 @@ func (c *Client) Login(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
state := uniuri.New()
|
||||
nonce := uniuri.New()
|
||||
|
||||
sess.Set(SessionOIDCStateKey, state)
|
||||
sess.Set(SessionOIDCNonceKey, nonce)
|
||||
|
||||
if err := sess.Save(w, r); err != nil {
|
||||
panic(errors.Wrap(err, "could not save session"))
|
||||
}
|
||||
|
||||
authCodeOptions := []oauth2.AuthCodeOption{}
|
||||
authCodeOptions = append(authCodeOptions, oidc.Nonce(nonce))
|
||||
|
||||
authCodeURL := c.oauth2.AuthCodeURL(
|
||||
state,
|
||||
authCodeOptions...,
|
||||
|
@ -14,7 +14,6 @@ import (
|
||||
const (
|
||||
SessionIDTokenKey = "oidc-id-token"
|
||||
SessionOIDCStateKey = "oidc-state"
|
||||
SessionOIDCNonceKey = "oidc-nonce"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user