Skip to content

Dotnetwebapi#29

Open
abharana24 wants to merge 12 commits into
cybergroupdevs:masterfrom
abharana24:dotnetwebapi
Open

Dotnetwebapi#29
abharana24 wants to merge 12 commits into
cybergroupdevs:masterfrom
abharana24:dotnetwebapi

Conversation

@abharana24

Copy link
Copy Markdown
Contributor

created a new branch dotnetwebapi. added user interface and backend functionalities.

Comment thread Abha_Rana/login_signup/html/signup.html Outdated
<div class="form-group">
<label class="col-md-4 control-label" >Confirm Password</label>
<div class="col-md-4 inputGroupContainer">
<div class="input-group">

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove commented code

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

commented code removed.

Comment thread Abha_Rana/login_signup/scripts/sc1.js Outdated

/*var loginObj = {
Username: "",
Password: ""

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove commented code

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

commented code removed.

{
// GET api/values
[HttpGet]
public ActionResult<IEnumerable<string>> Get()

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove unused controller

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How are you doing role based authentication without having role in claims

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did role-based authentication. added role in claims.

user.Password = userRequest.Password;
user.Email = userRequest.Email;
user.Name = userRequest.Name;
// user.Project = userRequest.Project;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove unused code

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unwanted code removed.

public string Password { get; set; }
public string Email { get; set; }
public string Name { get; set; }
// public string Project { get; set; }

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove commented code

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done.

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;");

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

connection string should not be present in db context file . It should be initalized once in startup class .

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

connection string initialized in startup class and defined in appsettings.json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants