Lấy phiên xác thực hiện tại
Lấy phiên xác thực hiện tại
curl --request GET \
--url https://api-gw.verolabs.co/api/authen/sessions/whoami \
--header 'X-Session-Token: <api-key>'const options = {method: 'GET', headers: {'X-Session-Token': '<api-key>'}};
fetch('https://api-gw.verolabs.co/api/authen/sessions/whoami', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api-gw.verolabs.co/api/authen/sessions/whoami"
headers = {"X-Session-Token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api-gw.verolabs.co/api/authen/sessions/whoami"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Session-Token", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}using RestSharp;
var options = new RestClientOptions("https://api-gw.verolabs.co/api/authen/sessions/whoami");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("X-Session-Token", "<api-key>");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);
falseCURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_WRITEDATA, stdout);
curl_easy_setopt(hnd, CURLOPT_URL, "https://api-gw.verolabs.co/api/authen/sessions/whoami");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "X-Session-Token: <api-key>");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);{
"id": "<string>",
"active": true,
"identity": {
"id": "<string>",
"traits": {},
"schema_id": "<string>",
"schema_url": "<string>",
"state": "<string>",
"state_changed_at": "2023-11-07T05:31:56Z",
"recovery_addresses": [
{}
],
"metadata_public": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"organization_id": "<string>"
},
"tokenized": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"authenticated_at": "2023-11-07T05:31:56Z",
"authenticator_assurance_level": "<string>",
"authentication_methods": [
{
"method": "<string>",
"aal": "<string>",
"completed_at": "2023-11-07T05:31:56Z"
}
],
"issued_at": "2023-11-07T05:31:56Z",
"devices": [
{
"id": "<string>",
"ip_address": "<string>",
"user_agent": "<string>",
"location": "<string>"
}
]
}{
"error": "<string>",
"message": "<string>",
"detail": "<string>",
"details": "<string>",
"status": 123
}{
"error": "<string>",
"message": "<string>",
"detail": "<string>",
"details": "<string>",
"status": 123
}{
"error": "<string>",
"message": "<string>",
"detail": "<string>",
"details": "<string>",
"status": 123
}{
"error": "<string>",
"message": "<string>",
"detail": "<string>",
"details": "<string>",
"status": 123
}{
"error": "<string>",
"message": "<string>",
"detail": "<string>",
"details": "<string>",
"status": 123
}Ủy quyền
Session token returned by authentication flows.
Tham số truy vấn
Ten tokenizer template de yeu cau response dang tokenized (JWT). Template hien tai tren moi truong nay la jwt_template_1. Khi truyen gia tri nay, response se kem bearer token (JWT) trong field tokenized.
"jwt_template_1"
Phản hồi
Current session.
session tra ve boi whoami va login response.
Ma session.
Cho biet session hien co dang active hay khong.
identity da dang nhap, gom id, schema metadata, state, traits, recovery addresses va timestamps.
Hide child attributes
Hide child attributes
Ma identity cua user da dang nhap.
Thuoc tinh ho so identity luu tren he thong, vi du email va name.
Ma identity schema.
URL cua identity schema.
Trang thai identity, vi du active.
Thoi diem trang thai identity thay doi lan cuoi.
Danh sach recovery address cau hinh tren identity.
Metadata public cua identity do he thong tra ve; co the null.
Thoi diem tao identity.
Thoi diem cap nhat identity.
Ma organization neu identity thuoc organization; null neu khong co.
Bearer token tra ve khi truyen tokenize_as va tra tokenized session.
Thoi diem session het han.
Thoi diem user xac thuc cho session nay.
Muc dam bao xac thuc cua session, vi du aal1.
Cac phuong thuc xac thuc da hoan tat cho session.
Thoi diem he thong phat hanh session.
Metadata thiet bi/session do he thong tra ve, gom device id, IP address, user agent va location.
curl --request GET \
--url https://api-gw.verolabs.co/api/authen/sessions/whoami \
--header 'X-Session-Token: <api-key>'const options = {method: 'GET', headers: {'X-Session-Token': '<api-key>'}};
fetch('https://api-gw.verolabs.co/api/authen/sessions/whoami', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api-gw.verolabs.co/api/authen/sessions/whoami"
headers = {"X-Session-Token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api-gw.verolabs.co/api/authen/sessions/whoami"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Session-Token", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}using RestSharp;
var options = new RestClientOptions("https://api-gw.verolabs.co/api/authen/sessions/whoami");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("X-Session-Token", "<api-key>");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);
falseCURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_WRITEDATA, stdout);
curl_easy_setopt(hnd, CURLOPT_URL, "https://api-gw.verolabs.co/api/authen/sessions/whoami");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "X-Session-Token: <api-key>");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);{
"id": "<string>",
"active": true,
"identity": {
"id": "<string>",
"traits": {},
"schema_id": "<string>",
"schema_url": "<string>",
"state": "<string>",
"state_changed_at": "2023-11-07T05:31:56Z",
"recovery_addresses": [
{}
],
"metadata_public": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"organization_id": "<string>"
},
"tokenized": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"authenticated_at": "2023-11-07T05:31:56Z",
"authenticator_assurance_level": "<string>",
"authentication_methods": [
{
"method": "<string>",
"aal": "<string>",
"completed_at": "2023-11-07T05:31:56Z"
}
],
"issued_at": "2023-11-07T05:31:56Z",
"devices": [
{
"id": "<string>",
"ip_address": "<string>",
"user_agent": "<string>",
"location": "<string>"
}
]
}{
"error": "<string>",
"message": "<string>",
"detail": "<string>",
"details": "<string>",
"status": 123
}{
"error": "<string>",
"message": "<string>",
"detail": "<string>",
"details": "<string>",
"status": 123
}{
"error": "<string>",
"message": "<string>",
"detail": "<string>",
"details": "<string>",
"status": 123
}{
"error": "<string>",
"message": "<string>",
"detail": "<string>",
"details": "<string>",
"status": 123
}{
"error": "<string>",
"message": "<string>",
"detail": "<string>",
"details": "<string>",
"status": 123
}
