In order to validate the credentials send by the request, the HTTPResponse must validate the data with the one stored in the store. This store must be an interface in order to be upgraded in the future.
In order to validate the credentials send by the request, the `HTTPResponse` must validate the data with the one stored in the `store`. This `store` must be an **interface** in order to be upgraded in the future.
Impl example:
```rust
pub trait Store {
pub is_auth(name: &str, password: &str) -> bool;
}
pub struct FileStore {
path: String
}
impl Store for FileStore {
...
}
```
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
In order to validate the credentials send by the request, the
HTTPResponsemust validate the data with the one stored in thestore. Thisstoremust be an interface in order to be upgraded in the future.Impl example:
To open the file set in
FileStoreuse : https://docs.rs/tokio/latest/tokio/fs/struct.File.htmlmerged on develop https://gitea.thegux.fr/rmanach/simple-auth/commit/8049763b1845d7bced0c0d612ea05d436498ebad