pub struct MockAuthApi { /* private fields */ }auth_api only.Implementations§
Source§impl MockAuthApi
impl MockAuthApi
Sourcepub fn checkpoint(&mut self)
pub fn checkpoint(&mut self)
Validate that all current expectations for all methods have been satisfied, and discard them.
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new mock object with no expectations.
This method will not be generated if the real struct
already has a new method. However, it will be
generated if the struct implements a trait with a new
method. The trait’s new method can still be called
like <MockX as TraitY>::new
Source§impl MockAuthApi
impl MockAuthApi
Sourcepub fn expect_delete_session(&mut self) -> &mut Expectation
pub fn expect_delete_session(&mut self) -> &mut Expectation
Create an Expectation for mocking the delete_session method
Sourcepub fn expect_get_api_tokens(&mut self) -> &mut Expectation
pub fn expect_get_api_tokens(&mut self) -> &mut Expectation
Create an Expectation for mocking the get_api_tokens method
Sourcepub fn expect_get_o_auth_token(&mut self) -> &mut Expectation
pub fn expect_get_o_auth_token(&mut self) -> &mut Expectation
Create an Expectation for mocking the get_o_auth_token method
Sourcepub fn expect_get_sessions_for_current_user(&mut self) -> &mut Expectation
pub fn expect_get_sessions_for_current_user(&mut self) -> &mut Expectation
Create an Expectation for mocking the get_sessions_for_current_user method
Sourcepub fn expect_remove_api_token(&mut self) -> &mut Expectation
pub fn expect_remove_api_token(&mut self) -> &mut Expectation
Create an Expectation for mocking the remove_api_token method
Trait Implementations§
Source§impl AuthApi for MockAuthApi
impl AuthApi for MockAuthApi
Source§fn delete_session<'id, 'refresh_token, 'life0, 'async_trait>(
&'life0 self,
id: Option<&'id str>,
refresh_token: Option<&'refresh_token str>,
) -> Pin<Box<dyn Future<Output = Result<(), Error<DeleteSessionError>>> + Send + 'async_trait>>where
Self: 'async_trait,
'id: 'async_trait,
'refresh_token: 'async_trait,
'life0: 'async_trait,
fn delete_session<'id, 'refresh_token, 'life0, 'async_trait>(
&'life0 self,
id: Option<&'id str>,
refresh_token: Option<&'refresh_token str>,
) -> Pin<Box<dyn Future<Output = Result<(), Error<DeleteSessionError>>> + Send + 'async_trait>>where
Self: 'async_trait,
'id: 'async_trait,
'refresh_token: 'async_trait,
'life0: 'async_trait,
POST /auth/logout
Source§fn get_api_tokens<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<UserApiTokenDto>, Error<GetApiTokensError>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_api_tokens<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<UserApiTokenDto>, Error<GetApiTokensError>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
GET /auth/apitokens
Source§fn get_o_auth_token<'use_cookie, 'client_id, 'code, 'code_verifier, 'grant_type, 'redirect_uri, 'refresh_token, 'life0, 'async_trait>(
&'life0 self,
use_cookie: Option<bool>,
client_id: Option<&'client_id str>,
code: Option<&'code str>,
code_verifier: Option<&'code_verifier str>,
grant_type: Option<&'grant_type str>,
redirect_uri: Option<&'redirect_uri str>,
refresh_token: Option<&'refresh_token str>,
) -> Pin<Box<dyn Future<Output = Result<TokenResponseDto, Error<GetOAuthTokenError>>> + Send + 'async_trait>>where
Self: 'async_trait,
'use_cookie: 'async_trait,
'client_id: 'async_trait,
'code: 'async_trait,
'code_verifier: 'async_trait,
'grant_type: 'async_trait,
'redirect_uri: 'async_trait,
'refresh_token: 'async_trait,
'life0: 'async_trait,
fn get_o_auth_token<'use_cookie, 'client_id, 'code, 'code_verifier, 'grant_type, 'redirect_uri, 'refresh_token, 'life0, 'async_trait>(
&'life0 self,
use_cookie: Option<bool>,
client_id: Option<&'client_id str>,
code: Option<&'code str>,
code_verifier: Option<&'code_verifier str>,
grant_type: Option<&'grant_type str>,
redirect_uri: Option<&'redirect_uri str>,
refresh_token: Option<&'refresh_token str>,
) -> Pin<Box<dyn Future<Output = Result<TokenResponseDto, Error<GetOAuthTokenError>>> + Send + 'async_trait>>where
Self: 'async_trait,
'use_cookie: 'async_trait,
'client_id: 'async_trait,
'code: 'async_trait,
'code_verifier: 'async_trait,
'grant_type: 'async_trait,
'redirect_uri: 'async_trait,
'refresh_token: 'async_trait,
'life0: 'async_trait,
POST /auth/token
Source§fn get_sessions_for_current_user<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<UserSessionDto>, Error<GetSessionsForCurrentUserError>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_sessions_for_current_user<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<UserSessionDto>, Error<GetSessionsForCurrentUserError>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
GET /auth/sessions