SignOutUserOperation
SignOutUserOperation
SignOutUserOperation
SignOutUserOperation
Class
Definition
Allows users to sign out of your app.
Note
If you are developing for Windows 10 or greater, use the Windows.Security.Authentication.Web.Core APIs instead. For more information, see Web account manager.
public : sealed class SignOutUserOperation : IAsyncAction, IAsyncInfopublic sealed class SignOutUserOperation : IAsyncAction, IAsyncInfoPublic NotInheritable Class SignOutUserOperation Implements IAsyncAction, IAsyncInfo// You can use this class in JavaScript.
- Attributes
| Device family |
Windows 10 (introduced v10.0.10240.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v1)
|
Examples
This example shows how to sign out of an app.
function signOut() {
if (sdkSample.canSignOut) {
sdkSample.displayStatus("Signing out...");
authenticator.signOutUserAsync().done(function () {
sdkSample.accessToken = null;
sdkSample.authenticatedSafeCustomerId = "";
sdkSample.isSignedIn = false;
sdkSample.displayStatus("Signed out.");
},
function (status) {
if (status && (status.name !== "Canceled")) {
showErrorMessage("Sign out action failed: " + status.message);
} else {
sdkSample.displayStatus("");
}
});
}
}
Properties
Completed Completed Completed Completed
Gets or sets a handler that is called when the operation completes.
Note
If you are developing for Windows 10 or greater, use the Windows.Security.Authentication.Web.Core APIs instead. For more information, see Web account manager.
public : AsyncActionCompletedHandler Completed { get; set; }public AsyncActionCompletedHandler Completed { get; set; }Public ReadWrite Property Completed As AsyncActionCompletedHandler// You can use this property in JavaScript.
- Value
- AsyncActionCompletedHandler AsyncActionCompletedHandler AsyncActionCompletedHandler AsyncActionCompletedHandler
A method or function that is called when the operation completes.
ErrorCode ErrorCode ErrorCode ErrorCode
Gets the error code should the operation fail.
Note
If you are developing for Windows 10 or greater, use the Windows.Security.Authentication.Web.Core APIs instead. For more information, see Web account manager.
public : HResult ErrorCode { get; }public Exception ErrorCode { get; }Public ReadOnly Property ErrorCode As Exception// You can use this property in JavaScript.
- Value
- HResult Exception Exception Exception
The structure that contains the error code.
Id Id Id Id
Gets a unique identifier that represents the operation.
Note
If you are developing for Windows 10 or greater, use the Windows.Security.Authentication.Web.Core APIs instead. For more information, see Web account manager.
public : unsigned int Id { get; }public uint Id { get; }Public ReadOnly Property Id As uint// You can use this property in JavaScript.
- Value
- unsigned int uint uint uint
The operation's unique ID as defined in the package manifest.
Status Status Status Status
Gets the current status of the operation.
Note
If you are developing for Windows 10 or greater, use the Windows.Security.Authentication.Web.Core APIs instead. For more information, see Web account manager.
public : AsyncStatus Status { get; }public AsyncStatus Status { get; }Public ReadOnly Property Status As AsyncStatus// You can use this property in JavaScript.
One of the enumeration values that indicates the status.
Methods
Cancel() Cancel() Cancel() Cancel()
Requests the cancellation of the operation.
Note
If you are developing for Windows 10 or greater, use the Windows.Security.Authentication.Web.Core APIs instead. For more information, see Web account manager.
public : void Cancel()public void Cancel()Public Function Cancel() As void// You can use this method in JavaScript.
Close() Close() Close() Close()
Requests that work associated with the operation should terminate.
Note
If you are developing for Windows 10 or greater, use the Windows.Security.Authentication.Web.Core APIs instead. For more information, see Web account manager.
public : void Close()public void Close()Public Function Close() As void// You can use this method in JavaScript.
GetResults() GetResults() GetResults() GetResults()
Returns the results of the operation. For this class, there are no results to return if the operation succeeds.
Note
If you are developing for Windows 10 or greater, use the Windows.Security.Authentication.Web.Core APIs instead. For more information, see Web account manager.
public : void GetResults()public void GetResults()Public Function GetResults() As void// You can use this method in JavaScript.