protected Result <TokenDto> CreateTokenResponse(User user, LoginProvider loggedWith = LoginProvider.Local, string externalToken = null) { var token = TokenProvider.GetJwtSecurityToken(user, loggedWith, externalToken); var tokenResponse = TokenProvider.CreateTokenResponse(token); return(Result <TokenDto> .Success(tokenResponse)); }