Exchange a completed SSO sign-in
curl --request POST \
--url https://api.glassmarkets.io/v1/sso/exchange/ \
--header 'Content-Type: application/json' \
--data '
{
"code": "<string>",
"exchange_verifier": "<string>"
}
'import requests
url = "https://api.glassmarkets.io/v1/sso/exchange/"
payload = {
"code": "<string>",
"exchange_verifier": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({code: '<string>', exchange_verifier: '<string>'})
};
fetch('https://api.glassmarkets.io/v1/sso/exchange/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"user": {
"username": "<string>",
"first_name": "<string>",
"id": 123,
"last_name": "<string>",
"email": "jsmith@example.com",
"is_staff": true
},
"expiry": "2023-11-07T05:31:56Z",
"token": "<string>",
"csrf_token": "<string>"
}Authentication
Exchange a completed SSO sign-in
Exchanges the one-time code from a completed SSO sign-in for a session. The session is set as an HttpOnly browser cookie, so this endpoint needs a trusted browser origin.
Exchange a completed SSO sign-in
curl --request POST \
--url https://api.glassmarkets.io/v1/sso/exchange/ \
--header 'Content-Type: application/json' \
--data '
{
"code": "<string>",
"exchange_verifier": "<string>"
}
'import requests
url = "https://api.glassmarkets.io/v1/sso/exchange/"
payload = {
"code": "<string>",
"exchange_verifier": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({code: '<string>', exchange_verifier: '<string>'})
};
fetch('https://api.glassmarkets.io/v1/sso/exchange/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"user": {
"username": "<string>",
"first_name": "<string>",
"id": 123,
"last_name": "<string>",
"email": "jsmith@example.com",
"is_staff": true
},
"expiry": "2023-11-07T05:31:56Z",
"token": "<string>",
"csrf_token": "<string>"
}
