-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
84 changed files
with
1,086 additions
and
960 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: Unstable release on Docker Hub | ||
|
||
on: | ||
push: | ||
branches: | ||
- dev | ||
- 'hotfix/**' | ||
- 'release/**' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Docker meta | ||
id: meta | ||
uses: docker/metadata-action@v3 | ||
with: | ||
images: etherna/etherna-sso | ||
tags: | | ||
type=ref,event=branch | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
|
||
- name: Login to DockerHub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: Build and push | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: . | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
using Etherna.MongODM.Core; | ||
using Etherna.MongODM.Core.Repositories; | ||
using Etherna.SSOServer.Domain.Models.UserAgg; | ||
|
||
namespace Etherna.SSOServer.Domain | ||
{ | ||
public interface ISharedDbContext : IDbContext | ||
{ | ||
ICollectionRepository<UserSharedInfo, string> UsersInfo { get; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
using Microsoft.AspNetCore.Identity; | ||
using Nethereum.Util; | ||
using System; | ||
using System.Collections.Generic; | ||
|
||
namespace Etherna.SSOServer.Domain.Models.UserAgg | ||
{ | ||
/* This model will not be encapsulated with UserBase until https://etherna.atlassian.net/browse/MODM-101 is solved. | ||
* After it, a full referenced inclusion can be implemented. */ | ||
|
||
/// <summary> | ||
/// A class that expose <see cref="UserBase"/> information, but that needs to be saved on a different DbContext, | ||
/// shared with other Etherna services. | ||
/// </summary> | ||
public class UserSharedInfo : EntityModelBase<string> | ||
{ | ||
// Fields. | ||
private List<string> _etherPreviousAddresses = new(); | ||
|
||
// Constructors. | ||
public UserSharedInfo(string etherAddress) | ||
{ | ||
if (!etherAddress.IsValidEthereumAddressHexFormat()) | ||
throw new ArgumentException("The value is not a valid address", nameof(etherAddress)); | ||
|
||
EtherAddress = etherAddress; | ||
} | ||
protected UserSharedInfo() { } | ||
|
||
// Properties. | ||
[PersonalData] | ||
public virtual string EtherAddress { get; protected internal set; } = default!; | ||
[PersonalData] | ||
public virtual IEnumerable<string> EtherPreviousAddresses | ||
{ | ||
get => _etherPreviousAddresses; | ||
protected internal set => _etherPreviousAddresses = new List<string>(value ?? Array.Empty<string>()); | ||
} | ||
public virtual bool LockoutEnabled { get; set; } | ||
public virtual DateTimeOffset? LockoutEnd { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.