Skip to content

Commit 90cceaa

Browse files
committed
Initial
0 parents  commit 90cceaa

20 files changed

+922
-0
lines changed

.editorconfig

+194
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,194 @@
1+
# With more recent updates Visual Studio 2017 supports EditorConfig files out of the box
2+
# Visual Studio Code needs an extension: https://github.com/editorconfig/editorconfig-vscode
3+
# For emacs, vim, np++ and other editors, see here: https://github.com/editorconfig
4+
###############################
5+
# Core EditorConfig Options #
6+
###############################
7+
root = true
8+
# All files
9+
[*]
10+
indent_style = space
11+
indent_size = 4
12+
charset = utf-8
13+
trim_trailing_whitespace = true
14+
insert_final_newline = true
15+
end_of_line = lf
16+
max_line_length = 9999
17+
18+
# YAML indentation
19+
[*.{yml,yaml}]
20+
indent_size = 2
21+
22+
# XML indentation
23+
[*.{csproj,xml}]
24+
indent_size = 2
25+
26+
###############################
27+
# .NET Coding Conventions #
28+
###############################
29+
[*.{cs,vb}]
30+
# Organize usings
31+
dotnet_sort_system_directives_first = true
32+
# this. preferences
33+
dotnet_style_qualification_for_field = false:silent
34+
dotnet_style_qualification_for_property = false:silent
35+
dotnet_style_qualification_for_method = false:silent
36+
dotnet_style_qualification_for_event = false:silent
37+
# Language keywords vs BCL types preferences
38+
dotnet_style_predefined_type_for_locals_parameters_members = true:silent
39+
dotnet_style_predefined_type_for_member_access = true:silent
40+
# Parentheses preferences
41+
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:silent
42+
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:silent
43+
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:silent
44+
dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent
45+
# Modifier preferences
46+
dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent
47+
dotnet_style_readonly_field = true:suggestion
48+
# Expression-level preferences
49+
dotnet_style_object_initializer = true:suggestion
50+
dotnet_style_collection_initializer = true:suggestion
51+
dotnet_style_explicit_tuple_names = true:suggestion
52+
dotnet_style_null_propagation = true:suggestion
53+
dotnet_style_coalesce_expression = true:suggestion
54+
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:silent
55+
dotnet_style_prefer_inferred_tuple_names = true:suggestion
56+
dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
57+
dotnet_style_prefer_auto_properties = true:silent
58+
dotnet_style_prefer_conditional_expression_over_assignment = true:silent
59+
dotnet_style_prefer_conditional_expression_over_return = true:silent
60+
61+
###############################
62+
# Naming Conventions #
63+
###############################
64+
# Style Definitions (From Roslyn)
65+
66+
# Non-private static fields are PascalCase
67+
dotnet_naming_rule.non_private_static_fields_should_be_pascal_case.severity = suggestion
68+
dotnet_naming_rule.non_private_static_fields_should_be_pascal_case.symbols = non_private_static_fields
69+
dotnet_naming_rule.non_private_static_fields_should_be_pascal_case.style = non_private_static_field_style
70+
71+
dotnet_naming_symbols.non_private_static_fields.applicable_kinds = field
72+
dotnet_naming_symbols.non_private_static_fields.applicable_accessibilities = public, protected, internal, protected_internal, private_protected
73+
dotnet_naming_symbols.non_private_static_fields.required_modifiers = static
74+
75+
dotnet_naming_style.non_private_static_field_style.capitalization = pascal_case
76+
77+
# Constants are PascalCase
78+
dotnet_naming_rule.constants_should_be_pascal_case.severity = suggestion
79+
dotnet_naming_rule.constants_should_be_pascal_case.symbols = constants
80+
dotnet_naming_rule.constants_should_be_pascal_case.style = constant_style
81+
82+
dotnet_naming_symbols.constants.applicable_kinds = field, local
83+
dotnet_naming_symbols.constants.required_modifiers = const
84+
85+
dotnet_naming_style.constant_style.capitalization = pascal_case
86+
87+
# Static fields are camelCase and start with s_
88+
dotnet_naming_rule.static_fields_should_be_camel_case.severity = suggestion
89+
dotnet_naming_rule.static_fields_should_be_camel_case.symbols = static_fields
90+
dotnet_naming_rule.static_fields_should_be_camel_case.style = static_field_style
91+
92+
dotnet_naming_symbols.static_fields.applicable_kinds = field
93+
dotnet_naming_symbols.static_fields.required_modifiers = static
94+
95+
dotnet_naming_style.static_field_style.capitalization = camel_case
96+
dotnet_naming_style.static_field_style.required_prefix = _
97+
98+
# Instance fields are camelCase and start with _
99+
dotnet_naming_rule.instance_fields_should_be_camel_case.severity = suggestion
100+
dotnet_naming_rule.instance_fields_should_be_camel_case.symbols = instance_fields
101+
dotnet_naming_rule.instance_fields_should_be_camel_case.style = instance_field_style
102+
103+
dotnet_naming_symbols.instance_fields.applicable_kinds = field
104+
105+
dotnet_naming_style.instance_field_style.capitalization = camel_case
106+
dotnet_naming_style.instance_field_style.required_prefix = _
107+
108+
# Locals and parameters are camelCase
109+
dotnet_naming_rule.locals_should_be_camel_case.severity = suggestion
110+
dotnet_naming_rule.locals_should_be_camel_case.symbols = locals_and_parameters
111+
dotnet_naming_rule.locals_should_be_camel_case.style = camel_case_style
112+
113+
dotnet_naming_symbols.locals_and_parameters.applicable_kinds = parameter, local
114+
115+
dotnet_naming_style.camel_case_style.capitalization = camel_case
116+
117+
# Local functions are PascalCase
118+
dotnet_naming_rule.local_functions_should_be_pascal_case.severity = suggestion
119+
dotnet_naming_rule.local_functions_should_be_pascal_case.symbols = local_functions
120+
dotnet_naming_rule.local_functions_should_be_pascal_case.style = local_function_style
121+
122+
dotnet_naming_symbols.local_functions.applicable_kinds = local_function
123+
124+
dotnet_naming_style.local_function_style.capitalization = pascal_case
125+
126+
# By default, name items with PascalCase
127+
dotnet_naming_rule.members_should_be_pascal_case.severity = suggestion
128+
dotnet_naming_rule.members_should_be_pascal_case.symbols = all_members
129+
dotnet_naming_rule.members_should_be_pascal_case.style = pascal_case_style
130+
131+
dotnet_naming_symbols.all_members.applicable_kinds = *
132+
133+
dotnet_naming_style.pascal_case_style.capitalization = pascal_case
134+
135+
###############################
136+
# C# Coding Conventions #
137+
###############################
138+
[*.cs]
139+
# var preferences
140+
csharp_style_var_for_built_in_types = true:silent
141+
csharp_style_var_when_type_is_apparent = true:silent
142+
csharp_style_var_elsewhere = true:silent
143+
# Expression-bodied members
144+
csharp_style_expression_bodied_methods = false:silent
145+
csharp_style_expression_bodied_constructors = false:silent
146+
csharp_style_expression_bodied_operators = false:silent
147+
csharp_style_expression_bodied_properties = true:silent
148+
csharp_style_expression_bodied_indexers = true:silent
149+
csharp_style_expression_bodied_accessors = true:silent
150+
# Pattern matching preferences
151+
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
152+
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
153+
# Null-checking preferences
154+
csharp_style_throw_expression = true:suggestion
155+
csharp_style_conditional_delegate_call = true:suggestion
156+
# Modifier preferences
157+
csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:suggestion
158+
# Expression-level preferences
159+
csharp_prefer_braces = true:silent
160+
csharp_style_deconstructed_variable_declaration = true:suggestion
161+
csharp_prefer_simple_default_expression = true:suggestion
162+
csharp_style_pattern_local_over_anonymous_function = true:suggestion
163+
csharp_style_inlined_variable_declaration = true:suggestion
164+
165+
###############################
166+
# C# Formatting Rules #
167+
###############################
168+
# New line preferences
169+
csharp_new_line_before_open_brace = all
170+
csharp_new_line_before_else = true
171+
csharp_new_line_before_catch = true
172+
csharp_new_line_before_finally = true
173+
csharp_new_line_before_members_in_object_initializers = true
174+
csharp_new_line_before_members_in_anonymous_types = true
175+
csharp_new_line_between_query_expression_clauses = true
176+
# Indentation preferences
177+
csharp_indent_case_contents = true
178+
csharp_indent_switch_labels = true
179+
csharp_indent_labels = flush_left
180+
# Space preferences
181+
csharp_space_after_cast = false
182+
csharp_space_after_keywords_in_control_flow_statements = true
183+
csharp_space_between_method_call_parameter_list_parentheses = false
184+
csharp_space_between_method_declaration_parameter_list_parentheses = false
185+
csharp_space_between_parentheses = false
186+
csharp_space_before_colon_in_inheritance_clause = true
187+
csharp_space_after_colon_in_inheritance_clause = true
188+
csharp_space_around_binary_operators = before_and_after
189+
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
190+
csharp_space_between_method_call_name_and_opening_parenthesis = false
191+
csharp_space_between_method_call_empty_parameter_list_parentheses = false
192+
# Wrapping preferences
193+
csharp_preserve_single_line_statements = true
194+
csharp_preserve_single_line_blocks = true

