MCPcopy Create free account
hub / github.com/zitadel/oidc / GetDeviceAuthorizationByUserCode

Method GetDeviceAuthorizationByUserCode

example/server/storage/storage.go:865–875  ·  view source on GitHub ↗
(ctx context.Context, userCode string)

Source from the content-addressed store, hash-verified

863}
864
865func (s *Storage) GetDeviceAuthorizationByUserCode(ctx context.Context, userCode string) (*op.DeviceAuthorizationState, error) {
866 s.lock.Lock()
867 defer s.lock.Unlock()
868
869 entry, ok := s.deviceCodes[s.userCodes[userCode]]
870 if !ok {
871 return nil, errors.New("user code not found")
872 }
873
874 return entry.state, nil
875}
876
877func (s *Storage) CompleteDeviceAuthorization(ctx context.Context, userCode, subject string) error {
878 s.lock.Lock()

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

no outgoing calls

Tested by

no test coverage detected