Skip to content

Commit 7b6f719

Browse files
0xTimgwynnefpseverino
authored
Vapor Authentication 3 (#73)
* Update manifest * Turn on all the flags * Remove old CI * Add CI * Remove old files * Add OTP * Bump the versions for now * Add OTP tests * Add Bcrypt C code * Add Swift interface * Add bcrypt tests * Spell bcrypt properly * Add password hasher protocol * Add some tests * Better API * Try getting span to work * Get it compiling * Get span stuff working * Fix the warning * Port over base64 code as well * It appears to work * Fix CI * Update README * Try and fix CI * Add formatting config * Formatting * Fixup CI workflows, add .spi.yml, add LICENSE * Some fixes * Update blowfish * Update bcrypt version * Fix the warning * Rename package * Enable Wasm * Fix swift format config file * Fix formatter complaint * Fix iOS scheme * Update .spi.yml Co-authored-by: Francesco Paolo Severino <96546612+fpseverino@users.noreply.github.com> * Rename * Fix Xcode build --------- Co-authored-by: Gwynne Raskind <gwynne@vapor.codes> Co-authored-by: Francesco Paolo Severino <96546612+fpseverino@users.noreply.github.com>
1 parent ddf22f9 commit 7b6f719

51 files changed

Lines changed: 2121 additions & 1140 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/.codecov.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
codecov:
2+
notify:
3+
after_n_builds: 1
4+
wait_for_ci: false
5+
require_ci_to_pass: false
6+
comment:
7+
behavior: default
8+
layout: diff, files
9+
require_changes: true
10+
coverage:
11+
status:
12+
patch:
13+
default:
14+
branches:
15+
- ^main$
16+
informational: true
17+
only_pulls: false
18+
paths:
19+
- ^Sources.*
20+
target: auto
21+
project:
22+
default:
23+
branches:
24+
- ^main$
25+
informational: true
26+
only_pulls: false
27+
paths:
28+
- ^Sources.*
29+
target: auto
30+
github_checks:
31+
annotations: true
32+
ignore:
33+
- ^Tests/.*
34+
- ^.build/.*
35+
slack_app: false
36+

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @0xTim

.github/dependabot.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "daily"
7+
allow:
8+
- dependency-type: all
9+
groups:
10+
dependencies:
11+
patterns:
12+
- "*"

.github/workflows/api-docs.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: deploy-api-docs
2+
on:
3+
push:
4+
branches:
5+
- main
6+
permissions:
7+
contents: read
8+
id-token: write
9+
10+
jobs:
11+
build-and-deploy:
12+
uses: vapor/api-docs/.github/workflows/build-and-deploy-docs-workflow.yml@main
13+
secrets: inherit
14+
with:
15+
package_name: authentication
16+
modules: Authentication
17+
pathsToInvalidate: /authentication/*

.github/workflows/test.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: test
2+
concurrency:
3+
group: ${{ github.workflow }}-${{ github.ref }}
4+
cancel-in-progress: true
5+
on:
6+
pull_request: { types: [opened, reopened, synchronize, ready_for_review] }
7+
push: { branches: [main] }
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
unit-tests:
13+
uses: vapor/ci/.github/workflows/run-unit-tests.yml@main
14+
with:
15+
with_api_check: ${{ github.event_name == 'pull_request' }}
16+
warnings_as_errors: true
17+
with_linting: true
18+
with_windows: true
19+
with_musl: true
20+
with_android: true
21+
with_wasm: true
22+
ios_scheme_name: authentication
23+
secrets: inherit

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
Package.pins
66
DerivedData/
77
Package.resolved
8-
8+
.swiftpm/

.spi.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
version: 1
2+
metadata:
3+
authors: "Maintained by the Vapor Core Team with hundreds of contributions from the Vapor Community."
4+
external_links:
5+
documentation: "https://api.vapor.codes/authentication/documentation/authentication/"

.swift-format

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
{
2+
"fileScopedDeclarationPrivacy": {
3+
"accessLevel": "private"
4+
},
5+
"indentation": {
6+
"spaces": 4
7+
},
8+
"indentConditionalCompilationBlocks": false,
9+
"indentSwitchCaseLabels": false,
10+
"lineBreakAroundMultilineExpressionChainComponents": false,
11+
"lineBreakBeforeControlFlowKeywords": false,
12+
"lineBreakBeforeEachArgument": false,
13+
"lineBreakBeforeEachGenericRequirement": false,
14+
"lineLength": 140,
15+
"maximumBlankLines": 1,
16+
"multiElementCollectionTrailingCommas": true,
17+
"multilineTrailingCommaBehavior": "always",
18+
"noAssignmentInExpressions": {
19+
"allowedFunctions": [
20+
"XCTAssertNoThrow"
21+
]
22+
},
23+
"prioritizeKeepingFunctionOutputTogether": false,
24+
"respectsExistingLineBreaks": true,
25+
"rules": {
26+
"AllPublicDeclarationsHaveDocumentation": false,
27+
"AlwaysUseLiteralForEmptyCollectionInit": false,
28+
"AlwaysUseLowerCamelCase": true,
29+
"AmbiguousTrailingClosureOverload": true,
30+
"BeginDocumentationCommentWithOneLineSummary": false,
31+
"DoNotUseSemicolons": true,
32+
"DontRepeatTypeInStaticProperties": true,
33+
"FileScopedDeclarationPrivacy": true,
34+
"FullyIndirectEnum": true,
35+
"GroupNumericLiterals": true,
36+
"IdentifiersMustBeASCII": true,
37+
"NeverForceUnwrap": false,
38+
"NeverUseForceTry": false,
39+
"NeverUseImplicitlyUnwrappedOptionals": false,
40+
"NoAccessLevelOnExtensionDeclaration": true,
41+
"NoAssignmentInExpressions": true,
42+
"NoBlockComments": true,
43+
"NoCasesWithOnlyFallthrough": true,
44+
"NoEmptyTrailingClosureParentheses": true,
45+
"NoLabelsInCasePatterns": true,
46+
"NoLeadingUnderscores": false,
47+
"NoParensAroundConditions": true,
48+
"NoPlaygroundLiterals": true,
49+
"NoVoidReturnOnFunctionSignature": true,
50+
"OmitExplicitReturns": false,
51+
"OneCasePerLine": true,
52+
"OneVariableDeclarationPerLine": true,
53+
"OnlyOneTrailingClosureArgument": true,
54+
"OrderedImports": true,
55+
"ReplaceForEachWithForLoop": true,
56+
"ReturnVoidInsteadOfEmptyTuple": true,
57+
"TypeNamesShouldBeCapitalized": true,
58+
"UseEarlyExits": false,
59+
"UseExplicitNilCheckInConditions": true,
60+
"UseLetInEveryBoundCaseVariable": true,
61+
"UseShorthandTypeNames": true,
62+
"UseSingleLinePropertyGetter": true,
63+
"UseSynthesizedInitializer": true,
64+
"UseTripleSlashForDocumentationComments": true,
65+
"UseWhereClausesInForLoops": false,
66+
"ValidateDocumentationComments": false
67+
},
68+
"spacesAroundRangeFormationOperators": false,
69+
"tabWidth": 4,
70+
"version": 1
71+
}

CONTRIBUTING.md

Lines changed: 0 additions & 17 deletions
This file was deleted.

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2025 Qutheory, LLC
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)