Start single sign-on (OIDC)
curl --request GET \
--url http://localhost:8080/api/v1/auth/oidc/loginimport requests
url = "http://localhost:8080/api/v1/auth/oidc/login"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('http://localhost:8080/api/v1/auth/oidc/login', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8080",
CURLOPT_URL => "http://localhost:8080/api/v1/auth/oidc/login",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://localhost:8080/api/v1/auth/oidc/login"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://localhost:8080/api/v1/auth/oidc/login")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8080/api/v1/auth/oidc/login")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodyAuth
Start single sign-on (OIDC)
Browser navigation, not an API call. Sets the short-lived HttpOnly datris-oidc-tx cookie (state, nonce and PKCE verifier; ten minutes, SameSite=Lax, path /api/v1/auth/oidc) and redirects to the identity provider’s authorization endpoint with response_type=code, code_challenge_method=S256, state and nonce. Only available when user auth and OIDC are both on.
GET
/
api
/
v1
/
auth
/
oidc
/
login
Start single sign-on (OIDC)
curl --request GET \
--url http://localhost:8080/api/v1/auth/oidc/loginimport requests
url = "http://localhost:8080/api/v1/auth/oidc/login"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('http://localhost:8080/api/v1/auth/oidc/login', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8080",
CURLOPT_URL => "http://localhost:8080/api/v1/auth/oidc/login",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://localhost:8080/api/v1/auth/oidc/login"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://localhost:8080/api/v1/auth/oidc/login")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8080/api/v1/auth/oidc/login")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodyResponse
Redirect to the identity provider, or to /login?ssoError=sso_failed when its discovery document cannot be fetched.
