pub struct Client { /* private fields */ }
Expand description
The authly client handle.
Implementations§
Source§impl Client
impl Client
Sourcepub fn builder() -> ClientBuilder
pub fn builder() -> ClientBuilder
Construct a new builder.
Sourcepub async fn metadata(&self) -> Result<ServiceMetadata, Error>
pub async fn metadata(&self) -> Result<ServiceMetadata, Error>
Retrieve the ServiceMetadata about service this client identifies as.
Sourcepub fn access_control_request(&self) -> AccessControlRequestBuilder<'_>
pub fn access_control_request(&self) -> AccessControlRequestBuilder<'_>
Make a new access control request, returning a builder for building it.
Sourcepub fn get_resource_property_mapping(&self) -> Arc<NamespacePropertyMapping>
pub fn get_resource_property_mapping(&self) -> Arc<NamespacePropertyMapping>
Get the current resource properties of this service, in the form of a [PropertyMapping].
Sourcepub fn decode_access_token(
&self,
access_token: impl Into<String>,
) -> Result<Arc<AccessToken>, Error>
pub fn decode_access_token( &self, access_token: impl Into<String>, ) -> Result<Arc<AccessToken>, Error>
Decode and validate an Authly AccessToken. The access token usually represents an entity which is a user of the system.
Sourcepub async fn get_access_token(
&self,
session_token: &str,
) -> Result<Arc<AccessToken>, Error>
pub async fn get_access_token( &self, session_token: &str, ) -> Result<Arc<AccessToken>, Error>
Exchange a session token for an access token suitable for evaluating access control.
Sourcepub async fn generate_server_tls_params(
&self,
common_name: &str,
) -> Result<(CertificateDer<'static>, PrivateKeyDer<'static>), Error>
pub async fn generate_server_tls_params( &self, common_name: &str, ) -> Result<(CertificateDer<'static>, PrivateKeyDer<'static>), Error>
Generate a server certificate and a key pair for the service.
This involves sending a Certificate Signing Request for Authly to resolve.
Returns a pair of Certificate signed by the Authly Local CA, and the matching private key to be used by the server.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Client
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request