Skip to content

LTI: поддержка протокола LTI 1.3 для интеграции с внешними инструментами.#655

Open
KirillBorisovich wants to merge 28 commits intoInteIIigeNET:masterfrom
KirillBorisovich:feat/lti-development
Open

LTI: поддержка протокола LTI 1.3 для интеграции с внешними инструментами.#655
KirillBorisovich wants to merge 28 commits intoInteIIigeNET:masterfrom
KirillBorisovich:feat/lti-development

Conversation

@KirillBorisovich
Copy link

Реализация поддержки протокола LTI 1.3 для интеграции с внешними инструментами.

KirillBorisovich and others added 23 commits November 30, 2025 16:01
…porting from an external tool, and also made validating jwt tokens
…pLinkingReturnController, added a check for matching toolId and course.LtiToolId
@DedSec256 DedSec256 changed the title LTI LTI: поддержки протокола LTI 1.3 для интеграции с внешними инструментами. Mar 7, 2026
@DedSec256 DedSec256 changed the title LTI: поддержки протокола LTI 1.3 для интеграции с внешними инструментами. LTI: поддержка протокола LTI 1.3 для интеграции с внешними инструментами. Mar 7, 2026
@@ -0,0 +1,19 @@
namespace HwProj.APIGateway.API.Lti.Models;

public class LtiPlatformConfig
Copy link
Contributor

@DedSec256 DedSec256 Mar 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
public class LtiPlatformConfig
internal class LtiPlatformConfig

Copy link
Author

@KirillBorisovich KirillBorisovich Mar 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

А нужно ли? Я в конструкторах использую часто где IOptions options. Чтобы сделать внутренним, мне нужно пренести всю логику в сервисы и сделать их (сервисы) все внутренними, нужно ли так делать? Просто больше в проекте нигде так не делается

public LtiSigningKeyConfig SigningKey { get; set; }
}

public class LtiSigningKeyConfig
Copy link
Contributor

@DedSec256 DedSec256 Mar 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
public class LtiSigningKeyConfig
internal class LtiSigningKeyConfig

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

см. ответ сверху

@@ -0,0 +1,14 @@
namespace HwProj.APIGateway.API.Lti.Models
{
public class LtiToolConfig
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
public class LtiToolConfig
internal class LtiToolConfig

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

см. ответ сверху

Comment on lines +9 to +14
string clientId,
string toolId,
string courseId,
string targetLinkUri,
string userId,
string nonce);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

я бы сделал класс с get/init пропертями

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

это метод, случайно не дописал public

}

string tokenString = form["JWT"]!;
var handler = new JwtSecurityTokenHandler();
Copy link
Contributor

@DedSec256 DedSec256 Mar 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

точно мы должны его пересоздавать? Можно ли инжектить?


var resultList = new List<object>();

if (unverifiedToken.Payload.TryGetValue(itemsClaimName, out var itemsObject))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Действительно ли структура такая жидкая?

<body>
<p>Задача выбрана. Возвращаемся в HwProj...</p>
<script>
var payload = {responsePayloadJson};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Потенциальная инжекция

Copy link
Contributor

@DedSec256 DedSec256 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Крутая работа!
Вот основные замечания сейчас

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants