Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 7, 2026

Description

Code quality improvements in SMART configuration handling:

  • Fixed test method naming: SpecifiredSpecified, ShouldContainsShouldContain
  • Added defensive trimming of trailing slashes in GetAuthority() to prevent malformed URLs like https://authority.com//authorize
private string GetAuthority()
{
    var authority = !string.IsNullOrEmpty(_smartIdentityProviderConfiguration.Authority) ?
        _smartIdentityProviderConfiguration.Authority : _securityConfiguration.Authentication.Authority;
    return authority?.TrimEnd('/');
}

Related issues

Addresses [issue #175966].

User Story 175966: Complete .well-known/smart-configuration for a 3rd-party IDP in Paas Fhir service for SMART v2.

Testing

Existing unit tests validate behavior. Updated test expectations to align with trailing slash normalization.

FHIR Team Checklist

  • Update the title of the PR to be succinct and less than 65 characters
  • Add a milestone to the PR for the sprint that it is merged (i.e. add S47)
  • Tag the PR with the type of update: Bug, Build, Dependencies, Enhancement, New-Feature or Documentation
  • Tag the PR with Open source, Azure API for FHIR (CosmosDB or common code) or Azure Healthcare APIs (SQL or common code) to specify where this change is intended to be released.
  • Tag the PR with Schema Version backward compatible or Schema Version backward incompatible or Schema Version unchanged if this adds or updates Sql script which is/is not backward compatible with the code.
  • When changing or adding behavior, if your code modifies the system design or changes design assumptions, please create and include an ADR.
  • CI is green before merge Build Status
  • Review squash-merge requirements

Semver Change (docs)

Patch|Skip|Feature|Breaking (reason)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: mikaelweave <753437+mikaelweave@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jan 7, 2026

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • microsofthealthoss.pkgs.visualstudio.com
    • Triggering command: /usr/bin/dotnet dotnet build src/Microsoft.Health.Fhir.Core/Microsoft.Health.Fhir.Core.csproj --no-incremental (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] Add configuration for SMART 3rd-party IDP Fix spelling errors and add defensive coding for authority URLs Jan 7, 2026
Copilot AI requested a review from mikaelweave January 7, 2026 17:12
Base automatically changed from personal/v-isyamauchi/smart-3p-idp to main January 8, 2026 18:57
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.

3 participants