You've already forked authentication-service
mirror of
https://github.com/matrix-org/matrix-authentication-service.git
synced 2025-11-21 23:00:50 +03:00
Move secrets and oauth2 clients config
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
// limitations under the License.
|
||||
|
||||
use hyper::http::uri::{Parts, PathAndQuery};
|
||||
use mas_config::{CookiesConfig, CsrfConfig};
|
||||
use mas_config::{CsrfConfig, Encrypter};
|
||||
use mas_data_model::BrowserSession;
|
||||
use mas_storage::{user::authenticate_session, PostgresqlBackend};
|
||||
use mas_templates::{ReauthContext, TemplateContext, Templates};
|
||||
@@ -83,22 +83,22 @@ struct ReauthForm {
|
||||
pub(super) fn filter(
|
||||
pool: &PgPool,
|
||||
templates: &Templates,
|
||||
encrypter: &Encrypter,
|
||||
csrf_config: &CsrfConfig,
|
||||
cookies_config: &CookiesConfig,
|
||||
) -> BoxedFilter<(Box<dyn Reply>,)> {
|
||||
let get = warp::get()
|
||||
.and(with_templates(templates))
|
||||
.and(connection(pool))
|
||||
.and(encrypted_cookie_saver(cookies_config))
|
||||
.and(updated_csrf_token(cookies_config, csrf_config))
|
||||
.and(session(pool, cookies_config))
|
||||
.and(encrypted_cookie_saver(encrypter))
|
||||
.and(updated_csrf_token(encrypter, csrf_config))
|
||||
.and(session(pool, encrypter))
|
||||
.and(warp::query())
|
||||
.and_then(get);
|
||||
|
||||
let post = warp::post()
|
||||
.and(session(pool, cookies_config))
|
||||
.and(session(pool, encrypter))
|
||||
.and(transaction(pool))
|
||||
.and(protected_form(cookies_config))
|
||||
.and(protected_form(encrypter))
|
||||
.and(warp::query())
|
||||
.and_then(post);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user