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

Commit ee6c0e6

Browse files
committed
PostLogout Uri
Correcao de bug de component Alteracao da ordem dos campos mais utilizados # Conflicts: # src/Backend/Jp.Application/ViewModels/ClientsViewModels/SaveClientViewModel.cs # src/Backend/Jp.Domain/Commands/Clients/SaveClientCommand.cs # src/Backend/Jp.UserManagement/appsettings.json # src/Frontend/Jp.AdminUI/src/app/shared/shared.module.ts # src/Frontend/Jp.UI.SSO/appsettings.json
1 parent 0e07337 commit ee6c0e6

20 files changed

Lines changed: 1506 additions & 224 deletions

File tree

src/Backend/Jp.Application/AutoMapper/ViewModelToDomainMappingProfile.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public ViewModelToDomainMappingProfile()
6464
CreateMap<RemoveClientClaimViewModel, RemoveClientClaimCommand>().ConstructUsing(c => new RemoveClientClaimCommand(c.Id, c.ClientId));
6565
CreateMap<RemoveClientViewModel, RemoveClientCommand>().ConstructUsing(c => new RemoveClientCommand(c.ClientId));
6666
CreateMap<CopyClientViewModel, CopyClientCommand>().ConstructUsing(c => new CopyClientCommand(c.ClientId));
67-
CreateMap<SaveClientViewModel, SaveClientCommand>().ConstructUsing(c => new SaveClientCommand(c.ClientId, c.ClientName, c.ClientUri, c.LogoUri, c.Description, c.ClientType));
67+
CreateMap<SaveClientViewModel, SaveClientCommand>().ConstructUsing(c => new SaveClientCommand(c.ClientId, c.ClientName, c.ClientUri, c.LogoUri, c.Description, c.ClientType, c.LogoutUri));
6868

