(ctx context.Context, userCode string)
| 863 | } |
| 864 | |
| 865 | func (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 | |
| 877 | func (s *Storage) CompleteDeviceAuthorization(ctx context.Context, userCode, subject string) error { |
| 878 | s.lock.Lock() |
nothing calls this directly
no outgoing calls
no test coverage detected