2019-08-31 04:07:25 +05:00
|
|
|
import http from './http';
|
|
|
|
|
|
|
|
/* Actions */
|
|
|
|
|
2024-09-01 09:31:04 +02:00
|
|
|
const createAccessToken = (data, headers) =>
|
|
|
|
http.post('/access-tokens?withHttpOnlyToken=true', data, headers);
|
2023-10-17 19:18:19 +02:00
|
|
|
|
2023-10-19 16:05:34 +02:00
|
|
|
const exchangeForAccessTokenUsingOidc = (data, headers) =>
|
2024-09-01 09:31:04 +02:00
|
|
|
http.post('/access-tokens/exchange-using-oidc?withHttpOnlyToken=true', data, headers);
|
2019-08-31 04:07:25 +05:00
|
|
|
|
2024-09-01 09:31:04 +02:00
|
|
|
const deleteCurrentAccessToken = (headers) => http.delete('/access-tokens/me', undefined, headers);
|
2022-09-07 18:39:33 +05:00
|
|
|
|
2019-08-31 04:07:25 +05:00
|
|
|
export default {
|
|
|
|
createAccessToken,
|
2023-10-19 16:05:34 +02:00
|
|
|
exchangeForAccessTokenUsingOidc,
|
2022-09-07 18:39:33 +05:00
|
|
|
deleteCurrentAccessToken,
|
2019-08-31 04:07:25 +05:00
|
|
|
};
|