Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
loris-s-sonarsource authored Apr 3, 2024
1 parent 6121e7a commit b2ec47c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions rules/S6781/csharp/how-to-fix/net-core.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public class LoginExampleController : ControllerBase
private const string key = "SecretSecretSecretSecretSecretSecretSecretSecret";
[HttpPost]
public IActionResult Post([FromBody] UserModel User)
public IActionResult Post([FromBody] LoginModel login)
{
// Code to validate the login information is omitted
Expand Down Expand Up @@ -83,7 +83,7 @@ public class LoginExampleController : ControllerBase
public class LoginExampleController : ControllerBase
{
[HttpPost]
public IActionResult Post([FromBody] UserModel user)
public IActionResult Post([FromBody] LoginModel login)
{
// Code to validate the login information is omitted
Expand Down
4 changes: 2 additions & 2 deletions rules/S6781/csharp/how-to-fix/net-framework.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ public class LoginExampleController : ApiController
var credentials = new SigningCredentials(securityKey, SecurityAlgorithms.HmacSha256);
var secToken = new JwtSecurityToken(
"sonarsource.com",
"sonarsource.com",
"example.com",
"example.com",
null,
expires: DateTime.Now.AddMinutes(120),
signingCredentials: credentials
Expand Down

0 comments on commit b2ec47c

Please sign in to comment.