6969
/*
7070
* Identity Resource commands

src/Backend/Jp.Application/ViewModels/ClientsViewModels/SaveClientViewModel.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
using System.ComponentModel.DataAnnotations;
2-
using Jp.Domain.Commands.Clients;
1+
using Jp.Domain.Commands.Client;
2+
using System.ComponentModel.DataAnnotations;
33

44
namespace Jp.Application.ViewModels.ClientsViewModels
55
{
@@ -27,6 +27,8 @@ public class SaveClientViewModel
2727
/// </summary>
2828
public string LogoUri { get; set; }
2929

30+
public string LogoutUri { get; set; }
31+
3032
public string Description { get; set; }
3133

3234
public ClientType ClientType { get; set; } = 0;

src/Backend/Jp.Domain/Commands/Clients/SaveClientCommand.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,17 @@
22
using IdentityServer4.EntityFramework.Mappers;
33
using IdentityServer4.Models;
44
using Jp.Domain.Validations.Client;
5+
using System;
6+
using System.Collections.Generic;
57

68
namespace Jp.Domain.Commands.Clients
79
{
810
public class SaveClientCommand : ClientCommand
911
{
1012
public ClientType ClientType { get; }
1113

12-
public SaveClientCommand(string clientId, string name, string clientUri, string logoUri, string description, ClientType clientType)
14+
public SaveClientCommand(string clientId, string name, string clientUri, string logoUri, string description,
15+
ClientType clientType, string postLogoutUri)
1316
{
1417
this.Client = new IdentityServer4.Models.Client()
1518
{
@@ -18,6 +21,7 @@ public SaveClientCommand(string clientId, string name, string clientUri, string
1821
ClientUri = clientUri,
1922
LogoUri = logoUri,
2023
Description = description,
24+
PostLogoutRedirectUris = new List<string>() { postLogoutUri }
2125
};
2226
ClientType = clientType;
2327
}

src/Backend/Jp.Domain/Commands/Clients/UpdateClientCommand.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ namespace Jp.Domain.Commands.Clients
44
{
55
public class UpdateClientCommand : ClientCommand
66
{
7-
8-
97
public UpdateClientCommand(IdentityServer4.Models.Client client, string oldClientId)
108
{
119
OldClientId = oldClientId;

src/Frontend/Jp.AdminUI/src/app/panel/api-resources/edit/api-resource-edit.component.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ export class ApiResourceEditComponent implements OnInit {
5151
registerResult => {
5252
if (registerResult.data) {
5353
this.showSuccessMessage();
54-
this.router.navigate(["/api-resource"]);
5554
}
5655
},
5756
err => {

src/Frontend/Jp.AdminUI/src/app/panel/clients/add/add.component.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,18 @@ <h3>{{ client }}</h3>
6969
</div>
7070
</fieldset>
7171

72+
<!--Input - text -->
73+
<fieldset>
74+
<div class="form-group row">
75+
<label placement="top" [tooltip]="'client.details.postLogoutRedirectUris-tooltip' | translate" class="col-xl-3 col-form-label">{{
76+
'client.details.postLogoutRedirectUris' | translate }} <i class="fa fa-comment-dots"></i></label>
77+
<div class="col-xl-9">
78+
<input class="form-control" autocomplete="client-postLogoutRedirectUris" [placeholder]="'client.details.postLogoutRedirectUris-tooltip' | translate"
79+
[(ngModel)]="model.postLogoutRedirectUris" />
80+
</div>
81+
</div>
82+
</fieldset>
83+
7284
<!--Input - text -->
7385
<fieldset>
7486
<div class="form-group row">
Lines changed: 94 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,100 @@
11
<div class="form-horizontal">
2-
<!--Input - text -->
2+
<!--Checkbox-->
33
<fieldset>
44
<div class="form-group row">
5+
<div class="col-xl-4">
6+
<label class="col-form-label" placement="top"
7+
[tooltip]="'client.details.enableLocalLogin-tooltip' | translate">{{ 'client.details.enableLocalLogin' | translate }}
8+
<i class="fa fa-comment-dots"></i></label>&nbsp;
9+
</div>
10+
<div class="col-xl-8">
11+
<label class="switch m-0">
12+
<input type="checkbox" [(ngModel)]="model.enableLocalLogin" />
13+
<span></span>
14+
</label>
15+
</div>
16+
</div>
17+
</fieldset>
18+
<!--Select with tags-->
19+
<fieldset>
20+
<div class="form-group row">
21+
<div class="col-xl-4">
22+
<label class="col-form-label">{{ 'client.details.identityProviderRestrictions' | translate }}
23+
</label>&nbsp;
24+
<button type="button" class="btn btn-xs btn-info"
25+
[popover]="'client.details.identityProviderRestrictions-tooltip' | translate"
26+
[popoverTitle]="'client.details.identityProviderRestrictions' | translate" placement="auto"
27+
container="body">
28+
<i class="fa fa-comment-dots" placement="top"></i>
29+
</button>
30+
</div>
31+
<div class="col-xl-8">
32+
<tag-input theme='bootstrap' name="identityProviderRestrictions" [modelAsStrings]="true"
33+
placeholder='+Grant' [(ngModel)]="model.identityProviderRestrictions"></tag-input>
34+
</div>
35+
<div class="col-xl-8 offset-4">
36+
<small>Options:</small>
37+
<br>
38+
<button class="btn btn-brand btn-facebook" type="button"
39+
(click)="addIdentityProvidersRestrictions('Facebook')" style="margin-bottom: 4px"><i
40+
class="fab fa-facebook"></i><span>Facebook</span></button>
41+
<button class="btn btn-brand btn-linkedin" type="button"
42+
(click)="addIdentityProvidersRestrictions('LinkedIn')" style="margin-bottom: 4px"><i
43+
class="fab fa-linkedin"></i><span>LinkedIn</span></button>
44+
<button class="btn btn-brand btn-google-plus" type="button"
45+
(click)="addIdentityProvidersRestrictions('Google')" style="margin-bottom: 4px"><i
46+
class="fab fa-google-plus"></i><span>Google+</span></button>
47+
48+
</div>
49+
</div>
50+
</fieldset>
51+
<!--Select with tags-->
52+
<fieldset>
53+
<div class="form-group row">
54+
<label placement="top" [tooltip]="'client.details.postLogoutRedirectUris-tooltip' | translate"
55+
class="col-xl-4 col-form-label">{{
56+
'client.details.postLogoutRedirectUris' | translate }} <i class="fa fa-comment-dots"></i></label>
557
<div class="col-xl-5">
58+
<tag-input theme='bootstrap' name="postLogoutRedirectUris" [modelAsStrings]="true"
59+
[placeholder]="'+' + ('client.details.postLogoutRedirectUris' | translate)"
60+
[(ngModel)]="model.postLogoutRedirectUris"></tag-input>
61+
</div>
62+
</div>
63+
</fieldset>
64+
<!--Input - text -->
65+
<fieldset>
66+
<div class="form-group row">
67+
<div class="col-xl-4">
668
<label class="col-form-label">{{ 'client.details.frontChannelLogoutUri' | translate }} </label>&nbsp;
7-
<button type="button" class="btn btn-xs btn-info" [popover]="'client.details.frontChannelLogoutUri-tooltip' | translate"
8-
[popoverTitle]="'client.details.frontChannelLogoutUri' | translate" placement="top" container="body">
69+
<button type="button" class="btn btn-xs btn-info"
70+
[popover]="'client.details.frontChannelLogoutUri-tooltip' | translate"
71+
[popoverTitle]="'client.details.frontChannelLogoutUri' | translate" placement="top"
72+
container="body">
973
<i class="fa fa-comment-dots"></i>
1074
</button>
75+
1176
</div>
12-
<div class="col-xl-7">
13-
<input class="form-control" autocomplete="client-frontChannelLogoutUri" [placeholder]="'client.details.frontChannelLogoutUri-tooltip' | translate"
77+
<div class="col-xl-8">
78+
<input class="form-control" autocomplete="client-frontChannelLogoutUri"
79+
[placeholder]="'client.details.frontChannelLogoutUri-tooltip' | translate"
1480
[(ngModel)]="model.frontChannelLogoutUri" />
1581
</div>
1682
</div>
1783
</fieldset>
1884
<!--Checkbox-->
1985
<fieldset>
2086
<div class="form-group row">
21-
<div class="col-xl-5">
87+
<div class="col-xl-4">
2288
<label class="col-form-label">{{ 'client.details.frontChannelLogoutSessionRequired' | translate }}
2389
</label>&nbsp;
24-
<button type="button" class="btn btn-xs btn-info" [popover]="'client.details.frontChannelLogoutSessionRequired-tooltip' | translate"
90+
<button type="button" class="btn btn-xs btn-info"
91+
[popover]="'client.details.frontChannelLogoutSessionRequired-tooltip' | translate"
2592
[popoverTitle]="'client.details.frontChannelLogoutSessionRequired' | translate" placement="top"
2693
container="body">
2794
<i class="fa fa-comment-dots"></i>
2895
</button>
2996
</div>
30-
<div class="col-xl-7">
97+
<div class="col-xl-8">
3198
<label class="switch m-0">
3299
<input type="checkbox" [(ngModel)]="model.frontChannelLogoutSessionRequired" />
33100
<span></span>
@@ -38,67 +105,55 @@
38105
<!--Input - text -->
39106
<fieldset>
40107
<div class="form-group row">
41-
<div class="col-xl-5">
108+
<div class="col-xl-4">
42109
<label class="col-form-label">{{ 'client.details.backChannelLogoutUri' | translate }} </label>&nbsp;
43-
<button type="button" class="btn btn-xs btn-info" [popover]="'client.details.backChannelLogoutUri-tooltip' | translate"
110+
<button type="button" class="btn btn-xs btn-info"
111+
[popover]="'client.details.backChannelLogoutUri-tooltip' | translate"
44112
[popoverTitle]="'client.details.backChannelLogoutUri' | translate" placement="top" container="body">
45113
<i class="fa fa-comment-dots"></i>
46114
</button>
47115
</div>
48-
<div class="col-xl-7">
49-
<input class="form-control" autocomplete="client-backChannelLogoutUri" [placeholder]="'client.details.backChannelLogoutUri-tooltip' | translate"
116+
<div class="col-xl-8">
117+
<input class="form-control" autocomplete="client-backChannelLogoutUri"
118+
[placeholder]="'client.details.backChannelLogoutUri-tooltip' | translate"
50119
[(ngModel)]="model.backChannelLogoutUri" />
51120
</div>
52121
</div>
53122
</fieldset>
54123
<!--Checkbox-->
55124
<fieldset>
56125
<div class="form-group row">
57-
<div class="col-xl-5">
126+
<div class="col-xl-4">
58127
<label class="col-form-label">{{ 'client.details.backChannelLogoutSessionRequired' | translate }}
59128
</label>&nbsp;
60-
<button type="button" class="btn btn-xs btn-info" [popover]="'client.details.backChannelLogoutSessionRequired-tooltip' | translate"
129+
<button type="button" class="btn btn-xs btn-info"
130+
[popover]="'client.details.backChannelLogoutSessionRequired-tooltip' | translate"
61131
[popoverTitle]="'client.details.backChannelLogoutSessionRequired' | translate" placement="top"
62132
container="body">
63133
<i class="fa fa-comment-dots"></i>
64134
</button>
65135
</div>
66-
<div class="col-xl-7">
136+
<div class="col-xl-8">
67137
<label class="switch m-0">
68138
<input type="checkbox" [(ngModel)]="model.backChannelLogoutSessionRequired" />
69139
<span></span>
70140
</label>
71141
</div>
72142
</div>
73143
</fieldset>
74-
<!--Select with tags-->
144+
<!--Input - Number -->
75145
<fieldset>
76146
<div class="form-group row">
77-
<div class="col-xl-5">
78-
<label class="col-form-label">{{ 'client.details.identityProviderRestrictions' | translate }} </label>&nbsp;
79-
<button type="button" class="btn btn-xs btn-info" [popover]="'client.details.identityProviderRestrictions-tooltip' | translate"
80-
[popoverTitle]="'client.details.identityProviderRestrictions' | translate" placement="top"
81-
container="body">
82-
<i class="fa fa-comment-dots"></i>
83-
</button>
84-
</div>
85-
<div class="col-xl-7">
86-
<tag-input theme='bootstrap' name="identityProviderRestrictions" [modelAsStrings]="true" [placeholder]="'+' + 'client.details.identityProviderRestrictions' | translate"
87-
[(ngModel)]="model.identityProviderRestrictions"></tag-input>
147+
<label class="col-xl-4 col-form-label" placement="top"
148+
[tooltip]="'client.details.userSsoLifetime-tooltip' | translate">{{
149+
'client.details.userSsoLifetime' | translate }} <i class="fa fa-comment-dots"></i></label>
150+
<div class="col-xl-8">
151+
<input class="form-control" autocomplete="client-userSsoLifetime"
152+
[placeholder]="'client.details.userSsoLifetime-tooltip' | translate"
153+
[(ngModel)]="model.userSsoLifetime" numbersOnly />
88154
</div>
89155
</div>
90156
</fieldset>
91157

92-
<!--Select with tags-->
93-
<fieldset>
94-
<div class="form-group row">
95-
<label placement="top" [tooltip]="'client.details.allowedCorsOrigins-tooltip' | translate" class="col-xl-4 col-form-label">{{
96-
'client.details.allowedCorsOrigins' | translate }} <i class="fa fa-comment-dots"></i></label>
97-
<div class="col-xl-5">
98-
<tag-input theme='bootstrap' name="allowedCorsOrigins" [modelAsStrings]="true" [placeholder]="'+' + ('client.details.allowedCorsOrigins' | translate)"
99-
[(ngModel)]="model.allowedCorsOrigins"></tag-input>
100-
</div>
101-
</div>
102-
</fieldset>
103-
158+
104159
</div>

0 commit comments

Comments
 (0)