Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
9792182
feat(issue-320): include Swashbuckle.AspNetCore v1.1.0 to o2-cgen api
live-dev999 Apr 22, 2022
ce6f86d
feat(pr: issue-320): include Swashbuckle.AspNetCore v1.1.0 to o2-cgen…
live-dev999 Apr 22, 2022
0b7d04b
feat(task-327): include Swashbuckle.AspNetCore v1.1.0 to o2 e-sender api
live-dev999 Apr 22, 2022
51d52fb
feat(pr: task-327): include Swashbuckle.AspNetCore v1.1.0 to o2 e-sen…
live-dev999 Apr 22, 2022
6176632
feat(task-327): include Swashbuckle.AspNetCore v1.1.0 to o2 on-tracke…
live-dev999 Apr 22, 2022
4d783d3
feat(pr: task-327): include Swashbuckle.AspNetCore v1.1.0 to o2 on-tr…
live-dev999 Apr 22, 2022
c158ecd
feat(task-325): include Swashbuckle.AspNetCore v1.1.0 to o2 smalltalk…
live-dev999 Apr 22, 2022
17526a7
feat(pr: task-325): include Swashbuckle.AspNetCore v1.1.0 to o2 small…
live-dev999 Apr 22, 2022
c8517a0
feat(task-323): include Swashbuckle.AspNetCore v1.1.0 to o2 feedback-…
live-dev999 Apr 22, 2022
f187c69
feat(task-324): include Swashbuckle.AspNetCore v1.1.0 to o2 s-link api
live-dev999 Apr 22, 2022
b870643
feat(task-326): include Swashbuckle.AspNetCore v1.1.0 to o2 go-event api
live-dev999 Apr 22, 2022
c2b0d99
feat(pr: task-323): include Swashbuckle.AspNetCore v1.1.0 to o2 feedb…
live-dev999 Apr 22, 2022
a357e85
feat(pr: task-324): include Swashbuckle.AspNetCore v1.1.0 to o2 s-lin…
live-dev999 Apr 22, 2022
034a325
feat(pr: task-326): include Swashbuckle.AspNetCore v1.1.0 to o2 go-ev…
live-dev999 Apr 22, 2022
a45d3d6
Update README.md
live-dev999 Apr 25, 2022
d0e256e
feat(issue-334): add micro-frontend app with name smalltalk-app
live-dev999 Apr 25, 2022
ab1b721
feat(issue-334): update webpack for image
live-dev999 Apr 27, 2022
ba99bea
feat(issue-334): update style for left panel
live-dev999 Apr 27, 2022
68fa378
feat(issue-334): update message style
live-dev999 Apr 27, 2022
92054e5
feat(issue-334): add changes for chat style
live-dev999 Apr 27, 2022
f0a09d9
feat(issue-334): update chat view
live-dev999 Apr 27, 2022
3b24315
feat(pr: issue-334): add micro-frontend app with name smalltalk-app
live-dev999 Apr 28, 2022
3a5f351
feat(issue-337): add prototype logo for smalltalk-app
live-dev999 Apr 28, 2022
c38f37b
feat(pr: issue-337): add prototype logo for smalltalk-app
live-dev999 Apr 28, 2022
24a95ae
feat(issue-339): add design templates
live-dev999 Apr 29, 2022
c929e80
feat(issue-339): update session ui component for web smalltalk app
live-dev999 Apr 29, 2022
2b6bd51
feat(issue-339): update session component for web smalltalk app
live-dev999 Apr 29, 2022
60b7d35
feat(pr: issue-339): create ui component for sessions of web smalltal…
live-dev999 Apr 29, 2022
7256b8a
feat(issue-334): add a skeleton for new service media-basket api
live-dev999 Apr 30, 2022
42bfdbe
feat(pr: issue-334): add a skeleton for new service media-basket api
live-dev999 Apr 30, 2022
9042fd7
feat(issue-346): add client for smalltalk app (reactjs) in auth
live-dev999 May 2, 2022
6614303
feat(issue-346): code cleanup
live-dev999 May 2, 2022
76f5401
feat(pr: issue-346): add client for smalltalk app (reactjs) in auth
live-dev999 May 2, 2022
957fef1
feat(issue-351): create auth-app of reactjs
live-dev999 May 2, 2022
ff57a65
feat(issue-351): update react client - smalltalk app
live-dev999 May 3, 2022
7f4892e
feat(issue-351): update auth config with clients
live-dev999 May 3, 2022
f0c2595
feat(issue-351): include microfront-end for smalltalk
live-dev999 May 4, 2022
70bd62c
feat(issue-351): update login page for smalltalk react app
live-dev999 May 4, 2022
006c139
feat(issue-351): update services and auth for smalltalk react app
live-dev999 May 4, 2022
2524d89
feat(issue-351): before change the type auth
live-dev999 May 7, 2022
9d29c26
feat(issue-351): signalr and auth works for smalltalk reactjs app
live-dev999 May 7, 2022
2050294
feat(issue-351): add notification sound for smalltalk reactjs app
live-dev999 May 7, 2022
ddc51bd
feat(issue-351) add rabbitmq for services
live-dev999 May 8, 2022
266bcbc
feat(issue-351): add dockerfile for smalltalk react app
live-dev999 May 8, 2022
434afee
feat(issue-351): add exts for code
live-dev999 May 9, 2022
ee2da8f
feat(issue-351): integrate chat to smalltalk react app
live-dev999 May 9, 2022
508bc53
feat(pr: issue-351): integrate is4 to smalltalk reactjs app
live-dev999 May 13, 2022
ad49aff
Merge branch 'master' into dev
live-dev999 May 13, 2022
df47269
Merge branch 'dev' into release/v1.0.0.4
live-dev999 May 13, 2022
29eaf5c
feat(issue-311): update readme.md for version 1.0.0.4
live-dev999 May 13, 2022
1454cf1
feat(pr: issue-311): update readme.md for version 1.0.0.4
live-dev999 May 13, 2022
86f4e3b
Merge remote-tracking branch 'origin/dev' into release/v1.0.0.4
live-dev999 May 13, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,11 @@ build number - Build Number
sample: 1.1.0.1 like (1.1-a.1)
1 - beta
sample: 1.1.1.2 like (1.1-b.2)




