/// <summary> /// Forgets the device associated with the CognitoDevice's device key using /// an asynchronous call /// </summary> public void ForgetDeviceAsync(AsyncCallback callback = null) { ForgetDeviceRequest forgetDeviceRequest = CreateForgetDeviceRequest(); User.Provider.ForgetDeviceAsync(forgetDeviceRequest, r => { callback?.Invoke(new AsyncResult(r.Exception)); }); }
private ForgetDeviceRequest CreateForgetDeviceRequest() { if (User.SessionTokens == null || !User.SessionTokens.IsValid()) { throw new NotAuthorizedException("User is not authorized."); } var forgetDeviceRequest = new ForgetDeviceRequest() { AccessToken = User.SessionTokens.AccessToken, DeviceKey = DeviceKey }; return(forgetDeviceRequest); }
public void ForgetDeviceAsync(ForgetDeviceRequest request, AmazonServiceCallback <ForgetDeviceRequest, ForgetDeviceResponse> callback, AsyncOptions options = null) { throw new System.NotImplementedException(); }
/// <summary> /// Forgets the device associated with the CognitoDevice's device key using /// an asynchronous call /// </summary> public Task ForgetDeviceAsync() { ForgetDeviceRequest forgetDeviceRequest = CreateForgetDeviceRequest(); return(User.Provider.ForgetDeviceAsync(forgetDeviceRequest)); }