Skip to content

Commit

Permalink
chore: Automated dotnet-format update
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Dec 2, 2023
1 parent fa6a74b commit 8485685
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ namespace EasyMicroservices.IdentityMicroservice.Contracts.Common
{
public class ApplicationInitializeRequestContract
{
public string Language { get; set;}
public string Language { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace EasyMicroservices.IdentityMicroservice.Contracts.Requests
{
public class LoginWithTokenResponseContract : LoginResponseContract
public class LoginWithTokenResponseContract : LoginResponseContract
{
public string Token { get; set; }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ namespace EasyMicroservices.IdentityMicroservice.Contracts.Responses
public class ApplicationInitializeResponseContract : UserResponseContract
{
public bool IsLogin { get; set; }
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public List<ClaimContract> SetCurrentLanguage(string value, List<ClaimContract>
Name = "CurrentLanguage",
Value = value
});

return claims;
}

Expand All @@ -91,7 +91,7 @@ public List<ClaimContract> SetId(long? value, List<ClaimContract> claims = defau
Name = "Id",
Value = value.Value.ToString()
});

return claims;
}

Expand All @@ -101,7 +101,8 @@ public List<ClaimContract> SetRole(ICollection<ClaimContract> roles, List<ClaimC
if (roles.HasAny())
foreach (ClaimContract role in roles)
{
claims.Add(new ClaimContract {
claims.Add(new ClaimContract
{
Name = role.Name,
Value = role.Value.ToString()
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public async Task<MessageContract<LoginWithTokenResponseContract>> Login(Contrac

return new LoginWithTokenResponseContract
{
UserId = response.Result.UserId,
UserId = response.Result.UserId,
Token = TokenResponse.Result.Token
};
}
Expand All @@ -143,7 +143,7 @@ public async Task<MessageContract<UserResponseContract>> GenerateToken(UserClaim
public async Task<MessageContract<UserResponseContract>> RegenerateToken(RegenerateTokenContract request)
{
var _userClient = _appUnitOfWork.GetUserClient(HttpContext);

_userClient.SetBearerToken(_appUnitOfWork.GetConfiguration().GetValue<string>("Authorization:FullAccessPAT"));

var user = await _userClient.GetByIdAsync(new Authentications.GeneratedServices.Int64GetIdRequestContract
Expand All @@ -170,7 +170,7 @@ public async Task<MessageContract<UserResponseContract>> RegenerateToken(Regener
{
Token = response.Result.Token
};


}

Expand All @@ -193,7 +193,7 @@ public async Task<MessageContract<ApplicationInitializeResponseContract>> Applic
if (_claimManager.HasId())
{
_claimManager.SetId(_claimManager.Id, claims);
_claimManager.SetRole(_claimManager.Role.Select(o => new ClaimContract() { Name = ClaimTypes.Name, Value = o}).ToList(), claims);
_claimManager.SetRole(_claimManager.Role.Select(o => new ClaimContract() { Name = ClaimTypes.Name, Value = o }).ToList(), claims);
}

var TokenResponse = await _appUnitOfWork.GetIJWTManager().GenerateTokenWithClaims(claims);
Expand Down

0 comments on commit 8485685

Please sign in to comment.