use crateAuthDetails;
use ServiceRequest;
use HttpMessage;
use Hash;
/// Allows you to transfer authorities to [`actix-web-grants`] from your custom middleware.
///
/// The default implementation is provided for the [`ServiceRequest`]
///
/// # Example
///
/// ```
/// use std::collections::HashSet;
/// use actix_web_grants::authorities::AttachAuthorities;
/// use actix_web::dev::ServiceRequest;
///
/// // You can use you own type/enum instead of `String`
/// fn attach(req: &ServiceRequest, authorities: HashSet<String>) {
/// req.attach(authorities);
/// }
///
/// ```
///
/// [`actix-web-grants`]: crate
/// [`ServiceRequest`]: actix_web::dev::ServiceRequest