DITAuthenticator
@interface DITAuthenticator : NSObject
Log in to a remote authentication service, using an Online
identity.
-
Log in to Ditto with a third-party token.
Declaration
Objective-C
- (void)loginWithToken:(nonnull NSString *)token provider:(nullable NSString *)provider completion:(nonnull void (^)(NSError *_Nullable))completion;
Parameters
token
the authentication token required to log in.
provider
the name of the authentication provider.
completion
a block that will get called when the login attempt has completed.
-
Log in to Ditto with a username and password.
Declaration
Objective-C
- (void)loginWithUsername:(nonnull NSString *)username password:(nonnull NSString *)password provider:(nullable NSString *)provider completion:(nonnull void (^)(NSError *_Nullable))completion;
Parameters
username
the username component of the credentials used for log in.
password
the password component of the credentials used for log in.
provider
the name of the authentication provider.
completion
a block that will get called when the login attempt has completed.