#[non_exhaustive]pub struct Implicit { /* private fields */ }
Implementations
sourceimpl Implicit
impl Implicit
sourcepub fn new<S: Into<String>>(
authorization_url: S,
scopes: HashMap<String, String>
) -> Self
pub fn new<S: Into<String>>(
authorization_url: S,
scopes: HashMap<String, String>
) -> Self
Construct a new implicit oauth2 flow.
Accepts two arguments: one which is authorization url and second map of scopes. Scopes can also be an empty map.
Examples
Create new implicit flow with scopes.
Implicit::new(
"http://localhost/auth/dialog",
HashMap::from([
("edit:items".to_string(), "edit my items".to_string()),
("read:items".to_string(), "read my items".to_string()
)]),
);
Create new implicit flow without any scopes.
Implicit::new(
"http://localhost/auth/dialog",
HashMap::new(),
);
sourcepub fn with_refresh_url<S: Into<String>>(self, refresh_url: S) -> Self
pub fn with_refresh_url<S: Into<String>>(self, refresh_url: S) -> Self
Add refresh url for getting refresh tokens.
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Implicit
impl<'de> Deserialize<'de> for Implicit
sourcefn 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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for Implicit
impl Send for Implicit
impl Sync for Implicit
impl Unpin for Implicit
impl UnwindSafe for Implicit
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more