Show / Hide Table of Contents

    Class User.ApiKeyClient

    A class exposing functionality for users to manage API keys from the client. It is always scoped to a particular User and can only be accessed via ApiKeys.

    Inheritance
    Object
    User.ApiKeyClient
    Namespace: Realms.Sync
    Assembly: Realm.dll
    Syntax
    public class ApiKeyClient

    Methods

    | Improve this Doc View Source

    CreateAsync(String)

    Creates an API key that can be used to authenticate as the user.

    Declaration
    public Task<ApiKey> CreateAsync(string name)
    Parameters
    Type Name Description
    String name

    The friendly name of the key.

    Returns
    Type Description
    Task<ApiKey>

    An awaitable Task<TResult> representing the asynchronous operation. Successful completion indicates that the ApiKey has been created on the server and its Value can be used to create ApiKey(String).

    Remarks

    The value of the returned API key must be persisted at this time as this is the only time it is visible. The key is enabled when created. It can be disabled by calling DisableAsync(ObjectId).

    | Improve this Doc View Source

    DeleteAsync(ObjectId)

    Deletes an API key by id.

    Declaration
    public Task DeleteAsync(ObjectId id)
    Parameters
    Type Name Description
    MongoDB.Bson.ObjectId id

    The id of the key to delete.

    Returns
    Type Description
    Task

    An awaitable Task representing the asynchronous delete operation.

    | Improve this Doc View Source

    DisableAsync(ObjectId)

    Disables an API key by id.

    Declaration
    public Task DisableAsync(ObjectId id)
    Parameters
    Type Name Description
    MongoDB.Bson.ObjectId id

    The id of the key to disable.

    Returns
    Type Description
    Task

    An awaitable Task representing the asynchronous disable operation.

    See Also
    EnableAsync(ObjectId)
    | Improve this Doc View Source

    EnableAsync(ObjectId)

    Enables an API key by id.

    Declaration
    public Task EnableAsync(ObjectId id)
    Parameters
    Type Name Description
    MongoDB.Bson.ObjectId id

    The id of the key to enable.

    Returns
    Type Description
    Task

    An awaitable Task representing the asynchrounous enable operation.

    See Also
    DisableAsync(ObjectId)
    | Improve this Doc View Source

    FetchAllAsync()

    Fetches all API keys associated with the user.

    Declaration
    public Task<IEnumerable<ApiKey>> FetchAllAsync()
    Returns
    Type Description
    Task<IEnumerable<ApiKey>>

    An awaitable task representing the asynchronous lookup operation. Upon completion, the result contains a collection of all API keys for that user.

    | Improve this Doc View Source

    FetchAsync(ObjectId)

    Fetches a specific user API key by id.

    Declaration
    public Task<ApiKey> FetchAsync(ObjectId id)
    Parameters
    Type Name Description
    MongoDB.Bson.ObjectId id

    The id of the key to fetch.

    Returns
    Type Description
    Task<ApiKey>

    An awaitable Task<TResult> representing the asynchronous lookup operation.

    • Improve this Doc
    • View Source
    Back to top Copyright © 2020 Realm
    Generated by DocFX