diff --git a/Sources/Neon/Token.swift b/Sources/Neon/Token.swift index aa13da5..e9c20dc 100644 --- a/Sources/Neon/Token.swift +++ b/Sources/Neon/Token.swift @@ -37,3 +37,17 @@ extension TokenApplication: ExpressibleByArrayLiteral { } public typealias TokenProvider = HybridValueProvider + +extension TokenProvider { + /// A TokenProvider that returns an empty set of tokens for all requests. + public static var none: TokenProvider { + .init( + syncValue: { _ in + return TokenApplication(tokens: []) + }, + asyncValue: { _ in + return TokenApplication(tokens: []) + } + ) + } +}