Skip to content
This repository was archived by the owner on Aug 1, 2021. It is now read-only.

Commit 1b2baca

Browse files
committed
Merge remote-tracking branch 'remotes/origin/master'
# Conflicts: # README.md # src/Backend/Jp.Domain/CommandHandlers/ApiResourceCommandHandler.cs # src/Backend/Jp.Domain/Validations/Client/ClientValidations.cs # src/Backend/Jp.Domain/Validations/Client/UpdateClientCommandValidation.cs # src/Backend/Jp.UserManagement/appsettings.json # src/Frontend/Jp.AdminUI/src/app/shared/layout/header/header.component.ts # src/Frontend/Jp.UI.SSO/appsettings.json # src/Frontend/Jp.UI.SSO/jpProject_sso_log.txt # tests/JpProject.Domain.Tests/ClientTests/ClientCommandHandlerTests.cs # tests/JpProject.Domain.Tests/ClientTests/Fakers/ClientCommandFaker.cs # tests/JpProject.Domain.Tests/ClientTests/Fakers/ClientFaker.cs # tests/JpProject.Domain.Tests/ClientTests/Fakers/EntityClientFaker.cs
2 parents 9d99465 + 45be0fb commit 1b2baca

File tree

12 files changed

+161
-0
lines changed

12 files changed

