Token introspection (RFC 7662)
curl --request POST \
--url https://prod-auth.tktchurch.com/oauth/introspect \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"token": "<string>"
}
'import Foundation
let parameters = ["token": "<string>"] as [String : Any?]
let postData = try JSONSerialization.data(withJSONObject: parameters, options: [])
let url = URL(string: "https://prod-auth.tktchurch.com/oauth/introspect")!
var request = URLRequest(url: url)
request.httpMethod = "POST"
request.timeoutInterval = 10
request.allHTTPHeaderFields = [
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
]
request.httpBody = postData
let (data, _) = try await URLSession.shared.data(for: request)
print(String(decoding: data, as: UTF8.self))const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({token: '<string>'})
};
fetch('https://prod-auth.tktchurch.com/oauth/introspect', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://prod-auth.tktchurch.com/oauth/introspect"
payload = { "token": "<string>" }
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"active": true,
"scope": "openid profile",
"client_id": "dev-console",
"username": "amina",
"exp": 1798764000
}{
"error": "invalid_request",
"error_description": "Redirect URI not registered for this client"
}{
"error": "invalid_client",
"error_description": "Client authentication failed"
}Token introspection (RFC 7662)
For resource servers that prefer introspection over local JWT validation.
POST
/
oauth
/
introspect
Token introspection (RFC 7662)
curl --request POST \
--url https://prod-auth.tktchurch.com/oauth/introspect \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"token": "<string>"
}
'import Foundation
let parameters = ["token": "<string>"] as [String : Any?]
let postData = try JSONSerialization.data(withJSONObject: parameters, options: [])
let url = URL(string: "https://prod-auth.tktchurch.com/oauth/introspect")!
var request = URLRequest(url: url)
request.httpMethod = "POST"
request.timeoutInterval = 10
request.allHTTPHeaderFields = [
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
]
request.httpBody = postData
let (data, _) = try await URLSession.shared.data(for: request)
print(String(decoding: data, as: UTF8.self))const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({token: '<string>'})
};
fetch('https://prod-auth.tktchurch.com/oauth/introspect', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://prod-auth.tktchurch.com/oauth/introspect"
payload = { "token": "<string>" }
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"active": true,
"scope": "openid profile",
"client_id": "dev-console",
"username": "amina",
"exp": 1798764000
}{
"error": "invalid_request",
"error_description": "Redirect URI not registered for this client"
}{
"error": "invalid_client",
"error_description": "Client authentication failed"
}Authorizations
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Body
application/json
Token to inspect
