pub struct AuthRouter { /* private fields */ }Implementations§
Source§impl AuthRouter
impl AuthRouter
pub fn new(context: AuthContext, endpoints: Vec<AuthEndpoint>) -> Self
pub fn try_new( context: AuthContext, endpoints: Vec<AuthEndpoint>, ) -> Result<Self, RustAuthError>
pub fn with_async_endpoints( context: AuthContext, endpoints: Vec<AuthEndpoint>, async_endpoints: Vec<AsyncAuthEndpoint>, ) -> Result<Self, RustAuthError>
pub fn endpoint_registry(&self) -> Vec<EndpointInfo>
pub fn openapi_schema(&self) -> Value
pub fn handle(&self, request: ApiRequest) -> Result<ApiResponse, RustAuthError>
pub async fn handle_async( &self, request: ApiRequest, ) -> Result<ApiResponse, RustAuthError>
Sourcepub async fn handle_async_server(
&self,
request: ApiRequest,
) -> Result<ApiResponse, RustAuthError>
pub async fn handle_async_server( &self, request: ApiRequest, ) -> Result<ApiResponse, RustAuthError>
Handle a request from trusted server-side code.
Runs the same pipeline as handle_async but marks
the request as non-internet-facing, allowing endpoints to honor
server-only inputs (such as an explicit user id) that must never be
trusted from internet clients.
Trait Implementations§
Source§impl Clone for AuthRouter
impl Clone for AuthRouter
Source§fn clone(&self) -> AuthRouter
fn clone(&self) -> AuthRouter
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for AuthRouter
impl !UnwindSafe for AuthRouter
impl Freeze for AuthRouter
impl Send for AuthRouter
impl Sync for AuthRouter
impl Unpin for AuthRouter
impl UnsafeUnpin for AuthRouter
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