Comments (8)
Hi, @Cvmcosta could you please provide me an example? I am a little confused
from ltijs.
In order to connect a tool provider to a platform with LTI they have to be registered in each other. And you can register as many platforms as you want just by calling the registerPlatform method multiple times:
// Register platforms
await lti.registerPlatform({
url: 'https://platform.url1',
name: 'Platform 1',
clientId: 'TOOLCLIENTID1',
authenticationEndpoint: 'https://platform.url/auth1',
accesstokenEndpoint: 'https://platform.url/token1',
authConfig: { method: 'JWK_SET', key: 'https://platform.url/keyset1' }
})
await lti.registerPlatform({
url: 'https://platform.url2',
name: 'Platform 2',
clientId: 'TOOLCLIENTID2',
authenticationEndpoint: 'https://platform.url/auth2',
accesstokenEndpoint: 'https://platform.url/token2',
authConfig: { method: 'JWK_SET', key: 'https://platform.url/keyset2' }
})
After doing so, your provider would be able to work with both platorms 1 and 2
from ltijs.
thanks i will try it
from ltijs.
Hello! Yes, you can register and work with as many platforms as you want.
from ltijs.
Great! Let me know how it goes :)
from ltijs.
What happens with the key that must be inserted in moodle would generate more than one?
from ltijs.
Ltijs generates one key per platform, you can just get the individual keys after registration:
// Register platforms
const platA = await lti.registerPlatform({
url: 'https://platform.url1',
name: 'Platform 1',
clientId: 'TOOLCLIENTID1',
authenticationEndpoint: 'https://platform.url/auth1',
accesstokenEndpoint: 'https://platform.url/token1',
authConfig: { method: 'JWK_SET', key: 'https://platform.url/keyset1' }
})
console.log(await platA.platformPublicKey())
const platB = await lti.registerPlatform({
url: 'https://platform.url2',
name: 'Platform 2',
clientId: 'TOOLCLIENTID2',
authenticationEndpoint: 'https://platform.url/auth2',
accesstokenEndpoint: 'https://platform.url/token2',
authConfig: { method: 'JWK_SET', key: 'https://platform.url/keyset2' }
})
console.log(await platB.platformPublicKey())
from ltijs.
@Cvmcosta thank you very much.
from ltijs.
Related Issues (20)
- Error obtaining the roles
- /members and /grade endpoints are not working. They are throwing 500 error. HOT 5
- Update @types Repository or Migrate to TypeScript HOT 2
- Error on D2L LMS only
- Provide possibility to customize the bodyParser configuration
- /keys URL breaks if multiple LTIs are registered - error:1C800064:Provider routines::bad decrypt HOT 3
- Help Needed: "No Ltik or ID Token found." HOT 1
- unable to verify the first certificate issue HOT 1
- Unable to select content while Adding a External tool
- Getting this error when accessing the namesandroles and grades HTTPError: Internal Server Error HOT 1
- "MISSING_LOGIN_PARAMETERS" error : cookie issue?
- Provide opportunity to override `redirect_uri` in `Request.ltiAdvantageLogin`
- Feature Support: Submissions Review Service HOT 1
- Correct RS256 keypair keeps throwing: secretOrPrivateKey must be a symmetric key when using HS256
- Plans for the support of browsers disabling third-party cookies HOT 6
- Access the custom fields during launch HOT 1
- Potential concern of users viewing ltijs as an LTI "shim"
- Enhanced Database and Data Management Capabilities for Ltijs
- DeepLink error only in Moodle v 4.3 HOT 3
- How do i need to configure Moodle or LTIJS to retrieve the picture?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ltijs.