|
Ditto 4.13.1
|
Represents a string-based authentication provider identifier used for login with Ditto. More...
Public Member Functions | |
| DittoAuthenticationProvider (string rawValue) | |
| Initializes a new instance of the DittoAuthenticationProvider struct given the provider string value. | |
| override string | ToString () |
| bool | Equals (DittoAuthenticationProvider other) |
| override bool | Equals (object obj) |
| override int | GetHashCode () |
Static Public Member Functions | |
| static DittoAuthenticationProvider | Custom (string rawValue) |
| Creates a custom authentication provider using the given raw string value. | |
| static implicit | operator string (DittoAuthenticationProvider provider) |
| static bool | operator== (DittoAuthenticationProvider left, DittoAuthenticationProvider right) |
| static bool | operator!= (DittoAuthenticationProvider left, DittoAuthenticationProvider right) |
Properties | |
| static DittoAuthenticationProvider | Development [get] |
| Gets the built-in development authentication provider to be used together with development authentication tokens. | |
| string | RawValue [get] |
| Gets the raw string value representing the authentication provider. | |
Represents a string-based authentication provider identifier used for login with Ditto.
This struct defines built-in providers such as Development, and also allows defining custom providers by passing an arbitrary string to Custom(string) or by using the constructor.
Important: This API is in preview and provides a type-safe struct for specifying authentication providers, using the extensible-enum pattern. Supports both built-in and custom providers in a consistent and ergonomic way in v5.
Custom providers can be defined as follows:
|
inline |
Initializes a new instance of the DittoAuthenticationProvider struct given the provider string value.
| rawValue | The provider string used in authentication requests. |
| ArgumentNullException | Thrown if rawValue is null. |
| ArgumentException | Thrown if rawValue is empty or contains only whitespace. |
|
static |
Creates a custom authentication provider using the given raw string value.
| rawValue | The string identifier for the custom provider. |