Skip to content

Tbt/auth refactor#1243

Closed
TBThomas56 wants to merge 26 commits intomainfrom
tbt/auth-refactor
Closed

Tbt/auth refactor#1243
TBThomas56 wants to merge 26 commits intomainfrom
tbt/auth-refactor

Conversation

@TBThomas56
Copy link
Copy Markdown
Contributor

No description provided.

@TBThomas56 TBThomas56 marked this pull request as ready for review April 22, 2026 09:35
@TBThomas56 TBThomas56 force-pushed the tbt/auth-refactor branch 2 times, most recently from 0258b3e to 65f2c33 Compare April 22, 2026 13:09
…d and staging

when this gets back to something that works, this should be changed back
to latest
@TBThomas56 TBThomas56 closed this Apr 22, 2026
@TBThomas56 TBThomas56 reopened this Apr 22, 2026
@TBThomas56 TBThomas56 closed this Apr 22, 2026

/// Axum middleware that extracts `State<Arc<S>>` and delegates to [`inject_token_with`].
/// Use this when the store is shared application state (e.g. auth-daemon's RouterState).
pub async fn inject_token<S>(
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Commenting as I go along, so haven't go to where these are used:

do both of these need to be public?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes. This has slightly different usecases where one is used by auth-daemon (inject_token) and oidc-bff(inject_token_with)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

added more clear docstrings to show this

Comment thread backend/auth-core/src/middleware/traits.rs
Utc::now()
}
};
if expires_at_utc < Utc::now() {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

What is the intentional behavior here when expire_at is None?

Suppose the following:

expires_at_utc is set to Utc::now().

The OS puts the process to sleep for a few seconds.

It wakes up and continues and performs the expires_at_utc < Utc::now() check?

Does this do the correct thing?

Comment thread backend/oidc-bff/src/login.rs
Comment thread backend/oidc-bff/config.yaml
@@ -0,0 +1,28 @@
{{/*
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

check this is compatible with 793eed2

I think there is some mixing of the old way of dealing with secrets with the new way.

I don't know if a rebase is needed?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

good catch!

Comment thread charts/workflows/staging-values.yaml
Comment thread charts/workflows/values.yaml
Comment thread examples/conventional-templates/workflow-auth.yaml
Comment thread examples/conventional-templates/workflow-of-workflows.yaml
@davehadley davehadley mentioned this pull request Apr 23, 2026
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