mirror of
https://github.com/zitadel/oidc.git
synced 2026-05-03 08:31:00 -05:00
feat: generic Userinfo and Introspect functions (#389)
BREAKING CHANGE: rp.Userinfo and rs.Introspect now require a type parameter.
This commit is contained in:
@@ -48,7 +48,7 @@ func main() {
|
||||
if !ok {
|
||||
return
|
||||
}
|
||||
resp, err := rs.Introspect(r.Context(), provider, token)
|
||||
resp, err := rs.Introspect[*oidc.IntrospectionResponse](r.Context(), provider, token)
|
||||
if err != nil {
|
||||
http.Error(w, err.Error(), http.StatusForbidden)
|
||||
return
|
||||
@@ -69,7 +69,7 @@ func main() {
|
||||
if !ok {
|
||||
return
|
||||
}
|
||||
resp, err := rs.Introspect(r.Context(), provider, token)
|
||||
resp, err := rs.Introspect[*oidc.IntrospectionResponse](r.Context(), provider, token)
|
||||
if err != nil {
|
||||
http.Error(w, err.Error(), http.StatusForbidden)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user