pub struct ImpersonateUser(/* private fields */);Expand description
POST /admin/impersonate-user: needs user:impersonate, plus
user:impersonate-admins when the target is an admin. Signs the browser in as the
user with a short session marked impersonatedBy, and keeps the admin’s session token
in a signed {prefix}.admin_session cookie for stop-impersonating. Impersonation
sessions can’t impersonate, and banned users can’t be impersonated.
Trait Implementations§
Source§impl<D: Adapter> Endpoint<D> for ImpersonateUser
impl<D: Adapter> Endpoint<D> for ImpersonateUser
const METHOD: Method = Method::POST
const PATH: &'static str = "/admin/impersonate-user"
type Access = Authenticated
type Input = UserIdInput
type Output = SessionOutput
async fn call( &self, ctx: Ctx<D, Authenticated>, input: UserIdInput, ) -> Result<SessionOutput, AuthError>
Auto Trait Implementations§
impl Forget for ImpersonateUser
impl Freeze for ImpersonateUser
impl Move for ImpersonateUser
impl RefUnwindSafe for ImpersonateUser
impl Send for ImpersonateUser
impl Sync for ImpersonateUser
impl Unpin for ImpersonateUser
impl UnsafeUnpin for ImpersonateUser
impl UnwindSafe for ImpersonateUser
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more