Dangl.RestClient

    Build Status

    Changelog
    Online Documentation

    This project provides DanglHttpClient to easily interact with all Dangl web services.

    ITokenHandler

    The ITokenHandler is an interface that be be used to support the automatic obtaining of Tokens and refreshing them. It can be configured to support either of the functionalities or none at all. If none is supplied, by default a NoOpTokenHandler is used that does not perform any operations.

    It can be used, for example, in server backends that use the ClientCredentials grant.

    ITokenStorage

    The ITokenStorage is an interface that is used to store and persist tokens, e.g. it could use the local app storage on a mobile app or the database in a server application. It is used so that only tokens and not the full user credentials need to be stored. By default, there's an InMemoryTokenStorage for non-persisting use available.

    Dangl.RestClient.Identity.Server

    The Dangl.RestClient.Identity.Server package contains a DanglIdentityServerTokenHandler which can be used in server-side applications that want to authenticate with ClientCredentials grant against Dangl.Identity.

    It works based on the passed-in ITokenStorage and is safe to use as a singleton throughout the app lifetime.

    Dangl.RestClient.Identity.App

    The Dangl.RestClient.Identity.App package contains a DanglIdentityAppTokenHandler which can be used in client-side applications, meaning applications that are distributed to clients. It offers functionality to integrate with web apps that make use of the Dangl.Identity.OAuth package to delegate login to Dangl.Identity.

    It works based on the passed-in ITokenStorage and is safe to use as a singleton throughout the app lifetime.

    While it is possible to instantiate this with username / email and password, it is advised that this is not done. A typical workflow in an app should be:

    1. On the login screen, ask the user to provide his credentials
    2. Perform a token-based authentication with the Dangl.Identity.Client.App package and store the token in the used ITokenStore instance.
    3. Let the DanglIdentityAppTokenHandler handle only token refresh.
    • Improve this Doc
    Back to top © Dangl IT - Georg Dangl