mirror of
https://github.com/bitwarden/server.git
synced 2025-06-30 23:52:50 -05:00
chore/SRE-583 Deprecate usage of Auth-Email Header (#5709)
* chore/SRE-583 Deprecate usage of Auth-Email Header * SRE-583 cleanup function and references * SRE-583 cleanup tests --------- Co-authored-by: sneakernuts <671942+sneakernuts@users.noreply.github.com>
This commit is contained in:

committed by
GitHub

parent
d72d721684
commit
67f745ebc4
@ -98,7 +98,7 @@ public class IdentityApplicationFactory : WebApplicationFactoryBase<Startup>
|
||||
{ "grant_type", "password" },
|
||||
{ "username", username },
|
||||
{ "password", password },
|
||||
}), context => context.Request.Headers.Append("Auth-Email", CoreHelpers.Base64UrlEncodeString(username)));
|
||||
}));
|
||||
|
||||
return context;
|
||||
}
|
||||
@ -126,7 +126,7 @@ public class IdentityApplicationFactory : WebApplicationFactoryBase<Startup>
|
||||
{ "TwoFactorToken", twoFactorToken },
|
||||
{ "TwoFactorProvider", twoFactorProviderType },
|
||||
{ "TwoFactorRemember", "1" },
|
||||
}), context => context.Request.Headers.Append("Auth-Email", CoreHelpers.Base64UrlEncodeString(username)));
|
||||
}));
|
||||
|
||||
return context;
|
||||
}
|
||||
|
@ -62,12 +62,6 @@ public static class WebApplicationFactoryExtensions
|
||||
Action<HttpContext> extraConfiguration = null)
|
||||
=> SendAsync(server, HttpMethod.Delete, requestUri, content: content, extraConfiguration);
|
||||
|
||||
public static HttpContext SetAuthEmail(this HttpContext context, string username)
|
||||
{
|
||||
context.Request.Headers.Append("Auth-Email", CoreHelpers.Base64UrlEncodeString(username));
|
||||
return context;
|
||||
}
|
||||
|
||||
public static HttpContext SetIp(this HttpContext context, string ip)
|
||||
{
|
||||
context.Connection.RemoteIpAddress = IPAddress.Parse(ip);
|
||||
|
Reference in New Issue
Block a user