%LocalAppData%\Microsoft\VSCommon\OnlineLicensing
2 - release candidate
sample: 1.1.2.1 like (1.1-rc.1)
3 - release
Expand All @@ -238,3 +243,4 @@ revision - git revision
1.0.0.1
1.0.0.2
1.0.0.3
1.0.0.4
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5,897 changes: 5,897 additions & 0 deletions design/smalltalk-app/SmallTalk-Logo.ai

Large diffs are not rendered by default.

Binary file added design/smalltalk-app/SmallTalk-Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5,954 changes: 5,954 additions & 0 deletions design/smalltalk-app/SmallTalk-Logo_no_signature.ai

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions src/O2NextGen-Prototypes.sln
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "teambrain", "teambrain", "{
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "a-discount", "a-discount", "{41ECEE68-B668-45CB-A3F0-DAC0BCF20D89}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "O2NextGen.SmallTalk.SignalrHub", "Services\smalltalk\O2NextGen.SmallTalk.SignalrHub\O2NextGen.SmallTalk.SignalrHub.csproj", "{C4AE66A7-2DC5-410C-B17C-9A23DBD0A429}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -493,6 +495,18 @@ Global
{9D65077A-687A-433A-A280-45A70620ADC0}.Release|x64.Build.0 = Release|Any CPU
{9D65077A-687A-433A-A280-45A70620ADC0}.Release|x86.ActiveCfg = Release|Any CPU
{9D65077A-687A-433A-A280-45A70620ADC0}.Release|x86.Build.0 = Release|Any CPU
{C4AE66A7-2DC5-410C-B17C-9A23DBD0A429}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C4AE66A7-2DC5-410C-B17C-9A23DBD0A429}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C4AE66A7-2DC5-410C-B17C-9A23DBD0A429}.Debug|x64.ActiveCfg = Debug|Any CPU
{C4AE66A7-2DC5-410C-B17C-9A23DBD0A429}.Debug|x64.Build.0 = Debug|Any CPU
{C4AE66A7-2DC5-410C-B17C-9A23DBD0A429}.Debug|x86.ActiveCfg = Debug|Any CPU
{C4AE66A7-2DC5-410C-B17C-9A23DBD0A429}.Debug|x86.Build.0 = Debug|Any CPU
{C4AE66A7-2DC5-410C-B17C-9A23DBD0A429}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C4AE66A7-2DC5-410C-B17C-9A23DBD0A429}.Release|Any CPU.Build.0 = Release|Any CPU
{C4AE66A7-2DC5-410C-B17C-9A23DBD0A429}.Release|x64.ActiveCfg = Release|Any CPU
{C4AE66A7-2DC5-410C-B17C-9A23DBD0A429}.Release|x64.Build.0 = Release|Any CPU
{C4AE66A7-2DC5-410C-B17C-9A23DBD0A429}.Release|x86.ActiveCfg = Release|Any CPU
{C4AE66A7-2DC5-410C-B17C-9A23DBD0A429}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -543,6 +557,7 @@ Global
{A50DA91B-BD5D-4640-80D8-46B1E55E76FD} = {574CE1BF-397E-4262-82AD-94FB1CE98DA2}
{4BAA467F-6F58-4C99-ACCF-88F2ADD398B8} = {574CE1BF-397E-4262-82AD-94FB1CE98DA2}
{41ECEE68-B668-45CB-A3F0-DAC0BCF20D89} = {574CE1BF-397E-4262-82AD-94FB1CE98DA2}
{C4AE66A7-2DC5-410C-B17C-9A23DBD0A429} = {0DB9F20A-FD40-4110-807E-AAEFEFCCD574}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {5C9AF9F4-BF0A-486D-9F2E-17FE2F53F7E9}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
using Microsoft.AspNetCore.Identity;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using O2NextGen.Auth.Web.Data;

