Skip to main content

SASLAuthStartupHandler

Struct SASLAuthStartupHandler 

Source
pub struct SASLAuthStartupHandler<P> { /* private fields */ }
Expand description

Startup handler for SASL-based authentication (SCRAM and OAUTHBEARER).

Implementations§

Source§

impl<P> SASLAuthStartupHandler<P>

Source

pub fn new(parameter_provider: Arc<P>) -> Self

Creates a new SASL auth handler.

Source

pub fn with_scram(self, scram_auth: ScramAuth) -> Self

Configures SCRAM authentication.

Source

pub fn with_oauth(self, oauth: Oauth) -> Self

Configures OAuth authentication.

Source

pub fn with_pid_secret_key_generator( self, generator: Arc<dyn PidSecretKeyGenerator>, ) -> Self

Sets a custom PID/secret key generator.

Source

pub fn with_connection_manager(self, manager: Arc<ConnectionManager>) -> Self

Sets a connection manager.

Trait Implementations§

Source§

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,

A generic frontend message callback during startup phase.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.