Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add IDENTITY_TYPE_MANUAL support #138

Merged
merged 2 commits into from
Sep 28, 2023
Merged

add IDENTITY_TYPE_MANUAL support #138

merged 2 commits into from
Sep 28, 2023

Conversation

gertd
Copy link
Member

@gertd gertd commented Sep 27, 2023

This PR adds support for IDENTITY_TYPE_MANUAL

When using an IdentityContext.Type == IDENTITY_TYPE_MANUAL, the identity field of the identity context will be passed as-is, and will surface in the input.identity.identity field. The resulting input.user object, which normally contains the properties of the resolve user object, will now be empty.

Example query using a manual identity context:

{
  "query": "i = input",
  "identityContext": {
    "identity": "[email protected]",
    "type": "IDENTITY_TYPE_MANUAL"
  }
}

Resulting input object:

{
  "response": {
    "result": [
      {
        "bindings": {
          "i": {
            "identity": {
              "identity": "[email protected]",
              "type": "IDENTITY_TYPE_MANUAL"
            },
            "user": {}
          }
        }
      }
    ]
  },
  "metrics": {},
  "trace": [],
  "trace_summary": []
}

@github-actions
Copy link

Pull Request Test Coverage Report for Build 6331020029

  • 0 of 5 (0.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.04%) to 29.565%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pkg/app/impl/jwt.go 0 5 0.0%
Totals Coverage Status
Change from base Build 6321753654: -0.04%
Covered Lines: 1127
Relevant Lines: 3812

💛 - Coveralls

@gertd gertd merged commit 5e6b4b2 into main Sep 28, 2023
5 checks passed
@gertd gertd deleted the identity-context-manual branch September 28, 2023 22:50
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