public void SignInDeviceWithUserCode(string userCode) { OAuth2Application app = _apps.Values.FirstOrDefault(x => x.OwnsDeviceCodeGrant(userCode)); if (app is null) { throw new Exception($"Unknown user code '{userCode}'"); } app.ApproveDeviceCodeGrant(userCode); }
public void RegisterApplication(OAuth2Application application) { _apps[application.Id] = application; }