WeChat.Plug.CheckOauth2 (wechat v0.2.0)

检查是否有网页授权

Usage

服务器角色为 client

plug WeChat.Plug.CheckOauth2, client: Client, path_prefix: "/wx/oauth2", scope: "snsapi_base", state: ""

可选参数:

  • :path_prefix: 默认值为 "/wx/oauth2"
  • :scope: "snsapi_base" | "snsapi_userinfo", 默认值为 "snsapi_base"
  • :state: 默认值为 ""

检测到未授权将会跳转到下面这个链接:

/wx/oauth2/:code_name/callback/*path?xx=xx

服务器角色为 hub_client

plug WeChat.Plug.CheckOauth2, client: Client

检测到未授权将会跳转到下面这个链接:

HubOauth2Url <> "*path?xx=xx"

Link to this section Summary

Link to this section Functions