pub struct FapiManager { /* private fields */ }Expand description
FAPI 2.0 Security Profile Manager
Implementations§
Source§impl FapiManager
impl FapiManager
Sourcepub fn new(
config: FapiConfig,
dpop_manager: Arc<DpopManager>,
mtls_manager: Arc<MutualTlsManager>,
par_manager: Arc<PARManager>,
private_key_jwt_manager: Arc<PrivateKeyJwtManager>,
jwt_validator: Arc<SecureJwtValidator>,
) -> Self
pub fn new( config: FapiConfig, dpop_manager: Arc<DpopManager>, mtls_manager: Arc<MutualTlsManager>, par_manager: Arc<PARManager>, private_key_jwt_manager: Arc<PrivateKeyJwtManager>, jwt_validator: Arc<SecureJwtValidator>, ) -> Self
Create a new FAPI manager
Validate FAPI 2.0 authorization request
Sourcepub async fn authenticate_client_jwt(
&self,
client_assertion: &str,
) -> Result<String>
pub async fn authenticate_client_jwt( &self, client_assertion: &str, ) -> Result<String>
Authenticate client using private key JWT (RFC 7523)
Sourcepub async fn validate_token_request(
&self,
client_assertion: Option<&str>,
client_cert: Option<&str>,
dpop_proof: Option<&str>,
authorization_code: &str,
) -> Result<String>
pub async fn validate_token_request( &self, client_assertion: Option<&str>, client_cert: Option<&str>, dpop_proof: Option<&str>, authorization_code: &str, ) -> Result<String>
Validate FAPI token request with enhanced security
Generate FAPI 2.0 authorization response (JARM)
Sourcepub async fn generate_token_response(
&self,
client_id: &str,
user_id: &str,
scopes: Vec<String>,
cert_thumbprint: Option<String>,
dpop_jkt: Option<String>,
) -> Result<FapiTokenResponse>
pub async fn generate_token_response( &self, client_id: &str, user_id: &str, scopes: Vec<String>, cert_thumbprint: Option<String>, dpop_jkt: Option<String>, ) -> Result<FapiTokenResponse>
Generate FAPI 2.0 token response
Sourcepub async fn create_session(
&self,
client_id: &str,
user_id: &str,
scopes: Vec<String>,
dpop_proof: Option<String>,
cert_thumbprint: Option<String>,
request_jti: Option<String>,
) -> Result<String>
pub async fn create_session( &self, client_id: &str, user_id: &str, scopes: Vec<String>, dpop_proof: Option<String>, cert_thumbprint: Option<String>, request_jti: Option<String>, ) -> Result<String>
Create FAPI session
Sourcepub async fn get_session(&self, session_id: &str) -> Result<Option<FapiSession>>
pub async fn get_session(&self, session_id: &str) -> Result<Option<FapiSession>>
Get FAPI session
Sourcepub async fn validate_session(&self, session_id: &str) -> Result<FapiSession>
pub async fn validate_session(&self, session_id: &str) -> Result<FapiSession>
Validate FAPI session
Sourcepub async fn remove_session(&self, session_id: &str) -> Result<()>
pub async fn remove_session(&self, session_id: &str) -> Result<()>
Remove FAPI session
Trait Implementations§
Source§impl Clone for FapiManager
impl Clone for FapiManager
Source§fn clone(&self) -> FapiManager
fn clone(&self) -> FapiManager
Returns a duplicate of the value. Read more
1.0.0 · 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 Freeze for FapiManager
impl !RefUnwindSafe for FapiManager
impl Send for FapiManager
impl Sync for FapiManager
impl Unpin for FapiManager
impl !UnwindSafe for FapiManager
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more