namespace O2NextGen.Auth.Web.Extensions
{
public static class IdentityExtensions
{
public static IServiceCollection AddConfiguredIdentity(this IServiceCollection services,
IConfiguration configuration)
{
services.AddDbContext<AuthDbContext>(options =>
options.UseSqlServer(configuration["ConnectionString"]));

services

.AddIdentity<O2User, IdentityRole>(options =>
{
options.Password.RequireDigit = false;
//TODO: uncomment after some tests
//options.Password.RequiredLength = 12;
options.Password.RequireLowercase = false;
options.Password.RequireUppercase = false;
options.Password.RequireNonAlphanumeric = false;
options.User.RequireUniqueEmail = true;
// options.SignIn.RequireConfirmedEmail = true;
})
.AddEntityFrameworkStores<AuthDbContext>()
.AddDefaultTokenProviders();

services.AddConfiguredIdentityServer(configuration);

return services;
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
using System.Collections.Generic;
using System.Linq;
using IdentityServer4;
using IdentityServer4.Models;
using IdentityServer4.Services;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using O2NextGen.Auth.Web.Data;
using O2NextGen.Auth.Web.Services;

namespace O2NextGen.Auth.Web.Extensions
{
public static class IdentityServerExtensions
{
public static IServiceCollection AddConfiguredIdentityServer(this IServiceCollection services,
IConfiguration configuration)
{
var builder = services.AddIdentityServer(options =>
{
// options.Events.RaiseErrorEvents = true;
// options.Events.RaiseInformationEvents = true;
// options.Events.RaiseFailureEvents = true;
// options.Events.RaiseSuccessEvents = true;
})
// using in memory, but we could also get it, for example, from the database

.AddDeveloperSigningCredential()
.AddInMemoryPersistedGrants()
// access to data regarding the user's identity
.AddInMemoryIdentityResources(GetIdentityResources())
// APIs that may be accessed
.AddInMemoryApiResources(GetApis())
// client applications that may access users data and APIs on the user's behalf
.AddInMemoryClients(GetClients())
// configures IdentityServer integration with ASP.NET Core Identity
.AddAspNetIdentity<O2User>()

// to avoid bombarding the db with checks, make use of cache
//.AddInMemoryCaching();
// more about EF integration:
// - http://docs.identityserver.io/en/latest/quickstarts/7_entity_framework.html
// - http://docs.identityserver.io/en/latest/reference/ef.html?highlight=dbcontext

.Services.AddTransient<IProfileService, ProfileService>();
return services;
}

private static IEnumerable<IdentityResource> GetIdentityResources()
{
var profile = new IdentityResources.Profile();
profile.Required = true;
return new IdentityResource[]
{
new IdentityResources.OpenId(),
profile
};
}

// private static IEnumerable<ApiResource> GetApis()
// {
// var apiResource = new ApiResource("smalltalkapi", "smalltalkapi");
// apiResource.Scopes.First().Required = true;
// return new[]
// {
// apiResource
// };
// }
public static IEnumerable<ApiResource> GetApis() =>
new List<ApiResource>
{
new ApiResource("smalltalkapi", "SmallTalk API"),
new ApiResource("smalltalksignalr","SmallTalk SignalR")
};

private static IEnumerable<Client> GetClients()
{
return new[]
{
// React client
new Client
{
ClientId = "smalltalk_client_reactjs",
ClientName = "SmallTalk React App",

AllowedGrantTypes = GrantTypes.Implicit,

RequireClientSecret = false,

RedirectUris =
{"http://localhost:3003/signin-oidc",
},


AllowedScopes = new List<string>
{
IdentityServerConstants.StandardScopes.OpenId,
IdentityServerConstants.StandardScopes.Profile,
"smalltalkapi",
"smalltalksignalr",
},

AllowAccessTokensViaBrowser = true,
AlwaysIncludeUserClaimsInIdToken = true,
RequireConsent = false
},
new Client
{
ClientId = "smalltalkapi",
ClientName = "Smalltalkapi Swagger UI",
AllowedGrantTypes = GrantTypes.Implicit,
AllowAccessTokensViaBrowser = true,

RedirectUris = { $"http://localhost:5003/swagger/o2c.html" },
PostLogoutRedirectUris = { $"http://localhost:5003/swagger/" },

AllowedScopes = new List<string>
{
"smalltalkapi"
}
},
new Client {
ClientId = "o2business-wpf",

AllowedGrantTypes = GrantTypes.Code,
RequirePkce = true,
RequireClientSecret = false,

RedirectUris = { "http://localhost/sample-wpf-app" },
AllowedCorsOrigins = { "http://localhost" },

AllowedScopes = {
IdentityServerConstants.StandardScopes.OpenId,
IdentityServerConstants.StandardScopes.Profile,
},

AllowAccessTokensViaBrowser = true,
RequireConsent = false,
},
new Client {
ClientId = "xamarin",

AllowedGrantTypes = GrantTypes.Code,
RequirePkce = true,
RequireClientSecret = false,

RedirectUris = { "xamarinformsclients://callback" },

AllowedScopes = {
IdentityServerConstants.StandardScopes.OpenId,
IdentityServerConstants.StandardScopes.Profile,
},

AllowAccessTokensViaBrowser = true,
RequireConsent = false,
},

};
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="IdentityServer4" Version="2.3.2" />
<PackageReference Include="IdentityServer4.AspNetIdentity" Version="2.3.0" />
<PackageReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="2.2.0" PrivateAssets="All" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.14.0" />
Expand All @@ -23,6 +25,7 @@
</PackageReference>
<PackageReference Include="Serilog.Sinks.File" Version="2.2.0">
</PackageReference>
<PackageReference Include="SkiaSharp.QrCode" Version="0.2.0" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Update="Resources\Pages\Account\Register.en.resx">
Expand Down
8 changes: 5 additions & 3 deletions src/Services/auth/O2NextGen.Auth.Web/Pages/Register.cshtml.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using System;
using System.ComponentModel.DataAnnotations;
using System.Text.Encodings.Web;
using System.Threading.Tasks;
Expand Down Expand Up @@ -83,9 +84,10 @@ public async Task<IActionResult> OnPostAsync(string returnUrl = null)
pageHandler: null,
values: new { userId = user.Id, code = code },
protocol: Request.Scheme);

await _emailSender.SendEmailAsync(Input.Email, "Confirm your email",
$"Please confirm your account by <a href='{HtmlEncoder.Default.Encode(callbackUrl)}'>clicking here</a>.");

Console.WriteLine(HtmlEncoder.Default.Encode(callbackUrl));
//await _emailSender.SendEmailAsync(Input.Email, "Confirm your email",
// $"Please confirm your account by <a href='{HtmlEncoder.Default.Encode(callbackUrl)}'>clicking here</a>.");

await _signInManager.SignInAsync(user, isPersistent: false);

Expand Down
2 changes: 2 additions & 0 deletions src/Services/auth/O2NextGen.Auth.Web/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Threading.Tasks;
using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Hosting;
using O2NextGen.Auth.Web.StartupHelpers;
using Serilog;

namespace O2NextGen.Auth.Web
Expand All @@ -20,6 +21,7 @@ public static async Task<int> Main(string[] args)
var host = CreateWebHostBuilder(args).Build();
Log.Information($"############### {AppName} ##############");
Log.Information("################# Starting Application #################");
await host.EnsureDbUpToDateAsync();
await host.RunAsync();
Log.Information($"============== {AppName} - state is started =====================");
return 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "https://localhost:10001;http://localhost:5001"
"applicationUrl": "http://localhost:5001"
},
"Docker": {
"commandName": "Docker",
Expand Down
Loading