Skip to main content

Validate User

To validate user's app session

Steps to validate user

  1. Create a ValidateUserRequest object using ValidateUserRequest.builder() class by passing all the required parameters.
  2. Call validateUser() function using the instance of LMFeedClient.
  3. Process the response LMResponse<ValidateUserResponse> as per your requirement.
// object of InitiateUserRequest
let request = ValidateUserRequest.builder()
.accessToken(accessToken)
.refreshToken(refreshToken)
.build()

LMFeedClient.shared.validateUser(request) { response in
// Response (LMResponse<ValidateUserResponse>)
if (response.success) {
// your function to process the response data
processResponse(response.data)
} else {
// your function to process error message
processError(response.errorMessage)
}
}

Models

ValidateUserRequest

VARIABLETYPEDESCRIPTIONOPTIONAL
accessTokenStringThe user's access tokenYes
refreshTokenStringThe user's refresh tokenYes

ValidateUserResponse

PropertyTypeDescriptionOptional
userUserThe validated user's information
appAccessBoolWhether the user has access to the app