Começar o login pelo SSO
curl --request POST \
--url https://control.api.niadra.com/v1/auth/sso/start \
--header 'Content-Type: application/json' \
--data '
{
"email": "nina@acme.example",
"binding": "E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM"
}
'import requests
url = "https://control.api.niadra.com/v1/auth/sso/start"
payload = {
"email": "nina@acme.example",
"binding": "E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM"
}
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({
email: 'nina@acme.example',
binding: 'E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM'
})
};
fetch('https://control.api.niadra.com/v1/auth/sso/start', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://control.api.niadra.com/v1/auth/sso/start",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'email' => 'nina@acme.example',
'binding' => 'E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://control.api.niadra.com/v1/auth/sso/start"
payload := strings.NewReader("{\n \"email\": \"nina@acme.example\",\n \"binding\": \"E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://control.api.niadra.com/v1/auth/sso/start")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"nina@acme.example\",\n \"binding\": \"E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://control.api.niadra.com/v1/auth/sso/start")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"nina@acme.example\",\n \"binding\": \"E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM\"\n}"
response = http.request(request)
puts response.read_body{
"authorize_url": "https://login.acme.example/authorize?response_type=code&client_id=niadra-console&redirect_uri=https%3A%2F%2Fcontrol.api.niadra.com%2Fv1%2Fauth%2Fsso%2Foidc%2Fcallback&scope=openid+email+profile+groups&state=Zk9x...&nonce=Pq2w...&code_challenge=K8Hm...&code_challenge_method=S256&login_hint=nina%40acme.example",
"expires_at": "2026-09-24T12:10:00Z"
}{
"code": "<string>",
"status": 123,
"title": "<string>",
"detail": "<string>",
"request_id": "<string>",
"type": "about:blank"
}Controle: login único (SSO)
Começar o login pelo SSO
O endereço do provedor de identidade, com state, nonce e desafio PKCE novos.
POST
/
v1
/
auth
/
sso
/
start
Começar o login pelo SSO
curl --request POST \
--url https://control.api.niadra.com/v1/auth/sso/start \
--header 'Content-Type: application/json' \
--data '
{
"email": "nina@acme.example",
"binding": "E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM"
}
'import requests
url = "https://control.api.niadra.com/v1/auth/sso/start"
payload = {
"email": "nina@acme.example",
"binding": "E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM"
}
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({
email: 'nina@acme.example',
binding: 'E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM'
})
};
fetch('https://control.api.niadra.com/v1/auth/sso/start', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://control.api.niadra.com/v1/auth/sso/start",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'email' => 'nina@acme.example',
'binding' => 'E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://control.api.niadra.com/v1/auth/sso/start"
payload := strings.NewReader("{\n \"email\": \"nina@acme.example\",\n \"binding\": \"E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://control.api.niadra.com/v1/auth/sso/start")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"nina@acme.example\",\n \"binding\": \"E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://control.api.niadra.com/v1/auth/sso/start")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"nina@acme.example\",\n \"binding\": \"E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM\"\n}"
response = http.request(request)
puts response.read_body{
"authorize_url": "https://login.acme.example/authorize?response_type=code&client_id=niadra-console&redirect_uri=https%3A%2F%2Fcontrol.api.niadra.com%2Fv1%2Fauth%2Fsso%2Foidc%2Fcallback&scope=openid+email+profile+groups&state=Zk9x...&nonce=Pq2w...&code_challenge=K8Hm...&code_challenge_method=S256&login_hint=nina%40acme.example",
"expires_at": "2026-09-24T12:10:00Z"
}{
"code": "<string>",
"status": 123,
"title": "<string>",
"detail": "<string>",
"request_id": "<string>",
"type": "about:blank"
}Corpo
application/json

