+4
-5
appview/oauth/oauth.go
+4
-5
appview/oauth/oauth.go
···
164
}
165
166
func (o *OAuth) GetUser(r *http.Request) *User {
167
-
sess, err := o.SessStore.Get(r, SessionName)
168
-
169
-
if err != nil || sess.IsNew {
170
return nil
171
}
172
173
return &User{
174
-
Did: sess.Values[SessionDid].(string),
175
-
Pds: sess.Values[SessionPds].(string),
176
}
177
}
178