pub struct IamCertLdapServ;Implementations§
Source§impl IamCertLdapServ
impl IamCertLdapServ
pub async fn add_cert_conf( add_req: &IamCertConfLdapAddOrModifyReq, rel_iam_item_id: Option<String>, funs: &TardisFunsInst, ctx: &TardisContext, ) -> TardisResult<String>
pub async fn modify_cert_conf( id: &str, modify_req: &IamCertConfLdapAddOrModifyReq, funs: &TardisFunsInst, ctx: &TardisContext, ) -> TardisResult<()>
pub async fn validate_cert_conf( add_req: &IamCertConfLdapAddOrModifyReq, funs: &TardisFunsInst, ) -> TardisResult<()>
pub async fn get_cert_conf_by_ctx( funs: &TardisFunsInst, ctx: &TardisContext, ) -> TardisResult<Option<IamCertConfLdapResp>>
pub async fn get_cert_conf( id: &str, funs: &TardisFunsInst, ctx: &TardisContext, ) -> TardisResult<IamCertConfLdapResp>
pub async fn add_or_modify_cert( add_or_modify_req: &IamCertLdapAddOrModifyReq, account_id: &str, rel_rbum_cert_conf_id: &str, funs: &TardisFunsInst, ctx: &TardisContext, ) -> TardisResult<()>
Sourcepub async fn get_cert_rel_account_by_dn(
dn: &str,
rel_rbum_cert_conf_id: &str,
funs: &TardisFunsInst,
ctx: &TardisContext,
) -> TardisResult<Option<String>>
pub async fn get_cert_rel_account_by_dn( dn: &str, rel_rbum_cert_conf_id: &str, funs: &TardisFunsInst, ctx: &TardisContext, ) -> TardisResult<Option<String>>
获取dn对应的account_id
pub async fn batch_get_or_add_account_without_verify( add_req: IamAccountExtSysBatchAddReq, tenant_id: Option<String>, funs: &TardisFunsInst, ctx: &TardisContext, ) -> TardisResult<IamAccountAddByLdapResp>
Sourcepub async fn get_or_add_account_without_verify(
add_req: IamAccountExtSysAddReq,
tenant_id: Option<String>,
funs: &TardisFunsInst,
ctx: &TardisContext,
) -> TardisResult<(String, String)>
pub async fn get_or_add_account_without_verify( add_req: IamAccountExtSysAddReq, tenant_id: Option<String>, funs: &TardisFunsInst, ctx: &TardisContext, ) -> TardisResult<(String, String)>
根据add_req的account_id(dn)获取或者添加账号 始终返回(account_id,dn)
pub async fn get_account_with_verify( user_name: &str, password: &str, tenant_id: Option<String>, code: &str, funs: &TardisFunsInst, ) -> TardisResult<Option<(String, String)>>
pub async fn search_accounts( user_or_display_name: &str, tenant_id: Option<String>, code: &str, funs: &TardisFunsInst, ctx: &TardisContext, ) -> TardisResult<Vec<IamAccountExtSysResp>>
pub async fn check_user_pwd_is_bind( ak: &str, supplier: &str, tenant_id: Option<String>, funs: &TardisFunsInst, ) -> TardisResult<bool>
pub async fn validate_by_ldap( sk: &str, supplier: &str, funs: &TardisFunsInst, ctx: &TardisContext, ) -> TardisResult<bool>
pub async fn bind_or_create_user_pwd_by_ldap( login_req: &IamCpUserPwdBindWithLdapReq, funs: &TardisFunsInst, ) -> TardisResult<(String, String)>
pub async fn bind_user_pwd_by_ldap( ldap_id: &str, user_name: &str, password: &str, cert_conf_id: &str, tenant_id: Option<String>, code: &str, funs: &TardisFunsInst, ctx: &TardisContext, ) -> TardisResult<String>
pub async fn iam_sync_ldap_user_to_iam( sync_config: IamThirdIntegrationConfigDto, funs: &TardisFunsInst, ctx: &TardisContext, ) -> TardisResult<String>
pub async fn generate_default_mock_ctx( supplier: &str, tenant_id: Option<String>, funs: &TardisFunsInst, ) -> TardisContext
pub async fn get_ldap_resp_by_cn( cn: &str, funs: &TardisFunsInst, ctx: &TardisContext, ) -> TardisResult<Vec<IamAccountExtSysResp>>
Sourcepub fn dn_to_cn(dn: &str) -> String
pub fn dn_to_cn(dn: &str) -> String
§Examples
use bios_iam::basic::serv::iam_cert_ldap_serv::IamCertLdapServ;
assert_eq!(IamCertLdapServ::dn_to_cn("cn=admin,ou=x,dc=x,dc=x"), "admin".to_string());
assert_eq!(IamCertLdapServ::dn_to_cn("ou=x,dc=x,dc=x"), "ou=x,dc=x,dc=x".to_string());
assert_eq!(IamCertLdapServ::dn_to_cn("cn=,ou=x,dc=x,dc=x"), "".to_string());
assert_eq!(IamCertLdapServ::dn_to_cn("hello world"), "hello world".to_string());Auto Trait Implementations§
impl Freeze for IamCertLdapServ
impl RefUnwindSafe for IamCertLdapServ
impl Send for IamCertLdapServ
impl Sync for IamCertLdapServ
impl Unpin for IamCertLdapServ
impl UnwindSafe for IamCertLdapServ
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> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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