The equivalent of logout. This flushes any reference to a user and access token
revoke() : Call<UserInfo>
Returns
callback with user’s object
Call<Void>
Examples
Android
val authService = KarhooApi.authService
authService.revoke().execute { result ->
when (result) {
is Resource.Success -> print(result.data) // Handle data
is Resource.Failure -> print(result.error.internalMessage) //Handle errors
}
}
iOS
let authService = Karhoo.getAuthService()
authService.reovoke().execute { result in
switch result {
case .success(let _):
print("Success")
case .failure(let error):
print("error: \(error.code) \(error.message)")
}
}