// AuthStrategyFactory.ts

import { AuthStrategy } from "./auth-strategy.js"
import { ApiKeyAuthStrategy } from "./cf-api-key-strategy.js"
import { JwtAuth0Strategy } from "./jwt-auth0-strategy.js"

export class AuthStrategyFactory {
  static getStrategy(apiKey: string): AuthStrategy {
    if (apiKey?.startsWith("cf-")) {
      return new ApiKeyAuthStrategy(apiKey)
    }
    return new JwtAuth0Strategy(apiKey)
  }
}
