コード例 #1
0
        public override string GetAuthorizationUrl(AuthenticationScope scope)
        {
            string url = string.Format("{0}/oauth2/authorize?client_id={1}&redirect_uri={2}&response_type=code&state={3}",
                                       this._options.AuthorizeUrl, this._options.AppId, Uri.EscapeDataString(string.Concat(_options.Host, _options.Callback)), scope.State);

            return(url);
        }
コード例 #2
0
        public override string GetAuthorizationUrl(AuthenticationScope scope)
        {
            string url = string.Format("{0}/connect/qrconnect?appid={1}&redirect_uri={2}&response_type=code&scope=snsapi_login&state={3}#wechat_redirect",
                                       this._options.AuthorizeUrl, this._options.AppId, Uri.EscapeDataString(string.Concat(_options.Host, _options.Callback)), scope.State);

            return(url);
        }
コード例 #3
0
        public override string GetAuthorizationUrl(AuthenticationScope scope)
        {
            string url = string.Empty;

            if (string.IsNullOrEmpty(scope.Scope))
            {
                url = string.Format("{0}/oauth2.0/authorize?response_type=code&client_id={1}&redirect_uri={2}&state={3}", _options.AuthorizeUrl, _options.AppId, string.Concat(_options.Host, _options.Callback), scope.State);
            }
            else
            {
                url = string.Format("{0}/oauth2.0/authorize?response_type=code&client_id={1}&redirect_uri={2}&state={3}&scope={4}", _options.AuthorizeUrl, _options.AppId, Uri.EscapeDataString(string.Concat(_options.Host, _options.Callback)), scope.State, scope.Scope);
            }
            return(url);
        }
コード例 #4
0
 public override string GetAuthorizationUrl(AuthenticationScope scope)
 {
     return(string.Format("{0}/connect/qrconnect?response_type=code&appid={1}&scope={2}&state={3}&redirect_uri={4}", _options.AuthorizeUrl, _options.AppId, scope.Scope, scope.State, Uri.EscapeDataString(string.Concat(_options.Host, _options.Callback))));
 }
コード例 #5
0
 /// <summary>
 /// 依据指定信息生成链接
 /// </summary>
 /// <param name="state"></param>
 /// <param name="scope"></param>
 /// <returns></returns>
 public virtual string GetAuthorizationUrl(AuthenticationScope scope)
 {
     return(_options.AuthorizeUrl);
 }