[−][src]Struct wechat_mp::WechatConfig
微信基本配置
Fields
echo_token: String
对接的token
key: Option<Vec<u8>>
加密的密钥
app_id: String
app id
app_secret: String
app secret
oauth_redirect_url: String
1、在微信公众号请求用户网页授权之前,开发者需要先到公众平台官网中的 “开发 - 接口权限 - 网页服务 - 网页帐号 - 网页授权获取用户基本信息”的配置选项中,修改授权回调域名。 请注意,这里填写的是域名(是一个字符串),而不是URL,因此请勿加 http:// 等协议头;
授权回调域名配置规范为全域名,比如需要网页授权的域名为:www.qq.com, 配置以后此域名下面的页面http://www.qq.com/music.html 、 http://www.qq.com/login.html 都可以进行OAuth2.0鉴权。 但http://pay.qq.com 、 http://music.qq.com 、 http://qq.com 无法进行OAuth2.0鉴权
Implementations
impl WechatConfig
[src]
pub fn decode_aes_key(
key: &String
) -> Result<Option<Vec<u8>>, WechatEncryptError>
[src]
key: &String
) -> Result<Option<Vec<u8>>, WechatEncryptError>
pub fn new(
key: Option<Vec<u8>>,
app_id: String,
app_secret: String,
echo_token: String,
oauth_redirect_url: String
) -> Self
[src]
key: Option<Vec<u8>>,
app_id: String,
app_secret: String,
echo_token: String,
oauth_redirect_url: String
) -> Self
Trait Implementations
impl Clone for WechatConfig
[src]
fn clone(&self) -> WechatConfig
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for WechatConfig
[src]
impl Default for WechatConfig
[src]
impl<'de> Deserialize<'de> for WechatConfig
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Serialize for WechatConfig
[src]
Auto Trait Implementations
impl RefUnwindSafe for WechatConfig
impl Send for WechatConfig
impl Sync for WechatConfig
impl Unpin for WechatConfig
impl UnwindSafe for WechatConfig
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Any for T where
T: Any,
T: Any,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> CloneAny for T where
T: Clone + Any,
T: Clone + Any,
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T> Interface for T where
T: Send + Sync + Any,
[src]
T: Send + Sync + Any,
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ModuleInterface for T where
T: Send + Sync + Any,
[src]
T: Send + Sync + Any,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,