API Reference - pims.authentication.user-logout
Info: Stellantis Mobile SDK is not publicly available.
Component:
🔓
Authentication
PSA
Tutorial:
check-out
Authentication.
SDK Version:
v2.3
API Available since:
v2.0
API Last update:
v2.0
Plateforme Compatibility: PSA
Security:
- Authentication: Authentication is required.
Operations:
This api allows to logout.
Input Parameters Object | |||||
---|---|---|---|---|---|
Param name | Description | Type | Unit/Values | Example | Required |
action | Name of the action to perform, in this case |
String |
|
logout
|
true |
local | Define the language to use in the external user agent (web view). |
String |
en
|
false |
|
context | Context. Only for Android. |
Object |
|
context
|
true |
Output Data Object | ||||
---|---|---|---|---|
No outputted data |
Error | ||
---|---|---|
No errors |
Code Example
1
2
3
4
5
6
7
8
9
10
11
pims.set("pims.authentication.user",
mapOf( /* parameters */
Pair("action", "logout"),
Pair("local", "en"),
Pair("context", context)
)
) { message -> when (message["status"] as? String) {
"SUCCEEDED" -> { } // handle succeeded status
"FAILED" -> { } // handle failed status
} }
1
2
3
4
5
6
7
8
9
10
11
pims.set(api: "pims.authentication.user",
parameters: [
"action": "logout",
"local": "en",
"context": context
]
) { (message) in
if message["status"] == "SUCCEEDED" { } // handle succeeded status
else if message["status"] == "FAILED" { } // handle failed status
}
1
2
3
4
5
6
// representation of the `succeeded` dictionary object message as JSON
{
"transactionId": "953cfefb-bc72",
"status": "SUCCEEDED",
"result": { }
}
false