pub struct SASLAuthStartupHandler<P> { /* private fields */ }Expand description
Startup handler for SASL-based authentication (SCRAM and OAUTHBEARER).
Implementations§
Source§impl<P> SASLAuthStartupHandler<P>
impl<P> SASLAuthStartupHandler<P>
Sourcepub fn with_scram(self, scram_auth: ScramAuth) -> Self
pub fn with_scram(self, scram_auth: ScramAuth) -> Self
Configures SCRAM authentication.
Sourcepub fn with_oauth(self, oauth: Oauth) -> Self
pub fn with_oauth(self, oauth: Oauth) -> Self
Configures OAuth authentication.
Sourcepub fn with_pid_secret_key_generator(
self,
generator: Arc<dyn PidSecretKeyGenerator>,
) -> Self
pub fn with_pid_secret_key_generator( self, generator: Arc<dyn PidSecretKeyGenerator>, ) -> Self
Sets a custom PID/secret key generator.
Sourcepub fn with_connection_manager(self, manager: Arc<ConnectionManager>) -> Self
pub fn with_connection_manager(self, manager: Arc<ConnectionManager>) -> Self
Sets a connection manager.
Trait Implementations§
Source§impl<P: ServerParameterProvider> StartupHandler for SASLAuthStartupHandler<P>
impl<P: ServerParameterProvider> StartupHandler for SASLAuthStartupHandler<P>
Source§fn on_startup<'life0, 'life1, 'async_trait, C>(
&'life0 self,
client: &'life1 mut C,
message: PgWireFrontendMessage,
) -> Pin<Box<dyn Future<Output = PgWireResult<()>> + Send + 'async_trait>>where
C: ClientInfo + Sink<PgWireBackendMessage> + Unpin + Send + Sync + 'async_trait,
C::Error: Debug,
PgWireError: From<<C as Sink<PgWireBackendMessage>>::Error>,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn on_startup<'life0, 'life1, 'async_trait, C>(
&'life0 self,
client: &'life1 mut C,
message: PgWireFrontendMessage,
) -> Pin<Box<dyn Future<Output = PgWireResult<()>> + Send + 'async_trait>>where
C: ClientInfo + Sink<PgWireBackendMessage> + Unpin + Send + Sync + 'async_trait,
C::Error: Debug,
PgWireError: From<<C as Sink<PgWireBackendMessage>>::Error>,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
A generic frontend message callback during startup phase.
Auto Trait Implementations§
impl<P> !Freeze for SASLAuthStartupHandler<P>
impl<P> !RefUnwindSafe for SASLAuthStartupHandler<P>
impl<P> !UnwindSafe for SASLAuthStartupHandler<P>
impl<P> Send for SASLAuthStartupHandler<P>
impl<P> Sync for SASLAuthStartupHandler<P>
impl<P> Unpin for SASLAuthStartupHandler<P>
impl<P> UnsafeUnpin for SASLAuthStartupHandler<P>
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