< Return to Summary | File Generated: Thu Nov 21 2024 17:48:44 GMT+0000 (Coordinated Universal Time)
Booking Flow:
Opportunity Type:
Feature: Authentication / Booking Partner Authentication for Multiple Seller Systems (Implemented)
Test: Client Credentials Flow
Client Credentials Flow allows Booking Partners to access the Orders Feed
npm start -- --runInBand test/features/authentication/booking-partner-authentication/implemented/client-credentials-flow-test.js
The OpenActive Reference Implementation test result for this test can be used as a reference to help with debugging.
✅ 3 passed with 0 failures, 0 warnings and 0 suggestions
The test suite is using the credentials below for this test:
8a7666a1-7feb-425d-9569-c0f61541d95c
n954XZgb9SkYBRyK2tstauGxH6b9W5vJ0Gp0XV0sIsS
These credentials were retrieved using Dynamic Client Registration by the Broker Microservice upon startup, using the following configuration within bookingPartners.primary.authentication
:
openactive_test_suite_client_12345xaq
GET https://localhost:5003/.well-known/openid-configuration
"application/json"
"gzip, deflate, br"
"localhost:5003"
Response status code: 200.
{
"issuer": "https://localhost:5003",
"jwks_uri": "https://localhost:5003/.well-known/openid-configuration/jwks",
"authorization_endpoint": "https://localhost:5003/connect/authorize",
"token_endpoint": "https://localhost:5003/connect/token",
"userinfo_endpoint": "https://localhost:5003/connect/userinfo",
"end_session_endpoint": "https://localhost:5003/connect/endsession",
"check_session_iframe": "https://localhost:5003/connect/checksession",
"revocation_endpoint": "https://localhost:5003/connect/revocation",
"introspection_endpoint": "https://localhost:5003/connect/introspect",
"device_authorization_endpoint": "https://localhost:5003/connect/deviceauthorization",
"frontchannel_logout_supported": true,
"frontchannel_logout_session_supported": true,
"backchannel_logout_supported": true,
"backchannel_logout_session_supported": true,
"scopes_supported": [
"openid",
"openactive-identity",
"openactive-openbooking",
"openactive-ordersfeed",
"offline_access"
],
"claims_supported": [
"sub",
"https://openactive.io/sellerId",
"https://openactive.io/sellerName",
"https://openactive.io/sellerUrl",
"https://openactive.io/sellerLogo",
"https://openactive.io/bookingServiceName",
"https://openactive.io/bookingServiceUrl",
"name",
"https://openactive.io/clientId"
],
"grant_types_supported": [
"authorization_code",
"client_credentials",
"refresh_token",
"implicit",
"urn:ietf:params:oauth:grant-type:device_code"
],
"response_types_supported": [
"code",
"token",
"id_token",
"id_token token",
"code id_token",
"code token",
"code id_token token"
],
"response_modes_supported": [
"form_post",
"query",
"fragment"
],
"token_endpoint_auth_methods_supported": [
"client_secret_basic",
"client_secret_post"
],
"id_token_signing_alg_values_supported": [
"RS256"
],
"subject_types_supported": [
"public"
],
"code_challenge_methods_supported": [
"plain",
"S256"
],
"request_parameter_supported": true,
"registration_endpoint": "https://localhost:5003/connect/register"
}
POST https://localhost:5003/connect/token
"Basic OGE3NjY2YTEtN2ZlYi00MjVkLTk1NjktYzBmNjE1NDFkOTVjOm45NTRYWmdiOVNrWUJSeUsydHN0YXVHeEg2YjlXNXZKMEdwMFhWMHNJc1M="
"application/json"
"application/x-www-form-urlencoded"
"57"
"gzip, deflate, br"
"localhost:5003"
"grant_type=client_credentials&scope=openactive-ordersfeed"
Response status code: 200.
{
"access_token": "eyJhbGciOiJSUzI1NiIsImtpZCI6IkIwNEY3QjkxREUzQjk0NzhDNjE4MzNGQjI0QUE1Q0RCIiwidHlwIjoiYXQrand0In0.eyJuYmYiOjE3MzIyMTEzMjQsImV4cCI6MTczMjIxNDkyNCwiaXNzIjoiaHR0cHM6Ly9sb2NhbGhvc3Q6NTAwMyIsImF1ZCI6Im9wZW5ib29raW5nIiwiY2xpZW50X2lkIjoiOGE3NjY2YTEtN2ZlYi00MjVkLTk1NjktYzBmNjE1NDFkOTVjIiwiaHR0cHM6Ly9vcGVuYWN0aXZlLmlvL2NsaWVudElkIjoiOGE3NjY2YTEtN2ZlYi00MjVkLTk1NjktYzBmNjE1NDFkOTVjIiwianRpIjoiMUNFN0ZBOUVFQzdFRTY3MzExOTRGM0REMTQ0OEEyQjQiLCJpYXQiOjE3MzIyMTEzMjQsInNjb3BlIjpbIm9wZW5hY3RpdmUtb3JkZXJzZmVlZCJdfQ.gQoDRnNJKhHqwd5j2cLtEjc7UIYeJ9pwRoUhaYSDE0AaDXHUurw7zEx7vjOQOPh5RB8abpoJF5vFN5Fp8pvK7F5XpYwaPNvLkYpNwsQwrCPezMISpccxSgOdClMixy6nb56KAbLBh_XfX1o5UAtS3NswAst7kNMsrtgqJk95twYox8WVjxTSe2Nv6ZxF39wHW1Hk41frL846Z59mBRrf2ovQvXanoOlAvKPSvxXJyIysOjGxVbE-EZndWOUzl-Wu3Y4F9Unr5HT1pfctwGxdb6wgzNykLMN735q0lziYlm3OxFxiWCKT0kFwOlO3BJw4hkOOZ7S-hm5qZBArvIWJhw",
"expires_in": 3600,
"token_type": "Bearer",
"scope": "openactive-ordersfeed"
}