Skip to content

refactor: Reorg identity provider to match structure#406

Merged
gtema merged 1 commit intomainfrom
identity
Nov 26, 2025
Merged

refactor: Reorg identity provider to match structure#406
gtema merged 1 commit intomainfrom
identity

Conversation

@gtema
Copy link
Collaborator

@gtema gtema commented Nov 26, 2025

Refactor/reogranize identity provider code to match the structure of the
other providers. This improves modularization and help to extend
functionality.

Refactor/reogranize identity provider code to match the structure of the
other providers. This improves modularization and help to extend
functionality.
use crate::db::entity::{local_user, prelude::LocalUser};
use crate::identity::backends::sql::{IdentityDatabaseError, db_err};

pub async fn get_by_name_and_domain<N: AsRef<str>, D: AsRef<str>>(

Check warning

Code scanning / clippy

function get_by_name_and_domain is never used Warning

function get_by_name_and_domain is never used
use crate::db::entity::{local_user, prelude::LocalUser};
use crate::identity::backends::sql::{IdentityDatabaseError, db_err};

pub async fn get_by_name_and_domain<N: AsRef<str>, D: AsRef<str>>(

Check warning

Code scanning / clippy

function get_by_name_and_domain is never used Warning

function get_by_name_and_domain is never used
.map_err(|err| db_err(err, "searching user by name and domain"))
}

pub async fn get_by_user_id<U: AsRef<str>>(

Check warning

Code scanning / clippy

function get_by_user_id is never used Warning

function get_by_user_id is never used
.map_err(|err| db_err(err, "searching user by name and domain"))
}

pub async fn get_by_user_id<U: AsRef<str>>(

Check warning

Code scanning / clippy

function get_by_user_id is never used Warning

function get_by_user_id is never used
@github-actions
Copy link

🐰 Bencher Report

Branchidentity
Testbedubuntu-latest
Click to view all benchmark results
BenchmarkLatencyBenchmark Result
nanoseconds (ns)
(Result Δ%)
Upper Boundary
nanoseconds (ns)
(Limit %)
fernet token/project📈 view plot
🚷 view threshold
1,451.10 ns
(+13.87%)Baseline: 1,274.36 ns
1,646.72 ns
(88.12%)
get_fernet_token_timestamp/project📈 view plot
🚷 view threshold
143.10 ns
(-8.97%)Baseline: 157.19 ns
210.76 ns
(67.90%)
🐰 View full continuous benchmarking report in Bencher

@github-actions
Copy link

🦢 Load Test Results

Goose Attack Report

Plan Overview

Action Started Stopped Elapsed Users
Increasing 25-11-26 18:16:24 25-11-26 18:16:26 00:00:02 0 → 4
Maintaining 25-11-26 18:16:26 25-11-26 18:16:56 00:00:30 4
Decreasing 25-11-26 18:16:56 25-11-26 18:16:56 00:00:00 0 ← 4

Request Metrics

Method Name # Requests # Fails Average (ms) Min (ms) Max (ms) RPS Failures/s
GET 9620 0 11.98 7 24 320.67 0.00
Aggregated 9620 0 11.98 7 24 320.67 0.00

Response Time Metrics

Method Name 50%ile (ms) 60%ile (ms) 70%ile (ms) 80%ile (ms) 90%ile (ms) 95%ile (ms) 99%ile (ms) 100%ile (ms)
GET 10 10 16 16 17 17 18 24
Aggregated 10 10 16 16 17 17 18 24

Status Code Metrics

Method Name Status Codes
GET 9,620 [200]
Aggregated 9,620 [200]

Transaction Metrics

Transaction # Times Run # Fails Average (ms) Min (ms) Max (ms) RPS Failures/s
ListUsers
0.0 0 0 0.00 0 0 0.00 0.00
0.1 6089 0 9.38 7 14 202.97 0.00
ValidateToken
1.0 0 0 0.00 0 0 0.00 0.00
1.1 3531 0 16.54 14 24 117.70 0.00
Aggregated 9620 0 11.98 7 24 320.67 0.00

Scenario Metrics

Transaction # Users # Times Run Average (ms) Min (ms) Max (ms) Scenarios/s Iterations
ListUsers 2 6087 9.38 7 14 202.90 3043.50
ValidateToken 2 3529 16.54 14 24 117.63 1764.50
Aggregated 4 9616 12.01 7 24 320.53 4808.00

Error Metrics

Method Name # Error

View full report

@gtema gtema merged commit 6a47235 into main Nov 26, 2025
21 checks passed
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.

1 participant

Comments