-
Notifications
You must be signed in to change notification settings - Fork 8
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
123 changed files
with
4,821 additions
and
1,249 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,55 @@ | ||
name: "CodeQL Advanced" | ||
|
||
on: | ||
push: | ||
branches: [ "develop", "master" ] | ||
pull_request: | ||
branches: [ "develop", "master" ] | ||
schedule: | ||
- cron: '0 6 * * 1' | ||
|
||
env: | ||
DOTNET_VERSION: 9.x.x | ||
|
||
jobs: | ||
analyze: | ||
name: Analyze (csharp) | ||
runs-on: 'ubuntu-latest' | ||
permissions: | ||
# required for all workflows | ||
security-events: write | ||
|
||
# required to fetch internal or private CodeQL packs | ||
packages: read | ||
|
||
# only required for workflows in private repositories | ||
actions: read | ||
contents: read | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
# Initializes the CodeQL tools for scanning. | ||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v3 | ||
with: | ||
languages: csharp | ||
build-mode: manual | ||
|
||
- name: Setup .NET SDK ${{ env.DOTNET_VERSION }} | ||
uses: actions/setup-dotnet@v4 | ||
with: | ||
dotnet-version: ${{ env.DOTNET_VERSION }} | ||
|
||
- name: Build .NET | ||
shell: bash | ||
run: | | ||
dotnet restore | ||
dotnet publish API/API.csproj -c Release | ||
dotnet publish LiveControlGateway/LiveControlGateway.csproj -c Release | ||
dotnet publish Cron/Cron.csproj -c Release | ||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v3 | ||
with: | ||
category: "/language:csharp" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,30 @@ | ||
using Asp.Versioning; | ||
using Microsoft.AspNetCore.Authorization; | ||
using Microsoft.AspNetCore.Mvc; | ||
using OpenShock.API.Services.Account; | ||
using OpenShock.Common.Authentication.Attributes; | ||
using OpenShock.Common.Authentication; | ||
using OpenShock.Common.Authentication.ControllerBase; | ||
using OpenShock.Common.OpenShockDb; | ||
using OpenShock.Common.Services.Session; | ||
using Redis.OM.Contracts; | ||
|
||
namespace OpenShock.API.Controller.Account.Authenticated; | ||
|
||
/// <summary> | ||
/// User account management | ||
/// </summary> | ||
[ApiController] | ||
[UserSessionOnly] | ||
[ApiVersion("1")] | ||
[Route("/{version:apiVersion}/account")] | ||
[Authorize(AuthenticationSchemes = OpenShockAuthSchemas.UserSessionCookie)] | ||
public sealed partial class AuthenticatedAccountController : AuthenticatedSessionControllerBase | ||
{ | ||
private readonly OpenShockContext _db; | ||
private readonly IRedisConnectionProvider _redis; | ||
private readonly ILogger<AuthenticatedAccountController> _logger; | ||
private readonly IAccountService _accountService; | ||
private readonly ISessionService _sessionService; | ||
private readonly ILogger<AuthenticatedAccountController> _logger; | ||
|
||
public AuthenticatedAccountController( | ||
OpenShockContext db, | ||
IRedisConnectionProvider redis, | ||
ILogger<AuthenticatedAccountController> logger, | ||
IAccountService accountService, | ||
ISessionService sessionService) | ||
ILogger<AuthenticatedAccountController> logger | ||
) | ||
{ | ||
_db = db; | ||
_redis = redis; | ||
_logger = logger; | ||
_accountService = accountService; | ||
_sessionService = sessionService; | ||
_logger = logger; | ||
} | ||
} |
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
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.