1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! The type around OAuth process.

use serde::Deserialize;

/// The type that represents a query when redirected.
#[derive(Deserialize, Debug, Clone)]
pub struct OauthRedirectQuery {
    /// The temporary authorization code.
    code: String,
}

impl OauthRedirectQuery {
    /// Takes the reference of the `code`.
    pub fn code(&self) -> &str {
        self.code.as_str()
    }
}