Protocols

The following protocols are available globally.

  • OpenID config that can be fetched/refreshed from somewhere, like a local .plist or a .json response of OpenID Discovery.

    See more
  • Something providing MMMothClient with the current time and its scale. Handy for testing.

    See more
  • Allows to override how MMMothClient makes network calls. Used mainly for testing.

    See more
  • Something that can locally store credentials obtained by MMMothClient. Allows to customize where and how they are stored, e.g. user defaults or keychain.

    Assuming for simplicity that there is only one set of credentials per client identifier. This is a fair assumption to hold in a native app:

    1. Client identifiers for different authorization servers are usually different.
    2. Native apps usually work with a single set of scopes and response types.

    Event if one bumps into the limitation of this assumption, then it should not be hard to implement a custom store providing it with extra keys to separate the credentials.

    See more