.github/dependabot.yml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
version: 2
2+
updates:
3+
# Fetch and update latest `nuget` pkgs
4+
- package-ecosystem: nuget
5+
directory: /
6+
schedule:
7+
interval: weekly
8+
open-pull-requests-limit: 10
9+
labels:
10+
- chore
11+
- dependency
12+
- nuget
13+
commit-message:
14+
prefix: chore
15+
include: scope
16+
17+
# Fetch and update latest `github-actions` pkgs
18+
- package-ecosystem: github-actions
19+
directory: /
20+
schedule:
21+
interval: monthly
22+
open-pull-requests-limit: 10
23+
labels:
24+
- ci
25+
- dependency
26+
- github-actions
27+
commit-message:
28+
prefix: ci
29+
include: scope

.github/workflows/release.yml

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Release
2+
3+
on:
4+
release:
5+
types:
6+
- released
7+
branches: main
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
name: Build & Release
13+
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v2
17+
with:
18+
ref: main
19+
- name: Setup dotnet
20+
uses: actions/setup-dotnet@v1
21+
with:
22+
dotnet-version: 6.0.x
23+
- name: Restore nuget packages
24+
run: dotnet restore Authelia-Auth/Authelia-Auth.csproj
25+
- name: Setup python
26+
uses: actions/setup-python@v2
27+
with:
28+
python-version: 3.8
29+
- name: Install JPRM
30+
run: python -m pip install jprm
31+
- name: Run JPRM
32+
run: python build_plugin.py --version=${GITHUB_REF#refs/*/}
33+
- name: Update release
34+
uses: svenstaro/upload-release-action@v2
35+
with:
36+
repo_token: ${{ secrets.GITHUB_TOKEN }}
37+
file: ./artifacts/authelia-authentication*.zip
38+
tag: ${{ github.ref }}
39+
file_glob: true
40+
- name: Update manifest
41+
uses: stefanzweifel/git-auto-commit-action@v4
42+
with:
43+
branch: main
44+
commit_message: Update repo manifest
45+
file_pattern: manifest.json

.gitignore

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
################################################################################
2+
# This .gitignore file was automatically created by Microsoft(R) Visual Studio.
3+
################################################################################
4+
*/obj
5+
*/bin
6+
/bin
7+
.idea
8+
artifacts
9+
authelia-authentication

.vscode/launch.json

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
// Use IntelliSense to find out which attributes exist for C# debugging
6+
// Use hover for the description of the existing attributes
7+
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
8+
"name": ".NET Core Launch (console)",
9+
"type": "coreclr",
10+
"request": "launch",
11+
"preLaunchTask": "build",
12+
// If you have changed target frameworks, make sure to update the program path.
13+
"program": "${workspaceFolder}/Authelia_Auth.Tests/bin/Debug/net6.0/Authelia_Auth.Tests.dll",
14+
"args": [],
15+
"cwd": "${workspaceFolder}/Authelia_Auth.Tests",
16+
// For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console
17+
"console": "internalConsole",
18+
"stopAtEntry": false
19+
},
20+
{
21+
"name": ".NET Core Attach",
22+
"type": "coreclr",
23+
"request": "attach"
24+
}
25+
]
26+
}

