pub struct RiOAuthProvider {
pub id: String,
pub name: String,
pub client_id: String,
pub client_secret: String,
pub auth_url: String,
pub token_url: String,
pub user_info_url: String,
pub scopes: Vec<String>,
pub enabled: bool,
pub redirect_uri: Option<String>,
pub allowed_redirect_uris: Vec<String>,
}Expand description
OAuth provider configuration.
This struct defines the configuration for an OAuth identity provider, including client credentials, endpoints, scopes, and redirect URI.
Fields§
§id: StringUnique identifier for the OAuth provider
name: StringHuman-readable name of the provider (e.g., “Google”, “GitHub”)
client_id: StringOAuth client ID issued by the provider
client_secret: StringOAuth client secret issued by the provider
auth_url: StringAuthorization endpoint URL for initiating OAuth flow
token_url: StringToken endpoint URL for exchanging authorization codes
user_info_url: StringUser information endpoint URL for retrieving user details
scopes: Vec<String>Requested OAuth scopes (e.g., “openid”, “email”, “profile”)
enabled: boolWhether the provider is enabled for authentication
redirect_uri: Option<String>Redirect URI for OAuth callback (defaults to “http://localhost:8080/auth/callback” if not set)
allowed_redirect_uris: Vec<String>Whitelist of allowed redirect URI patterns (for security validation)
Trait Implementations§
Source§impl Clone for RiOAuthProvider
impl Clone for RiOAuthProvider
Source§fn clone(&self) -> RiOAuthProvider
fn clone(&self) -> RiOAuthProvider
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RiOAuthProvider
impl Debug for RiOAuthProvider
Source§impl<'de> Deserialize<'de> for RiOAuthProvider
impl<'de> Deserialize<'de> for RiOAuthProvider
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl<'py> IntoPyObject<'py> for RiOAuthProvider
impl<'py> IntoPyObject<'py> for RiOAuthProvider
Source§type Target = RiOAuthProvider
type Target = RiOAuthProvider
Source§type Output = Bound<'py, <RiOAuthProvider as IntoPyObject<'py>>::Target>
type Output = Bound<'py, <RiOAuthProvider as IntoPyObject<'py>>::Target>
Source§fn into_pyobject(
self,
py: Python<'py>,
) -> Result<<Self as IntoPyObject<'_>>::Output, <Self as IntoPyObject<'_>>::Error>
fn into_pyobject( self, py: Python<'py>, ) -> Result<<Self as IntoPyObject<'_>>::Output, <Self as IntoPyObject<'_>>::Error>
Source§impl PyClass for RiOAuthProvider
impl PyClass for RiOAuthProvider
Source§impl PyClassImpl for RiOAuthProvider
impl PyClassImpl for RiOAuthProvider
Source§const IS_BASETYPE: bool = false
const IS_BASETYPE: bool = false
Source§const IS_SUBCLASS: bool = false
const IS_SUBCLASS: bool = false
Source§const IS_MAPPING: bool = false
const IS_MAPPING: bool = false
Source§const IS_SEQUENCE: bool = false
const IS_SEQUENCE: bool = false
Source§const IS_IMMUTABLE_TYPE: bool = false
const IS_IMMUTABLE_TYPE: bool = false
Source§const RAW_DOC: &'static CStr = c"OAuth provider configuration.\n\nThis struct defines the configuration for an OAuth identity provider,\nincluding client credentials, endpoints, scopes, and redirect URI.\x00"
const RAW_DOC: &'static CStr = c"OAuth provider configuration.\n\nThis struct defines the configuration for an OAuth identity provider,\nincluding client credentials, endpoints, scopes, and redirect URI.\x00"
Source§const DOC: &'static CStr
const DOC: &'static CStr
text_signature if a constructor is defined. Read moreSource§type ThreadChecker = SendablePyClass<RiOAuthProvider>
type ThreadChecker = SendablePyClass<RiOAuthProvider>
Source§type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
Source§type BaseNativeType = PyAny
type BaseNativeType = PyAny
PyAny by default, and when you declare
#[pyclass(extends=PyDict)], it’s PyDict.fn items_iter() -> PyClassItemsIter
fn lazy_type_object() -> &'static LazyTypeObject<Self>
fn dict_offset() -> Option<isize>
fn weaklist_offset() -> Option<isize>
Source§impl PyClassNewTextSignature for RiOAuthProvider
impl PyClassNewTextSignature for RiOAuthProvider
const TEXT_SIGNATURE: &'static str = "(id, name, client_id, client_secret, auth_url, token_url, user_info_url, scopes, enabled, redirect_uri, allowed_redirect_uris)"
Source§impl PyMethods<RiOAuthProvider> for PyClassImplCollector<RiOAuthProvider>
impl PyMethods<RiOAuthProvider> for PyClassImplCollector<RiOAuthProvider>
fn py_methods(self) -> &'static PyClassItems
Source§impl PyTypeInfo for RiOAuthProvider
impl PyTypeInfo for RiOAuthProvider
Source§fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
§fn type_object(py: Python<'_>) -> Bound<'_, PyType>
fn type_object(py: Python<'_>) -> Bound<'_, PyType>
§fn is_type_of(object: &Bound<'_, PyAny>) -> bool
fn is_type_of(object: &Bound<'_, PyAny>) -> bool
object is an instance of this type or a subclass of this type.§fn is_exact_type_of(object: &Bound<'_, PyAny>) -> bool
fn is_exact_type_of(object: &Bound<'_, PyAny>) -> bool
object is an instance of this type.Source§impl Serialize for RiOAuthProvider
impl Serialize for RiOAuthProvider
impl DerefToPyAny for RiOAuthProvider
impl ExtractPyClassWithClone for RiOAuthProvider
Auto Trait Implementations§
impl Freeze for RiOAuthProvider
impl RefUnwindSafe for RiOAuthProvider
impl Send for RiOAuthProvider
impl Sync for RiOAuthProvider
impl Unpin for RiOAuthProvider
impl UnsafeUnpin for RiOAuthProvider
impl UnwindSafe for RiOAuthProvider
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> FitForCBox for T
impl<T> FitForCBox for T
type CBoxWrapped = Box_<T>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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>
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§impl<'py, T> IntoPyObjectExt<'py> for Twhere
T: IntoPyObject<'py>,
impl<'py, T> IntoPyObjectExt<'py> for Twhere
T: IntoPyObject<'py>,
§fn into_bound_py_any(self, py: Python<'py>) -> Result<Bound<'py, PyAny>, PyErr>
fn into_bound_py_any(self, py: Python<'py>) -> Result<Bound<'py, PyAny>, PyErr>
self into an owned Python object, dropping type information.§fn into_py_any(self, py: Python<'py>) -> Result<Py<PyAny>, PyErr>
fn into_py_any(self, py: Python<'py>) -> Result<Py<PyAny>, PyErr>
self into an owned Python object, dropping type information and unbinding it
from the 'py lifetime.§fn into_pyobject_or_pyerr(self, py: Python<'py>) -> Result<Self::Output, PyErr>
fn into_pyobject_or_pyerr(self, py: Python<'py>) -> Result<Self::Output, PyErr>
self into a Python object. Read moreSource§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>
T in a tonic::RequestSource§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>
T in a tonic::Request§impl<T> ManuallyDropMut for T
impl<T> ManuallyDropMut for T
type Ret = ManuallyDrop<T>
fn manually_drop_mut<'__>(&'__ mut self) -> &'__ mut ManuallyDrop<T>
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PyErrArguments for T
impl<T> PyErrArguments for T
§impl<T> PyTypeCheck for Twhere
T: PyTypeInfo,
impl<T> PyTypeCheck for Twhere
T: PyTypeInfo,
§const NAME: &'static str = T::NAME
const NAME: &'static str = T::NAME
Use ::classinfo_object() instead and format the type name at runtime. Note that using built-in cast features is often better than manual PyTypeCheck usage.
§fn type_check(object: &Bound<'_, PyAny>) -> bool
fn type_check(object: &Bound<'_, PyAny>) -> bool
§fn classinfo_object(py: Python<'_>) -> Bound<'_, PyAny>
fn classinfo_object(py: Python<'_>) -> Bound<'_, PyAny>
isinstance and issubclass function. Read more