File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 1616 <!-- Cookie not the right format - redirect to the sign-in endpoint -->
1717 <when condition =" @(((string)context.Variables[" encryptedIncomingFullSessionCookie" ]).Split('.').Length != 3)" >
1818 <return-response >
19- <set-status code =" 401" reason =" Incorrect formed cookie" />
19+ <set-status code =" 302" />
20+ <set-header name =" Location" exists-action =" override" >
21+ <value >@($"/oauth/signin?redirect={Uri.EscapeDataString(context.Request.OriginalUrl.ToString())}")</value >
22+ </set-header >
2023 </return-response >
2124 </when >
2225 </choose >
2528 <set-variable name =" encryptedCookie" value =" @(((string)context.Variables[" encryptedIncomingFullSessionCookie" ]).Split('.')[0])" />
2629 <set-variable name =" ivCookie" value =" @(((string)context.Variables[" encryptedIncomingFullSessionCookie" ]).Split('.')[1])" />
2730 <set-variable name =" cookieKey" value =" @(((string)context.Variables[" encryptedIncomingFullSessionCookie" ]).Split('.')[2])" />
31+
2832 <choose >
2933 <!-- Cookie not the right format - redirect to the sign-in endpoint -->
3034 <when condition =" @(((string)context.Variables[" ivCookie" ]) == string.Empty)" >
3135 <return-response >
3236 <set-status code =" 302" />
3337 <set-header name =" Location" exists-action =" override" >
34- <value >@($"/oauth/signin?redirect={(string) context.Variables["redirect-no-cookie"] }")</value >
38+ <value >@($"/oauth/signin?redirect={Uri.EscapeDataString( context.Request.OriginalUrl.ToString()) }")</value >
3539 </set-header >
3640 </return-response >
3741 </when >
5761 <return-response >
5862 <set-status code =" 302" />
5963 <set-header name =" Location" exists-action =" override" >
60- <value >@($"/oauth/signin?redirect={(string) context.Variables["redirect-no-cookie"] }")</value >
64+ <value >@($"/oauth/signin?redirect={Uri.EscapeDataString( context.Request.OriginalUrl.ToString()) }")</value >
6165 </set-header >
6266 </return-response >
6367 </when >
You can’t perform that action at this time.
0 commit comments