MPApiKeyValidatorService

open class MPApiKeyValidatorService

Makes a request to one of our sync endpoints looking for an INVALID_API_KEY error

Author

Jose J Varó - Copyright © 2018 MapsPeople A/S. All rights reserved.

Functions

Link copied to clipboard
open fun checkAPIKeyValidity(@NonNull listener: OnResultReadyListener)
Checks if the currently set API Key set is still a valid one Note that this method should only be used if the SDK has been already initialized
open fun checkAPIKeyValidity(@NonNull apiKey: String, @NonNull listener: OnResultReadyListener)
Check if the given MapsIndoors API Key is a valid one Note that the SDK doesn't need to be initialized in order to call this methodPossible callback error values:
  • null if the given api key was a valid one
  • INVALID_API_KEY if the given api key doesn't exists or did expire (case of a PoC)
  • NETWORK_ERROR if there was any network related issue when this method was invoked
  • UNKNOWN_ERROR
Link copied to clipboard
open fun checkAuthToken(@NonNull apiKey: String, @NonNull listener: OnResultReadyListener)
Check if the AuthToken set works for the given API key.
Link copied to clipboard
open fun validateAPIKeyStringFormat(@Nullable apiKey: String): Boolean
Checks that the given API Key string format is a valid one The given API Key must contain only alphanumeric characters

Properties

Link copied to clipboard
@NonNull
val REGEXP_PATTERN_SOLUTION_ALIAS_VALIDITY: Pattern