NMADeregistration
@objc
public protocol NMADeregistration : NMAHttpOperation
The object that can be used to trigger an deregistration operation.
Usage example:
id<NMADeregistration> deregistration = [[client operations] deregistration];
[deregistration username:username];
[deregistration aaid:aaid];
[deregistration onSuccess:^{...}];
[deregistration onError:^(NMAOperationError * _Nonnull error) {...}];
[deregistration execute];
-
Specifies the username that must be deregistered.
Important
Providing the username is required.Declaration
Swift
@discardableResult func username(_ username: String) -> NMADeregistration
Parameters
username
the username.
Return Value
the
NMADeregistration
builder. -
Specifies the AAID of the
NMAAuthenticator
that must be deregistered.Note
If no AAID is provided then all authenticators will be deregistered.Declaration
Swift
@discardableResult func aaid(_ aaid: String) -> NMADeregistration
Parameters
aaid
the AAID of the authenticator to be deregistered.
Return Value
the
NMADeregistration
builder. -
Specifies the authorization provider to be used to deregister the authenticator.
Note
This doesn’t have to be provided on Authentication Cloud environment.
Important
In case the
NMAJwsAuthorizationProvider
is provided, the operation uses thedeviceResourcePath
endpoint.Declaration
Swift
@discardableResult func authorizationProvider(_ authorizationProvider: NMAAuthorizationProvider) -> NMADeregistration
Parameters
authorizationProvider
Return Value
the
NMADeregistration
builder. -
Specifies the block to execute if the authenticator was deleted successfully.
Important
Providing theonSuccess
block is required.Declaration
Swift
@discardableResult func onSuccess(_ onSuccess: @escaping () -> ()) -> NMADeregistration
Parameters
onSuccess
the block to execute on successful deregistration.
Return Value
the
NMADeregistration
builder. -
Specifies the block to execute if the deregistration failed.
Important
Providing theonError
block is required.Declaration
Swift
@discardableResult func onError(_ onError: @escaping (NMAOperationError) -> ()) -> NMADeregistration
Parameters
onError
the block to execute on failed deregistration, receives an
NMAOperationError
.Return Value
the
NMADeregistration
builder.