小编Gus*_*aes的帖子

Visual Studio 2017与bitbucket,终端提示禁用

视觉工作室停止将我的提交发送到bitbucket并出现此错误

克隆远程存储库时遇到错误:Git失败并出现致命错误.遇到HttpRequestException.提交请求时出错.无法产卵

C/Program Files(x86)/ Microsoft Visual Studio/2017/Community/Common7/IDE/CommonExtensions/Microsoft/TeamFoundation/Team Explorer/Git/mingw32/libexec/git-core/git-askpass.exe:没有这样的文件或目录

无法读取"https://gustavobedsamarpes@bitbucket.org"的密码:终端提示已禁用当我尝试克隆我的存储库或提交时发生错误

git git-clone visual-studio-2017 git-credential-manager

40
推荐指数
4
解决办法
2万
查看次数

JWT 令牌错误 401 在 .net core 3.1 中未经授权

我正在学习 DDD 和 JWT,所以我考虑在我的应用程序中使用两者。问题是这样开始的。当我使用用户名和密码进行请求时,api 返回令牌,但是当我将其放入邮递员的标题状态 401 时。

我试过把http和https。

登录控制器.cs

using System;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Grp.Domain.Entities;
using Grp.Service.Services;

namespace Grp.Api.Controllers
{
    [Route("api/[controller]")]
    [ApiController]
    public class LoginController : ControllerBase
    {
        private readonly LoginService _loginService;
        private readonly RepresentanteService _representanteService;
        public LoginController(LoginService loginService,
            RepresentanteService representanteService)
        {
            _loginService = loginService;
            _representanteService = representanteService;
        }

        // POST: api/Login
        [HttpPost]
        [AllowAnonymous]
        public ActionResult<dynamic> Authenticate([FromBody]Representante representante)
        {
            try
            {
                representante.Senha = _representanteService.CriptografarSenha(representante.Senha);
                var usuarioValido = _loginService.UsuarioValido(representante);

                if (!usuarioValido)
                    return BadRequest(new { message = "Usuário ou senha …
Run Code Online (Sandbox Code Playgroud)

c# jwt asp.net-core-3.1

6
推荐指数
2
解决办法
5329
查看次数