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); }
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); }
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); }
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)))); }
/// <summary> /// 依据指定信息生成链接 /// </summary> /// <param name="state"></param> /// <param name="scope"></param> /// <returns></returns> public virtual string GetAuthorizationUrl(AuthenticationScope scope) { return(_options.AuthorizeUrl); }