Dotnetwebapi#29
Open
abharana24 wants to merge 12 commits into
Open
Conversation
rakshan1996
reviewed
Feb 11, 2020
| <div class="form-group"> | ||
| <label class="col-md-4 control-label" >Confirm Password</label> | ||
| <div class="col-md-4 inputGroupContainer"> | ||
| <div class="input-group"> |
Contributor
Author
There was a problem hiding this comment.
commented code removed.
|
|
||
| /*var loginObj = { | ||
| Username: "", | ||
| Password: "" |
Contributor
Author
There was a problem hiding this comment.
commented code removed.
| { | ||
| // GET api/values | ||
| [HttpGet] | ||
| public ActionResult<IEnumerable<string>> Get() |
Contributor
Author
There was a problem hiding this comment.
unused controller removed.
| // new Claim(JwtRegisteredClaimNames.Email, user.Email), | ||
| new Claim(JwtRegisteredClaimNames.Sub, user.Username), | ||
| // new Claim("Role", user.Role), | ||
| // new Claim("Address", user.Address), |
There was a problem hiding this comment.
How are you doing role based authentication without having role in claims
Contributor
Author
There was a problem hiding this comment.
did role-based authentication. added role in claims.
| user.Password = userRequest.Password; | ||
| user.Email = userRequest.Email; | ||
| user.Name = userRequest.Name; | ||
| // user.Project = userRequest.Project; |
Contributor
Author
There was a problem hiding this comment.
unwanted code removed.
| public string Password { get; set; } | ||
| public string Email { get; set; } | ||
| public string Name { get; set; } | ||
| // public string Project { get; set; } |
| if (!optionsBuilder.IsConfigured) | ||
| { | ||
| #warning To protect potentially sensitive information in your connection string, you should move it out of source code. See http://go.microsoft.com/fwlink/?LinkId=723263 for guidance on storing connection strings. | ||
| optionsBuilder.UseSqlServer("Server=CYG292;Database=usersdb;Trusted_Connection=True;"); |
There was a problem hiding this comment.
connection string should not be present in db context file . It should be initalized once in startup class .
Contributor
Author
There was a problem hiding this comment.
connection string initialized in startup class and defined in appsettings.json
…onnection string in appsettings.json
This reverts commit f2e60e7.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
created a new branch dotnetwebapi. added user interface and backend functionalities.