.vscode/tasks.json

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"label": "build",
6+
"command": "dotnet",
7+
"type": "process",
8+
"args": [
9+
"build",
10+
"${workspaceFolder}/Authelia_Auth.Tests/Authelia_Auth.Tests.csproj",
11+
"/property:GenerateFullPaths=true",
12+
"/consoleloggerparameters:NoSummary"
13+
],
14+
"problemMatcher": "$msCompile"
15+
},
16+
{
17+
"label": "publish",
18+
"command": "dotnet",
19+
"type": "process",
20+
"args": [
21+
"publish",
22+
"${workspaceFolder}/Authelia_Auth.Tests/Authelia_Auth.Tests.csproj",
23+
"/property:GenerateFullPaths=true",
24+
"/consoleloggerparameters:NoSummary"
25+
],
26+
"problemMatcher": "$msCompile"
27+
},
28+
{
29+
"label": "watch",
30+
"command": "dotnet",
31+
"type": "process",
32+
"args": [
33+
"watch",
34+
"run",
35+
"--project",
36+
"${workspaceFolder}/Authelia_Auth.Tests/Authelia_Auth.Tests.csproj"
37+
],
38+
"problemMatcher": "$msCompile"
39+
}
40+
]
41+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<TargetFramework>net6.0</TargetFramework>
5+
<Nullable>enable</Nullable>
6+
<IsPackable>false</IsPackable>
7+
<ProduceReferenceAssemblyInOutDir>true</ProduceReferenceAssemblyInOutDir>
8+
</PropertyGroup>
9+
10+
<ItemGroup>
11+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.11.0" />
12+
<PackageReference Include="xunit" Version="2.4.1" />
13+
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
14+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
15+
<PrivateAssets>all</PrivateAssets>
16+
</PackageReference>
17+
<PackageReference Include="coverlet.collector" Version="3.1.0">
18+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
19+
<PrivateAssets>all</PrivateAssets>
20+
</PackageReference>
21+
</ItemGroup>
22+
23+
<ItemGroup>
24+
<ProjectReference Include="..\Authelia-Auth\Authelia-Auth.csproj" />
25+
</ItemGroup>
26+
27+
</Project>

0 commit comments

Comments
 (0)