AuthorizationExternalApi. iOS
Api to login to the app via external api.
Get external URL
See StaticsApi to know if you can login with external api. Use this method to get direct url.
If request was successful you'll get url to load external service. If any error would occur you would get an VMSApiError object.
getUrlForExternalLogin(completion: (String?, VMSApiError?))
Login
Login to your application.
If request was successful you'll get VMSUserResponse object. If any error would occur you would get an VMSApiError object.
If you receive 419 error, that means you need to delete session. For that repeat this request with sessionId parameter that you can take from error. See VMSApiError details for that information.
loginWithExternal(with login: VMSLoginExternalRequest, completion: (VMSUserResponse?, VMSApiError?))
VMSLoginExternalRequest
Object with needed information for external login. You need either loginKey or code to be able to login.
init(loginKey: String?, code: String?, sessionId: String?)
loginKey - login key needed to login
code - code needed to login
sessionId - session id you want to replace in case you receive 419 error. See VMSApiError for more details