承载令牌认证在VSTS构建中不起作用(Bearer Token Authentication not working in VSTS build)
我正在尝试设置持续集成和部署。
我已经部署了授权服务器并在另一个azure应用程序中工作,我正在测试使用OAuth 2身份验证的API,我将持有者令牌传递给我的httpclient,如果我在本地运行所有集成测试,这可以正常工作在VSTS构建中,我总是得到Forbidden作为我的api响应状态代码,我可以确认我已经成功获得了我的口述但是我无法确认在VSTS上这是在我的http请求上发送的。
下面是我的构建定义
有没有办法在VSTS上调试构建? 或者有人知道为什么身份验证不适用于VSTS buid?
I'm trying to set up Continuous integration and deployment.
I have an authorization server already deployed and working in another azure app, I'm testing my API which uses OAuth 2 authentication, I'm passing the bearer token to my httpclient and this works ok if I run all my integrations tests locally, however on the VSTS build I always get Forbidden as my api response status code, I can confirm that I'm succesfully getting my accestoken but I can't confirm that on VSTS this is being sent on my http request.
below is my build definition
Is there a way to debug a build on VSTS? or does somebody know why the authentication is not working on the VSTS buid?
原文:https://stackoverflow.com/questions/37241348
最满意答案
怎么样:
SELECT Year, Quarter, ( SELECT SUM(CAST(AUM_AssetValue AS MONEY)) FROM AssetUnderManagement WHERE YEAR(AUM_Timeperiod) = i.Year AND MONTH(AUM_TimePeriod) = i.LastMonthInQuarter ) AS total_AssetValue FROM ( SELECT YEAR(aum.AUM_Timeperiod) AS Year, DATEPART(q, aum.AUM_TimePeriod) AS Quarter, MAX(MONTH(aum.AUM_TimePeriod)) AS LastMonthInQuarter FROM AssetUnderManagement as aum, LineOfBusiness WHERE aum.LOB_ID = LineOfBusiness.LOB_ID AND LineOfBusiness.LOB_Name = 'Asset Management' GROUP BY YEAR(aum.AUM_Timeperiod), DATEPART(q, aum.AUM_TimePeriod) ) AS i
How about:
SELECT Year, Quarter, ( SELECT SUM(CAST(AUM_AssetValue AS MONEY)) FROM AssetUnderManagement WHERE YEAR(AUM_Timeperiod) = i.Year AND MONTH(AUM_TimePeriod) = i.LastMonthInQuarter ) AS total_AssetValue FROM ( SELECT YEAR(aum.AUM_Timeperiod) AS Year, DATEPART(q, aum.AUM_TimePeriod) AS Quarter, MAX(MONTH(aum.AUM_TimePeriod)) AS LastMonthInQuarter FROM AssetUnderManagement as aum, LineOfBusiness WHERE aum.LOB_ID = LineOfBusiness.LOB_ID AND LineOfBusiness.LOB_Name = 'Asset Management' GROUP BY YEAR(aum.AUM_Timeperiod), DATEPART(q, aum.AUM_TimePeriod) ) AS i
相关问答
更多-
假设my_date_column是一个日期你可以使用quarter() select Name, QUARTER(my_date_column), count(*) frpm my_table group by name, QUARTER(my_date_column) ; 否则你应该在日期转换字符串 用于转换您可以使用的字符串 str_to_date('2016-09-20', '%Y-%m-%d') select Name, QUARTER(str_to_date(my_strdate_colu ...
-
如何在mysql中获得季度,半年,每年和24个月的报告?(how to get quarter, half year, yearly and 24 months reports in mysql?)[2022-08-31]
您可以使用mysql的date_sub()函数来计算哪些记录属于所需的日期范围: SELECT count(*) as totalrows FROM today_analysis WHERE order_status=:order_status AND track_date>=date_sub(curdate(),interval 1 month) 根据下拉菜单中的值,您可以在值1的位置动态分配date_sub()函数中的1 : SELECT count(*) as totalrows FROM toda ... -
您可以使用条件聚合: select quarter(disbursementdate) as quarter, sum(case when year(disbursementdate) = 2017 then amount else 0 end) as amount_2017, sum(case when year(disbursementdate) = 2018 then amount else 0 end) as amount_2018 from group by quar ...
-
如上所述,该算法提供了您想要的功能: int quarterCurr = 1; if (Convert.ToDouble(curMonth) / 3.0 > 1.0) { quarterCurr = Convert.ToInt32(Convert.ToDouble(curMonth) / 3.0); if (curMonth % 3 != 0) { quarterCurr = quarterCurr + 1; } } int firstMonthCurr = ...
-
是的,你可以做到。 这是为哪些grouping sets的。 下面是一个SQL的例子,它可以做你想做的事情: select (case when datename(mm, dt) is null then qtr else datename(mm, dt) end), count(*), sum(val) from (select t.*, 'Quarter'+cast(datepart(qq, dt) as va ...
-
怎么样: SELECT Year, Quarter, ( SELECT SUM(CAST(AUM_AssetValue AS MONEY)) FROM AssetUnderManagement WHERE YEAR(AUM_Timeperiod) = i.Year AND MONTH(AUM_TimePeriod) = i.LastMonthInQuarter ) AS total_AssetValue FROM ( SELECT ...
-
分组月份,季度,半年和年份不能正常工作(Grouping sets with month, quarter, half and year not working properly)[2023-02-07]
使用WITH(CTE)预先计算半年,它解决了一次又一次输入案例statemnt,它似乎清除了故障 - 你也可以使用子查询(查询查询) CREATE TABLE #tempDates (OrderDate DATETIME, SubTotal MONEY) INSERT INTO #tempDates VALUES('2016-01-01', 10) INSERT INTO #tempDates VALUES('2016-01-02', 10) INSERT INTO #tempDates VALUES( ... -
尝试这个: ;WITH T as ( SELECT Quarter,Month, dense_rank() OVER (PARTITION BY Quarter ORDER BY Year(Month),month(Month) DESC) as Rank FROM @table ) SELECT * from T WHERE rank=1 Try this: ;WITH T as ( SELECT Quarter,Month, dense_rank() OVER (PARTIT ...
-
一个月的SQL查询(SQL Query for month)[2023-06-19]
表名:事务表字段值: id_task = 1 id_child = 25 post_date = 2015-07-24 07:02:52 $ sql =“SELECT * FROM transaction WHERE id_task =' id_child ='$ post_date MONTH( post_date )= MONTH('2015-07-24 07:02:52'); Table Name : transaction Table Fields Values: id_task = 1 id_ch ... -
如果x是apply.quarterly的结果,那么: time(x) <- as.Date(as.yearqtr(time(x))) as.yearqtr来自zoomod包依赖的zoo包,所以它应该已经加载了。 If x is the result of apply.quarterly then: time(x) <- as.Date(as.yearqtr(time(x))) as.yearqtr comes from the zoo package which the quantmod package ...