Loads clients list only once (#106)
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Currently, the list of client is loaded separately for each Actix HTTP handler threads. In prevision of future improvements, it is worthwhile to load this list only once. Reviewed-on: #106
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
use std::fmt::Debug;
|
||||
use std::sync::Arc;
|
||||
|
||||
use actix::Addr;
|
||||
use actix_identity::Identity;
|
||||
@ -113,7 +114,7 @@ pub async fn authorize(
|
||||
user: CurrentUser,
|
||||
id: Identity,
|
||||
query: web::Query<AuthorizeQuery>,
|
||||
clients: web::Data<ClientManager>,
|
||||
clients: web::Data<Arc<ClientManager>>,
|
||||
sessions: web::Data<Addr<OpenIDSessionsActor>>,
|
||||
logger: ActionLogger,
|
||||
) -> impl Responder {
|
||||
@ -267,7 +268,7 @@ pub struct TokenResponse {
|
||||
pub async fn token(
|
||||
req: HttpRequest,
|
||||
query: web::Form<TokenQuery>,
|
||||
clients: web::Data<ClientManager>,
|
||||
clients: web::Data<Arc<ClientManager>>,
|
||||
sessions: web::Data<Addr<OpenIDSessionsActor>>,
|
||||
users: web::Data<Addr<UsersActor>>,
|
||||
jwt_signer: web::Data<JWTSigner>,
|
||||
|
Reference in New Issue
Block a user