pub struct Kerberos { /* private fields */ }
Implementations§
source§impl Kerberos
impl Kerberos
pub fn new_client_from_config(config: KerberosConfig) -> Result<Self>
pub fn new_server_from_config(config: KerberosConfig) -> Result<Self>
pub fn config(&self) -> &KerberosConfig
pub fn next_seq_number(&mut self) -> u32
pub fn get_kdc(&self) -> Option<(String, Url)>
pub async fn as_exchange( &mut self, yield_point: &mut YieldPoint<NetworkRequest, Result<Vec<u8>>>, kdc_req_body: &KdcReqBody, pa_data_options: AsReqPaDataOptions<'_> ) -> Result<AsRep>
source§impl<'a> Kerberos
impl<'a> Kerberos
pub async fn change_password( &'a mut self, yield_point: &mut YieldPoint<NetworkRequest, Result<Vec<u8>>>, change_password: ChangePassword<'a> ) -> Result<()>
Trait Implementations§
source§impl Sspi for Kerberos
impl Sspi for Kerberos
source§fn complete_auth_token(
&mut self,
_token: &mut [SecurityBuffer]
) -> Result<SecurityStatus>
fn complete_auth_token( &mut self, _token: &mut [SecurityBuffer] ) -> Result<SecurityStatus>
Completes an authentication token. This function is used by protocols, such as DCE,
that need to revise the security information after the transport application has updated some message parameters. Read more
source§fn encrypt_message(
&mut self,
_flags: EncryptionFlags,
message: &mut [SecurityBuffer],
_sequence_number: u32
) -> Result<SecurityStatus>
fn encrypt_message( &mut self, _flags: EncryptionFlags, message: &mut [SecurityBuffer], _sequence_number: u32 ) -> Result<SecurityStatus>
Encrypts a message to provide privacy. The function allows the application to choose among cryptographic algorithms supported by the chosen mechanism.
Some packages do not have messages to be encrypted or decrypted but rather provide an integrity hash that can be checked. Read more
source§fn decrypt_message(
&mut self,
message: &mut [DecryptBuffer<'_>],
_sequence_number: u32
) -> Result<DecryptionFlags>
fn decrypt_message( &mut self, message: &mut [DecryptBuffer<'_>], _sequence_number: u32 ) -> Result<DecryptionFlags>
Decrypts a message. Some packages do not encrypt and decrypt messages but rather perform and check an integrity hash. Read more
source§fn query_context_sizes(&mut self) -> Result<ContextSizes>
fn query_context_sizes(&mut self) -> Result<ContextSizes>
Retrieves information about the bounds of sizes of authentication information of the current security principal. Read more
source§fn query_context_names(&mut self) -> Result<ContextNames>
fn query_context_names(&mut self) -> Result<ContextNames>
Retrieves the username of the credential associated to the context. Read more
source§fn query_context_package_info(&mut self) -> Result<PackageInfo>
fn query_context_package_info(&mut self) -> Result<PackageInfo>
Retrieves information about the specified security package. This information includes the bounds of sizes of authentication information, credentials, and contexts. Read more
source§fn query_context_cert_trust_status(&mut self) -> Result<CertTrustStatus>
fn query_context_cert_trust_status(&mut self) -> Result<CertTrustStatus>
Retrieves the trust information of the certificate. Read more
source§fn change_password<'a>(
&'a mut self,
change_password: ChangePassword<'a>
) -> Result<GeneratorChangePassword<'_>>
fn change_password<'a>( &'a mut self, change_password: ChangePassword<'a> ) -> Result<GeneratorChangePassword<'_>>
Changes the password for a Windows domain account. Read more
source§fn acquire_credentials_handle<'a>(
&mut self
) -> EmptyAcquireCredentialsHandle<'a, Self::CredentialsHandle, Self::AuthenticationData>
fn acquire_credentials_handle<'a>( &mut self ) -> EmptyAcquireCredentialsHandle<'a, Self::CredentialsHandle, Self::AuthenticationData>
Acquires a handle to preexisting credentials of a security principal. The preexisting credentials are
available only for
sspi::winapi
module. This handle is required by the initialize_security_context
and accept_security_context
functions. These can be either preexisting credentials, which are
established through a system logon, or the caller can provide alternative credentials. Alternative
credentials are always required to specify when using platform independent SSPs. Read moresource§fn initialize_security_context<'a>(
&mut self
) -> EmptyInitializeSecurityContext<'a, Self::CredentialsHandle>
fn initialize_security_context<'a>( &mut self ) -> EmptyInitializeSecurityContext<'a, Self::CredentialsHandle>
Initiates the client side, outbound security context from a credential handle.
The function is used to build a security context between the client application and a remote peer. The function returns a token
that the client must pass to the remote peer, which the peer in turn submits to the local security implementation through the
accept_security_context
call. Read moresource§fn accept_security_context<'a>(
&mut self
) -> EmptyAcceptSecurityContext<'a, Self::CredentialsHandle>
fn accept_security_context<'a>( &mut self ) -> EmptyAcceptSecurityContext<'a, Self::CredentialsHandle>
Lets the server component of a transport application establish a security context between the server and a remote client.
The remote client calls the
initialize_security_context
function to start the process of establishing a security context.
The server can require one or more reply tokens from the remote client to complete establishing the security context. Read moresource§fn query_context_stream_sizes(&mut self) -> Result<StreamSizes>
fn query_context_stream_sizes(&mut self) -> Result<StreamSizes>
Queries the sizes of the various parts of a stream used in the per-message functions. This function is implemented only for CredSSP security package. Read more
source§fn query_context_remote_cert(&mut self) -> Result<CertContext>
fn query_context_remote_cert(&mut self) -> Result<CertContext>
Retrieves the information about the end certificate supplied by the server. This function is implemented only for CredSSP security package. Read more
source§fn query_context_negotiation_package(&mut self) -> Result<PackageInfo>
fn query_context_negotiation_package(&mut self) -> Result<PackageInfo>
Retrieves the information about the negotiated security package. This function is implemented only for CredSSP security package. Read more
source§fn query_context_connection_info(&mut self) -> Result<ConnectionInfo>
fn query_context_connection_info(&mut self) -> Result<ConnectionInfo>
Returns detailed information on the established connection. This function is implemented only for CredSSP security package. Read more
source§impl SspiEx for Kerberos
impl SspiEx for Kerberos
fn custom_set_auth_identity( &mut self, identity: Self::AuthenticationData ) -> Result<()>
source§impl SspiImpl for Kerberos
impl SspiImpl for Kerberos
§type CredentialsHandle = Option<CredentialsBuffers>
type CredentialsHandle = Option<CredentialsBuffers>
Represents raw data for authentication
§type AuthenticationData = Credentials
type AuthenticationData = Credentials
Represents authentication data prepared for the authentication process
fn acquire_credentials_handle_impl( &mut self, builder: FilledAcquireCredentialsHandle<'_, Self::CredentialsHandle, Self::AuthenticationData> ) -> Result<AcquireCredentialsHandleResult<Self::CredentialsHandle>>
fn accept_security_context_impl( &mut self, builder: FilledAcceptSecurityContext<'_, Self::CredentialsHandle> ) -> Result<AcceptSecurityContextResult>
fn initialize_security_context_impl<'a>( &'a mut self, builder: &'a mut FilledInitializeSecurityContext<'_, Self::CredentialsHandle> ) -> Result<GeneratorInitSecurityContext<'_>>
Auto Trait Implementations§
impl Freeze for Kerberos
impl RefUnwindSafe for Kerberos
impl Send for Kerberos
impl Sync for Kerberos
impl Unpin for Kerberos
impl UnwindSafe for Kerberos
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