WebAccount
WebAccount
WebAccount
WebAccount
Class
Definition
Identifies an account from a web account provider.
public : sealed class WebAccount : IWebAccount, IWebAccount2public sealed class WebAccount : IWebAccount, IWebAccount2Public NotInheritable Class WebAccount Implements IWebAccount, IWebAccount2// You can use this class in JavaScript.
- Attributes
| Device family |
Windows 10 (introduced v10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v1)
|
Constructors
WebAccount(WebAccountProvider, String, WebAccountState) WebAccount(WebAccountProvider, String, WebAccountState) WebAccount(WebAccountProvider, String, WebAccountState) WebAccount(WebAccountProvider, String, WebAccountState)
Creates an instance of the WebAccount class.
public : WebAccount(WebAccountProvider webAccountProvider, PlatForm::String userName, WebAccountState state)public WebAccount(WebAccountProvider webAccountProvider, String userName, WebAccountState state)Public Sub New(webAccountProvider As WebAccountProvider, userName As String, state As WebAccountState)// You can use this method in JavaScript.
- webAccountProvider
- WebAccountProvider WebAccountProvider WebAccountProvider WebAccountProvider
The web account provider associated with the web account.
- userName
- PlatForm::String String String String
The user name of the web account.
The state of the web account.
Properties
Id Id Id Id
Gets the Id of the web account.
public : PlatForm::String Id { get; }public string Id { get; }Public ReadOnly Property Id As string// You can use this property in JavaScript.
- Value
- PlatForm::String string string string
The Id of the WebAccount.
Properties Properties Properties Properties
Gets the properties of the web account.
public : IMapView<string, string> Properties { get; }public IReadOnlyDictionary<string, string> Properties { get; }Public ReadOnly Property Properties As IReadOnlyDictionary<string, string>// You can use this property in JavaScript.
- Value
- IMapView<PlatForm::String, PlatForm::String> IReadOnlyDictionary<string, string> IReadOnlyDictionary<string, string> IReadOnlyDictionary<string, string>
The properties of the WebAccount.
State State State State
Gets the connected state of the web account.
public : WebAccountState State { get; }public WebAccountState State { get; }Public ReadOnly Property State As WebAccountState// You can use this property in JavaScript.
The connected state of the web account.
UserName UserName UserName UserName
Gets the username for the web account.
public : PlatForm::String UserName { get; }public string UserName { get; }Public ReadOnly Property UserName As string// You can use this property in JavaScript.
- Value
- PlatForm::String string string string
The username for the web account.
WebAccountProvider WebAccountProvider WebAccountProvider WebAccountProvider
Gets the web authentication provider for the account.
public : WebAccountProvider WebAccountProvider { get; }public WebAccountProvider WebAccountProvider { get; }Public ReadOnly Property WebAccountProvider As WebAccountProvider// You can use this property in JavaScript.
The web authentication provider for the account.
Methods
GetPictureAsync(WebAccountPictureSize) GetPictureAsync(WebAccountPictureSize) GetPictureAsync(WebAccountPictureSize) GetPictureAsync(WebAccountPictureSize)
Gets the web account's picture asynchronously.
public : IAsyncOperation<IRandomAccessStream> GetPictureAsync(WebAccountPictureSize desizedSize)public IAsyncOperation<IRandomAccessStream> GetPictureAsync(WebAccountPictureSize desizedSize)Public Function GetPictureAsync(desizedSize As WebAccountPictureSize) As IAsyncOperation( Of IRandomAccessStream )// You can use this method in JavaScript.
The desired size of the web account picture.
When this method completes, it returns the web account's picture.
SignOutAsync() SignOutAsync() SignOutAsync() SignOutAsync()
Signs the web account out asynchronously. This clears all cached tokens associated with the account, and tells the provider to invalidate any tokens associated with the account for this app.
public : IAsyncAction SignOutAsync()public IAsyncAction SignOutAsync()Public Function SignOutAsync() As IAsyncAction// You can use this method in JavaScript.
This method does not return a value.
- See Also
SignOutAsync(String) SignOutAsync(String) SignOutAsync(String) SignOutAsync(String)
Signs the web account out asynchronously. This clears all cached tokens associated with the account, and tells the provider to invalidate any tokens associated with the account for this app.
public : IAsyncAction SignOutAsync(PlatForm::String clientId)public IAsyncAction SignOutAsync(String clientId)Public Function SignOutAsync(clientId As String) As IAsyncAction// You can use this method in JavaScript.
- clientId
- PlatForm::String String String String
The Id of the client.
This method does not return a value.
Remarks
This method is app-specific and applies only to a single device. It will not remove the account from Windows or sign out the account on other devices.
- See Also