MCPcopy
hub / github.com/zitadel/oidc / SetUserinfoFromRequest

Method SetUserinfoFromRequest

example/server/storage/storage.go:464–466  ·  view source on GitHub ↗

SetUserinfoFromRequests implements the op.CanSetUserinfoFromRequest interface. In the next major release, it will be required for op.Storage. It will be called for the creation of an id_token, so we'll just pass it to the private function without any further check

(ctx context.Context, userinfo *oidc.UserInfo, token op.IDTokenRequest, scopes []string)

Source from the content-addressed store, hash-verified

462// next major release, it will be required for op.Storage.
463// It will be called for the creation of an id_token, so we'll just pass it to the private function without any further check
464func (s *Storage) SetUserinfoFromRequest(ctx context.Context, userinfo *oidc.UserInfo, token op.IDTokenRequest, scopes []string) error {
465 return s.setUserinfo(ctx, userinfo, token.GetSubject(), token.GetClientID(), scopes)
466}
467
468// SetUserinfoFromToken implements the op.Storage interface
469// it will be called for the userinfo endpoint, so we read the token and pass the information from that to the private function

Callers

nothing calls this directly

Implementers 7

Storageexample/server/storage/storage.go
multiStorageexample/server/storage/storage_dynamic
UnimplementedServerpkg/op/server.go
LegacyServerpkg/op/server_legacy.go
Sigpkg/op/mock/authorizer.mock.impl.go
MockStoragepkg/op/mock/storage.mock.go
MockStorageMockRecorderpkg/op/mock/storage.mock.go

Calls 3

setUserinfoMethod · 0.95
GetSubjectMethod · 0.65
GetClientIDMethod · 0.65

Tested by

no test coverage detected