Skip to content

Commit

Permalink
Docc fixups
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-fowler committed Feb 7, 2024
1 parent 9867667 commit a3b4c72
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Sources/HummingbirdAuth/Authenticator/Authenticator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ public protocol HBAuthenticatable: Sendable {}
/// run then throw an error.
///
/// To use an authenticator middleware it is required that your request context conform to
/// ``HBAuthRequestContextProtocol`` so the middleware can attach authentication data to
/// ``HBAuthRequestContextProtocol/auth``.
/// ``HBAuthRequestContext`` so the middleware can attach authentication data to
/// ``HBAuthRequestContext/auth``.
///
/// A simple username, password authenticator could be implemented as follows. If the
/// authenticator is successful it returns a `User` struct, otherwise it returns `nil`.
///
/// ```swift
/// struct BasicAuthenticator: HBAuthenticator {
/// func authenticate<Context: HBAuthRequestContextProtocol>(request: HBRequest, context: Context) async throws -> User? {
/// func authenticate<Context: HBAuthRequestContext>(request: HBRequest, context: Context) async throws -> User? {
/// // Basic authentication info in the "Authorization" header, is accessible
/// // via request.headers.basic
/// guard let basic = request.headers.basic else { return nil }
Expand Down
2 changes: 1 addition & 1 deletion Sources/HummingbirdAuth/Sessions/SessionStorage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public struct HBSessionStorage: Sendable {
///
/// Saving a new session will create a new session id and returns a cookie setting
/// the session id. You need to then return a response including this cookie. You
/// can either create an ``HBResponse`` directly or use ``HBEditedResponse`` to
/// can either create an ``HummingbirdCore/HBResponse`` directly or use ``Hummingbird/HBEditedResponse`` to
/// generate the response from another type.
/// ```swift
/// let cookie = try await sessionStorage.save(session: session, expiresIn: .seconds(600))
Expand Down

0 comments on commit a3b4c72

Please sign in to comment.