Browse Source
Merge pull request #6177 from abpframework/maliming/patch-ng
Rename MyProjectName_ConsoleTestApp to MyProjectName_App.
pull/6181/head
Halil İbrahim Kalkan
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with
19 additions and
12 deletions
-
templates/module/angular/projects/dev-app/src/environments/environment.prod.ts
-
templates/module/angular/projects/dev-app/src/environments/environment.ts
-
templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/IdentityServer/IdentityServerDataSeedContributor.cs
-
templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/appsettings.json
-
templates/module/aspnet-core/test/MyCompanyName.MyProjectName.HttpApi.Client.ConsoleTestApp/appsettings.json
|
|
|
@ -12,7 +12,7 @@ export const environment = { |
|
|
|
oAuthConfig: { |
|
|
|
issuer: 'https://localhost:44301', |
|
|
|
redirectUri: baseUrl, |
|
|
|
clientId: 'MyProjectName_ConsoleTestApp', |
|
|
|
clientId: 'MyProjectName_App', |
|
|
|
responseType: 'code', |
|
|
|
scope: 'offline_access MyProjectName', |
|
|
|
}, |
|
|
|
|
|
|
|
@ -12,7 +12,7 @@ export const environment = { |
|
|
|
oAuthConfig: { |
|
|
|
issuer: 'https://localhost:44301', |
|
|
|
redirectUri: baseUrl, |
|
|
|
clientId: 'MyProjectName_ConsoleTestApp', |
|
|
|
clientId: 'MyProjectName_App', |
|
|
|
responseType: 'code', |
|
|
|
scope: 'offline_access MyProjectName', |
|
|
|
}, |
|
|
|
|
|
|
|
@ -162,15 +162,20 @@ namespace MyCompanyName.MyProjectName.IdentityServer |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
|
//Console Test Client
|
|
|
|
var consoleClientId = configurationSection["MyProjectName_ConsoleTestApp:ClientId"]; |
|
|
|
if (!consoleClientId.IsNullOrWhiteSpace()) |
|
|
|
//Console Test / Angular Client
|
|
|
|
var consoleAndAngularClientId = configurationSection["MyProjectName_App:ClientId"]; |
|
|
|
if (!consoleAndAngularClientId.IsNullOrWhiteSpace()) |
|
|
|
{ |
|
|
|
var webClientRootUrl = configurationSection["MyProjectName_App:RootUrl"]?.TrimEnd('/'); |
|
|
|
|
|
|
|
await CreateClientAsync( |
|
|
|
name: consoleClientId, |
|
|
|
name: consoleAndAngularClientId, |
|
|
|
scopes: commonScopes, |
|
|
|
grantTypes: new[] {"password", "client_credentials"}, |
|
|
|
secret: (configurationSection["MyProjectName_ConsoleTestApp:ClientSecret"] ?? "1q2w3e*").Sha256() |
|
|
|
grantTypes: new[] { "password", "client_credentials", "authorization_code" }, |
|
|
|
secret: (configurationSection["MyProjectName_App:ClientSecret"] ?? "1q2w3e*").Sha256(), |
|
|
|
requireClientSecret: false, |
|
|
|
redirectUri: webClientRootUrl, |
|
|
|
postLogoutRedirectUri: webClientRootUrl |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -25,8 +25,10 @@ |
|
|
|
"ClientId": "MyProjectName_Blazor", |
|
|
|
"RootUrl": "https://localhost:44307/" |
|
|
|
}, |
|
|
|
"MyProjectName_ConsoleTestApp": { |
|
|
|
"ClientId": "MyProjectName_ConsoleTestApp" |
|
|
|
"MyProjectName_App": { |
|
|
|
"ClientId": "MyProjectName_App", |
|
|
|
"ClientSecret": "1q2w3e*", |
|
|
|
"RootUrl": "http://localhost:4200" |
|
|
|
}, |
|
|
|
"MyProjectName_Swagger": { |
|
|
|
"ClientId": "MyProjectName_Swagger", |
|
|
|
|
|
|
|
@ -10,7 +10,7 @@ |
|
|
|
"IdentityClients": { |
|
|
|
"Default": { |
|
|
|
"GrantType": "password", |
|
|
|
"ClientId": "MyProjectName_ConsoleTestApp", |
|
|
|
"ClientId": "MyProjectName_App", |
|
|
|
"ClientSecret": "1q2w3e*", |
|
|
|
"UserName": "admin", |
|
|
|
"UserPassword": "1q2w3E*", |
|
|
|
@ -18,4 +18,4 @@ |
|
|
|
"Scope": "MyProjectName" |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|