Feature/Auth: last one was authentication, this one is authorization #4
@@ -74,6 +74,10 @@ public class AuthController : ControllerBase {
|
||||
};
|
||||
await jwt_.AddRefreshToken(newTokenObject);
|
||||
|
||||
if(user.UserName == "bard") { // tempory because im silly
|
||||
await userManager_.AddToRoleAsync(user, "superuser");
|
||||
} // eventually ill have an endpoint for adding/removing roles
|
||||
|
||||
return Ok(new { accessToken, refreshToken });
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user