Skip to content

feat: expose current user access token - #24

Merged
PANiXiDA merged 2 commits into
mainfrom
feature/current-user-access-token
Oct 23, 2026
Merged

PANiXiDA merged 2 commits into
mainfrom
feature/current-user-access-token

Conversation

@PANiXiDA

@PANiXiDA PANiXiDA commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Что изменено

  • В ICurrentUser добавлено nullable-свойство string? AccessToken { get; } с XML-документацией.
  • Обновлена тестовая реализация интерфейса. Версия пакета поднята до 5.2.

Зачем

Дать прикладным сценариям доступ к токену текущего вызывающего через общий контекст вместо передачи токена в каждой команде. В этом PR добавлен только контракт; HTTP-реализация будет отдельным изменением.

Проверка локально

dotnet restore
dotnet build --configuration Release
dotnet test --configuration Release --no-build
dotnet build
dotnet format --no-restore --verify-no-changes --severity warn
dotnet pack src/PANiXiDA.Core.Application/PANiXiDA.Core.Application.csproj --configuration Release --no-build --no-restore

Прошли 309 тестов. Сборки без предупреждений; форматирование и создание NuGet-пакета прошли. Предварительная сборка нужна форматтеру для source generator.

Совместимость

Добавлен обязательный член публичного интерфейса: реализации и тестовые заглушки ICurrentUser должны добавить AccessToken; при отсутствии токена можно возвращать null. HTTP-адаптер необходимо обновить отдельно перед переходом потребителей на новую версию.
Миграций, новых зависимостей и изменений конфигурации нет.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-23T07:00:10.616095Z 02dee93 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: df634c5f03

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread version.json Resolved
Comment thread README.md Resolved
@PANiXiDA

Copy link
Copy Markdown
Contributor Author

@codex

@panixida-sonarqube

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 02dee93412

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

/// Gets the access token used to authenticate the current request,
/// or null when no access token is available.
/// </summary>
string? AccessToken { get; }

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Document the new access-token contract

For consumers following the README to implement an ICurrentUser transport adapter, this new required member is absent from the Handler Authorization guidance, so the shipped documentation does not explain that adapters must populate it or may return null. Update that guidance or its example alongside the public interface change.

AGENTS.md reference: AGENTS.md:L59-L63

Useful? React with 👍 / 👎.

@PANiXiDA
PANiXiDA merged commit 8021e08 into main Oct 23, 2026
8 checks passed
@PANiXiDA
PANiXiDA deleted the feature/current-user-access-token branch October 23, 2026 07:01
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