Validate an institution's stored Google token
curl --request GET \
--url https://pria.praxislxp.com/api/auth/google/institution/{institutionId}/validate \
--header 'Authorization: Bearer <token>'import requests
url = "https://pria.praxislxp.com/api/auth/google/institution/{institutionId}/validate"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://pria.praxislxp.com/api/auth/google/institution/{institutionId}/validate', 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://pria.praxislxp.com/api/auth/google/institution/{institutionId}/validate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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 := "https://pria.praxislxp.com/api/auth/google/institution/{institutionId}/validate"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://pria.praxislxp.com/api/auth/google/institution/{institutionId}/validate")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://pria.praxislxp.com/api/auth/google/institution/{institutionId}/validate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"valid": true,
"cleared": true,
"message": "No Google tokens configured",
"error": "<string>"
}{
"success": false,
"message": "Not authorized"
}{
"success": false,
"message": "Institution not found"
}{
"success": false,
"message": "Validation request failed"
}OAuth
Validate an institution's stored Google token
Probes Google’s userinfo endpoint with the institution’s stored
cloudServices.google.googleLoginToken to check whether it is still accepted.
If Google rejects the token, the entire cloudServices.google subtree is
cleared ($unset) and the response reports valid: false, cleared: true.
The caller must hold institutions.edit on the target institution.
GET
/
api
/
auth
/
google
/
institution
/
{institutionId}
/
validate
Validate an institution's stored Google token
curl --request GET \
--url https://pria.praxislxp.com/api/auth/google/institution/{institutionId}/validate \
--header 'Authorization: Bearer <token>'import requests
url = "https://pria.praxislxp.com/api/auth/google/institution/{institutionId}/validate"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://pria.praxislxp.com/api/auth/google/institution/{institutionId}/validate', 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://pria.praxislxp.com/api/auth/google/institution/{institutionId}/validate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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 := "https://pria.praxislxp.com/api/auth/google/institution/{institutionId}/validate"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://pria.praxislxp.com/api/auth/google/institution/{institutionId}/validate")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://pria.praxislxp.com/api/auth/google/institution/{institutionId}/validate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"valid": true,
"cleared": true,
"message": "No Google tokens configured",
"error": "<string>"
}{
"success": false,
"message": "Not authorized"
}{
"success": false,
"message": "Institution not found"
}{
"success": false,
"message": "Validation request failed"
}Authorizations
JWT token passed in authorization header
Path Parameters
ObjectId of the institution whose token to validate.
Response
Validation completed. Inspect valid for the outcome.
Was this page helpful?
⌘I