+161
-0
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
![image](https://github.com/brunohbrito/JP-Project/blob/master/docs/images/logo.png?raw=true)
22

33
[![Build status](https://ci.appveyor.com/api/projects/status/08v6mg6q439x16xt?svg=true)](https://ci.appveyor.com/project/brunohbrito/jp-project)
4+
<<<<<<< HEAD
45
[![Build Status](https://dev.azure.com/brunohbrito/JpProject/_apis/build/status/brunohbrito.JPProject.IdentityServer4.AdminUI?branchName=master)](https://dev.azure.com/brunohbrito/JpProject/_build/latest?definitionId=2&branchName=master)
6+
=======
7+
[![Build Status](https://dev.azure.com/brunohbrito/Jp-Project/_apis/build/status/brunohbrito.JP-Project)](https://dev.azure.com/brunohbrito/Jp-Project/_build/latest?definitionId=1)
8+
>>>>>>> remotes/origin/master
59
[![License](https://img.shields.io/github/license/brunohbrito/jp-project.svg)](LICENSE)
610
![DOCS](https://readthedocs.org/projects/jp-project/badge/?version=latest&style=flat)
711

src/Backend/Jp.Domain/CommandHandlers/ApiResourceCommandHandler.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,10 @@ public async Task<bool> Handle(RegisterApiResourceCommand request, CancellationT
6565
return false;
6666
}
6767

68+
<<<<<<< HEAD
69+
=======
70+
71+
>>>>>>> remotes/origin/master
6872
public async Task<bool> Handle(UpdateApiResourceCommand request, CancellationToken cancellationToken)
6973
{
7074
if (!request.IsValid())

src/Backend/Jp.Domain/Validations/Client/ClientValidations.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,11 @@ protected void ValidateGrantType()
2020

2121
private bool ValidateGrantCombination(ICollection<string> grantTypes, string message)
2222
{
23+
<<<<<<< HEAD
2324

25+
=======
26+
27+
>>>>>>> remotes/origin/master
2428

2529
// would allow response_type downgrade attack from code to token
2630
if (DisallowGrantTypeCombination(GrantType.Implicit, GrantType.AuthorizationCode, grantTypes))
@@ -64,6 +68,7 @@ protected void ValidateClientName()
6468
RuleFor(c => c.Client.ClientName).NotEmpty().WithMessage("Client Name must be set");
6569
}
6670

71+
<<<<<<< HEAD
6772
protected void ValidateIdentityTokenLifetime()
6873
{
6974
RuleFor(c => c.Client.IdentityTokenLifetime).GreaterThan(0).WithMessage("Identity Token Lifetime must be greatter than 0");
@@ -90,5 +95,7 @@ protected void ValidateDeviceCodeLifetime()
9095
{
9196
RuleFor(c => c.Client.DeviceCodeLifetime).GreaterThan(0).WithMessage("Device Code Lifetime must be greatter than 0");
9297
}
98+
=======
99+
>>>>>>> remotes/origin/master
93100
}
94101
}

src/Backend/Jp.Domain/Validations/Client/UpdateClientCommandValidation.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,15 @@ public UpdateClientCommandValidation()
88
{
99
ValidateGrantType();
1010
ValidateOldClientId();
11+
<<<<<<< HEAD
1112
ValidateIdentityTokenLifetime();
1213
ValidateAccessTokenLifetime();
1314
ValidateAuthorizationCodeLifetime();
1415
ValidateSlidingRefreshTokenLifetime();
1516
ValidateDeviceCodeLifetime();
1617
ValidateAbsoluteRefreshTokenLifetime();
18+
=======
19+
>>>>>>> remotes/origin/master
1720
}
1821
}
1922
}

src/Backend/Jp.UserManagement/appsettings.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@
55
// Sql Server connection
66
// "SSOConnection": "Server=.;Initial Catalog=JpProject;Persist Security Info=False;User ID=sa;Password=@Password1;MultipleActiveResultSets=False;Connection Timeout=30;"
77
// MySql connection
8+
<<<<<<< HEAD
89
"SSOConnection": "server=jpdatabase,port=3306;database=jpproject;user=jp;password=10203040"
10+
=======
11+
"SSOConnection": "Data Source=tcp:capturadb.database.windows.net,1433;Initial Catalog=jpproject;User [email protected];Password=8BIaspVxw1vOgSIDKdIn"
12+
>>>>>>> remotes/origin/master
913

1014
},
1115
"Logging": {

src/Frontend/Jp.AdminUI/src/app/shared/layout/header/header.component.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@ import { UserblockService } from "../sidebar/userblock/userblock.service";
77
import { SettingsService } from "@core/settings/settings.service";
88
import { MenuService } from "@core/menu/menu.service";
99
import { Router } from "@angular/router";
10+
<<<<<<< HEAD
1011
import { environment } from "@env/environment";
12+
=======
13+
import { environment } from "@env/environment.prod";
14+
>>>>>>> remotes/origin/master
1115

1216

1317
@Component({

src/Frontend/Jp.UI.SSO/appsettings.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@
55
// Sql Server connection
66
// "SSOConnection": "Server=.;Initial Catalog=JpProject;Persist Security Info=False;User ID=sa;Password=@Password1;MultipleActiveResultSets=False;Connection Timeout=30;"
77
// MySql connection
8+
<<<<<<< HEAD
89
"SSOConnection": "server=jpdatabase,port=3306;database=jpproject;user=jp;password=10203040"
10+
=======
11+
"SSOConnection": "Data Source=tcp:capturadb.database.windows.net,1433;Initial Catalog=jpproject;User [email protected];Password=8BIaspVxw1vOgSIDKdIn"
12+
>>>>>>> remotes/origin/master
913
},
1014
"CertificateOptions": {
1115
"Type": "Temporary",

src/Frontend/Jp.UI.SSO/jpProject_sso_log.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17219,6 +17219,7 @@ Error Number:2714,State:6,Class:16
1721917219
2019-03-29 03:33:41.664 -03:00 [INF] Invoking IdentityServer endpoint: IdentityServer4.Endpoints.DiscoveryKeyEndpoint for /.well-known/openid-configuration/jwks
1722017220
2019-03-29 03:33:41.670 -03:00 [DBG] Start key discovery request
1722117221
2019-03-29 03:33:54.575 -03:00 [INF] Removing 0 grants
17222+
<<<<<<< HEAD
1722217223
2019-03-30 00:30:38.774 -03:00 [INF] SigninCredentialExtension keyType is Temporary
1722317224
2019-03-30 00:30:39.000 -03:00 [INF] SigninCredentialExtension added
1722417225
2019-03-30 00:30:43.548 -03:00 [INF] Starting IdentityServer4 version 2.4.0.0
@@ -17237,3 +17238,5 @@ Error Number:2714,State:6,Class:16
1723717238
2019-03-30 00:30:54.006 -03:00 [DBG] Error Url: /home/error
1723817239
2019-03-30 00:30:54.008 -03:00 [DBG] Error Id Parameter: errorId
1723917240
2019-03-30 00:30:58.872 -03:00 [INF] Removing 0 grants
17241+
=======
17242+
>>>>>>> remotes/origin/master

tests/JpProject.Domain.Tests/ClientTests/ClientCommandHandlerTests.cs

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1+
<<<<<<< HEAD
12
using Bogus;
23
using IdentityServer4.EntityFramework.Entities;
34
using IdentityServer4.Models;
5+
=======
6+
using IdentityServer4.Models;
7+
>>>>>>> remotes/origin/master
48
using Jp.Domain.CommandHandlers;
59
using Jp.Domain.Core.Bus;
610
using Jp.Domain.Core.Notifications;
@@ -19,6 +23,7 @@ namespace JpProject.Domain.Tests.ClientTests
1923
{
2024
public class ClientCommandHandlerTests
2125
{
26+
<<<<<<< HEAD
2227
private readonly ClientCommandHandler _commandHandler;
2328
private readonly Mock<DomainNotificationHandler> _notifications;
2429
private readonly Mock<IMediatorHandler> _mediator;
@@ -33,6 +38,20 @@ public class ClientCommandHandlerTests
3338
public ClientCommandHandlerTests()
3439
{
3540
_faker = new Faker();
41+
=======
42+
private ClientCommandHandler _commandHandler;
43+
private Mock<DomainNotificationHandler> _notifications;
44+
private Mock<IMediatorHandler> _mediator;
45+
private Mock<IUnitOfWork> _uow;
46+
private Mock<IClientRepository> _clientRepository;
47+
private Mock<IClientClaimRepository> _clientClaimRepository;
48+
private Mock<IClientPropertyRepository> _clientPropertyRepository;
49+
private Mock<IClientSecretRepository> _clientSecretRepository;
50+
private CancellationTokenSource _tokenSource;
51+
52+
public ClientCommandHandlerTests()
53+
{
54+
>>>>>>> remotes/origin/master
3655
_tokenSource = new CancellationTokenSource();
3756
_uow = new Mock<IUnitOfWork>();
3857
_mediator = new Mock<IMediatorHandler>();
@@ -56,7 +75,10 @@ public async Task ShouldNotAddDuplicatedClientId()
5675
var result = await _commandHandler.Handle(command, _tokenSource.Token);
5776

5877
Assert.False(result);
78+
<<<<<<< HEAD
5979
_uow.Verify(v => v.Commit(), Times.Never);
80+
=======
81+
>>>>>>> remotes/origin/master
6082
}
6183

6284
[Fact]
@@ -113,6 +135,7 @@ public void ShouldNotAllowCombinationOfGrants(string a, string b)
113135
Assert.Throws<InvalidOperationException>(() => command.Client.AllowedGrantTypes = new List<string>() { a, b });
114136
}
115137

138+
<<<<<<< HEAD
116139
[Fact]
117140
public async Task ShouldNotAcceptNegativeAbsoluteRefreshTokenLifetime()
118141
{
@@ -428,6 +451,8 @@ public async Task ShouldSaveClaim()
428451
Assert.False(result);
429452
}
430453

454+
=======
455+
>>>>>>> remotes/origin/master
431456

432457
}
433458
}

tests/JpProject.Domain.Tests/ClientTests/Fakers/ClientCommandFaker.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ public static Faker<CopyClientCommand> GenerateCopyClientCommand()
2626

2727
}
2828

29+
<<<<<<< HEAD
2930
public static Faker<UpdateClientCommand> GenerateUpdateClientCommand(
3031
int? absoluteRefreshTokenLifetime = null,
3132
int? identityTokenLifetime = null,
@@ -42,10 +43,18 @@ public static Faker<UpdateClientCommand> GenerateUpdateClientCommand(
4243
authorizationCodeLifetime,
4344
slidingRefreshTokenLifetime,
4445
deviceCodeLifetime).Generate(),
46+
=======
47+
public static Faker<UpdateClientCommand> GenerateUpdateClientCommand()
48+
{
49+
return new Faker<UpdateClientCommand>().CustomInstantiator(f =>
50+
new UpdateClientCommand(
51+
ClientFaker.GenerateClient().Generate(),
52+
>>>>>>> remotes/origin/master
4553
f.Company.CompanyName()
4654
));
4755

4856
}
57+
<<<<<<< HEAD
4958

5059
public static Faker<RemoveClientCommand> GenerateRemoveClientCommand()
5160
{
@@ -102,5 +111,7 @@ public static Faker<SaveClientClaimCommand> GenerateSaveClaimCommand()
102111
));
103112
}
104113

114+
=======
115+
>>>>>>> remotes/origin/master
105116
}
106117
}

0 commit comments

Comments
 (0)