lti-launch | Java framework for authenticating LTI launch requests
kandi X-RAY | lti-launch Summary
kandi X-RAY | lti-launch Summary
LTI Launch is a project designed to assist in the development of Java based LTI applications that work with the Canvas LMS. It provides functionality to authenticate the OAuth signature of an LTI launch request and handle the OAuth 2 user token exchange if needed for communicating with the Canvas API. After the launch request is verified, the user is forwarded to an initial view specified by the implementing application.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Ensures that the api token is present and if so returns a new OauthToken
- Gets the LTI session
- Gets the id
- Sets OAuth token
- Launch an LTI session
- Removes the protocol from the URL
- Removes the domain from the URL
- Ensure that the canvas is valid
- Handles OAuth response
- Get initial view path
- Get the OAuth token state
- Starts the LTI session
- Sets the OAuth token request state
- Returns the base URL of this application
- Registers a consumer with the given consumer key
- Sets the roles
- Method to validate the OAuth token
- Creates an LTI authentication for the user
- Get the API access token
lti-launch Key Features
lti-launch Examples and Code Snippets
Community Discussions
Trending Discussions on lti-launch
QUESTION
I'm attempting to integrate LinkedIn Learning Single-Sign-On via an LTI connection, however I'm always faced with the response: LTI_FAILED_AUTHENTICATION.
LinkedIn Learning - LTI_FAILED_AUTHENTICATION
When I test it out on the Saltire test platform, it strangely works.
The parameters match what I am sending from the code below: Saltire LTI Success authentication
Have tried copying over the the values of oauth_nonce
, timestamp
and oauth_signature
from Saltire to my page, and that worked also, which scores out the possibility of domain whitelisting requirement.
LinkedIn support have come back saying there seems to be something wrong with the generated signature, but I'm not sure what is wrong about it, since that is generated by the parameters passed.
Is there something incorrectly setup from my page which I am not seeing?
...ANSWER
Answered 2021-Dec-23 at 01:51I figured out the issue. By using the Saltire test tool, I was able to verify that my signature was generated correctly when using their testing URL: https://lti.tools/saltire/tp
You can play with an example here: https://learningcom.github.io/ltitest/index.html
So after looking at the LinkedIn URL, I discovered that the signature was getting generated with an unnecessary long URL which contained parameters.
Removed: ?application=learning&redirect=https://www.linkedin.com/learning/me
Therefore, I shortened the URL to:
var action = 'https://www.linkedin.com/checkpoint/enterprise/login/[accountID]';
No more errors!
QUESTION
I'm aware that I have to switch to an iframe when I want to click and element inside it. Heres what the start of the iFrame looks like:
...ANSWER
Answered 2020-Oct-06 at 01:10Try waiting and clicking on the element. Try not to use xpath.
QUESTION
ANSWER
Answered 2020-Sep-28 at 08:25Due to having an iframe just switch to it
QUESTION
I am currently building a Spring Boot web application (2.3.1, but the following issue also was observed with versions 2.1.7 and 2.1.5) that is secured with Spring Security. I mostly use default settings (e.g. embedded Tomcat, embedded H2 database, Spring Web-MVC). I do some custom authentication on a permissive POST
mapping with the following code:
ANSWER
Answered 2020-Jun-25 at 09:07In general, I would advise you against using your appication in an iframe.
This poses a security risk, which you can read more about in this answer.
Now to explain the behaviour you are seeing.
Spring Security uses a Session
cookie to store the user's session.
Cookies are associated with domains, so if, for example, there is a cookie associated with the domain stackoverflow.com
then that cookie will be included in any request to stackoverlow.com
.
In order to control that behaviour, cookies also have an attribute called SameSite
.
The SameSite
attribute can have 3 values, None
, Lax
or Strict
.
When the value is None
, it behaves as described above (included in all requests).
When the value is Lax
, then the cookie will only be included in top level navigation GET
requests.
When including the Spring Session dependency, the Session
cookie SameSite
attribute is set to Lax
by default.
Since rendering an application in an iframe is not a top level navigation, the Session
cookie is not included in the request to the iframe, and the application has no way of knowing that a user is signed in.
You can explicitly set the SameSite
attribute to None
by using Spring Session.
Again, I would caution against this, since it can make your application vulnerable to CSRF and clickjacking attacks.
If, after consider the security implications, you deem it necessary to set the SameSite
attribute to None
, you can do so by including Spring Session in your dependencies and creating a custom CookieSerializer
.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install lti-launch
ConfigService This is a simple key/value lookup service for retrieving configuration items that the applicatin needs. It must provide values for the following keys: canvas_url - The first valid base canvas URL this instance can talk to (e.g. https://k-state.instructure.com) canvas_url_2 - The second base canvas URL this instance can talk to. For example if you have a vanity URL like https://canvas.k-state.edu. It can be blank if there is no second canvas URL. oauth_client_id - The OAuth Client ID for the application oauth_client_secret - The OAuth Client Secret for this application
LtiLaunchKeyService A service that is able to take an application launch key and return the associated shared secret.
OauthTokenService A service that can handle the persisting and retrieving of user OAuth refresh tokens
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page