Skip to content

Commit

Permalink
webauthn
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-fowler committed Sep 16, 2024
1 parent 097fef1 commit b14065a
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 9 deletions.
16 changes: 8 additions & 8 deletions webauthn/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ RUN cp "/usr/libexec/swift/linux/swift-backtrace-static" ./
# Copy resources bundled by SPM to staging area
RUN find -L "$(swift build --package-path /build -c release --show-bin-path)/" -regex '.*\.resources$' -exec cp -Ra {} ./ \;

# Copy any resouces from the public directory and views directory if the directories exist
# Copy any resouces from the public directory if the directories exist
# Ensure that by default, neither the directory nor any of its contents are writable.
RUN [ -d /build/public ] && { mv /build/public ./public && chmod -R a-w ./public; } || true

Expand All @@ -54,13 +54,13 @@ RUN export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true \
&& apt-get -q update \
&& apt-get -q dist-upgrade -y \
&& apt-get -q install -y \
libjemalloc2 \
ca-certificates \
tzdata \
# If your app or its dependencies import FoundationNetworking, also install `libcurl4`.
# libcurl4 \
# If your app or its dependencies import FoundationXML, also install `libxml2`.
# libxml2 \
libjemalloc2 \
ca-certificates \
tzdata \
# If your app or its dependencies import FoundationNetworking, also install `libcurl4`.
# libcurl4 \
# If your app or its dependencies import FoundationXML, also install `libxml2`.
# libxml2 \
&& rm -r /var/lib/apt/lists/*

# Create a hummingbird user and group with /app as its home directory
Expand Down
1 change: 1 addition & 0 deletions webauthn/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ let package = Package(
.product(name: "Mustache", package: "swift-mustache"),
.product(name: "WebAuthn", package: "webauthn-swift"),
],
resources: [.process("Resources")],
swiftSettings: [
// Enable better optimizations when building in Release configuration. Despite the use of
// the `.unsafeFlags` construct required by SwiftPM, this flag is recommended for Release
Expand Down
2 changes: 1 addition & 1 deletion webauthn/Sources/App/Application+build.swift
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func buildApplication(_ arguments: AppArguments) async throws -> some Applicatio
let sessionStorage = SessionStorage(memoryPersist)

// load mustache template library
let library = try await MustacheLibrary(directory: "resources/templates")
let library = try await MustacheLibrary(directory: Bundle.module.bundleURL.path)
assert(library.getTemplate(named: "home") != nil, "Set your working directory to the root folder of this example to get it to work")

/// Authenticator storing the user
Expand Down
File renamed without changes.
Binary file modified webauthn/public/images/hummingbird.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit b14065a

Please sign in to comment.