Add documentation

This commit is contained in:
eraden 2023-08-17 20:27:44 +02:00
parent a50cff494b
commit 6792a71820

View File

@ -28,18 +28,28 @@
//! Arc::new(keys.decoding_key), //! Arc::new(keys.decoding_key),
//! Algorithm::EdDSA, //! Algorithm::EdDSA,
//! redis.clone(), //! redis.clone(),
//! vec![Box::new(HeaderExtractor::new())] //! vec![
//! // Check if header "Authorization" exists and contains Bearer with encoded JWT
//! Box::new(HeaderExtractor::new()),
//! // Check if cookie "Authorization" exists and contains encoded JWT
//! Box::new(CookieExtractor::new()),
//! ]
//! ); //! );
//! //!
//! HttpServer::new(move || { //! HttpServer::new(move || {
//! let app = App::new() //! let factory = factory.clone();
//! .app_data(factory.storage()) //! App::new()
//! .wrap(factory.clone()) //! .app_data(factory.storage())
//! .app_data(Data::new(redis.clone())) //! .wrap(factory)
//! .service(sign_in) //! .app_data(Data::new(redis.clone()))
//! .service(sign_out) //! .service(sign_in)
//! .service(session) //! .service(sign_out)
//! .service(root); //! .service(session)
//! .service(root);
//! })
//! .bind(("0.0.0.0", 8080))?
//! .run()
//! .await.unwrap();
//! } //! }
//! //!
//! pub struct JwtSigningKeys { //! pub struct JwtSigningKeys {