Skip to content

Commit

Permalink
ULMS-2551 Added fetchTokenData method for dispatcher client
Browse files Browse the repository at this point in the history
  • Loading branch information
alexkonst committed Aug 22, 2023
1 parent e214351 commit 0c0d428
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 3 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ulms/api-clients",
"version": "5.25.0",
"version": "5.26.0",
"description": "JavaScript API clients for ULMS platform",
"keywords": [],
"homepage": "https://github.com/foxford/ulms-api-clients-js#readme",
Expand Down
12 changes: 12 additions & 0 deletions src/dispatcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,18 @@ class Dispatcher extends BasicClient {
)
}

/**
* Fetch token data for NATS
* @param {string} audience
* @param {string} classroomId
* @returns {Promise}
*/
fetchTokenData(audience, classroomId) {
return this.post(
`${this.baseUrl}/audiences/${audience}/classrooms/${classroomId}/tokens`
)
}

/**
* Read dispatcher scope
* @param {string} kind
Expand Down
4 changes: 4 additions & 0 deletions src/nats-gatekeeper.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
import BasicClient from './basic-client'

/**
* @deprecated
*/
class NatsGatekeeper extends BasicClient {
/**
* Fetch token data
* @deprecated
* @param {string} audience
* @param {string} classroomId
* @returns {Promise}
Expand Down

0 comments on commit 0c0d428

Please sign in to comment.