class HonoAuthTagger

Defined in:

tagger/framework_taggers/javascript/hono_auth.cr

Constant Summary

CONTEXT_USER_PATTERNS = [/c\.var\.(user|payload|auth|session)/, /c\.get\s*\(\s*['"](user|payload|auth|session)/]

Context user extraction after auth (secondary signal)

CUSTOM_AUTH_NAMES = [/\bauthMiddleware\b/i, /\bauthGuard\b/i, /\brequireAuth\b/i, /\bverifyToken\b/i, /\bcheckAuth\b/i, /\bensureAuth\b/i, /\bwithAuth\b/i]

Custom or third-party auth middleware names commonly used with Hono

HONO_AUTH_MIDDLEWARE = [{/\bbearerAuth\s*\(/, "Hono bearerAuth middleware"}, {/\bjwt\s*\(/, "Hono jwt middleware"}, {/\bbasicAuth\s*\(/, "Hono basicAuth middleware"}]

Hono official auth middleware

Constructors

Class Method Summary

Instance Method Summary

Instance methods inherited from class FrameworkTagger

collect_files_by_extension(extension : String) : Array(String) collect_files_by_extension, read_file(path : String) : String | Nil read_file, read_source_context(endpoint : Endpoint) : Array(SourceContext) read_source_context, static_asset_route?(url : String) : Bool static_asset_route?

Constructor methods inherited from class FrameworkTagger

new(options : Hash(String, YAML::Any)) new

Class methods inherited from class FrameworkTagger

target_techs : Array(String) target_techs

Instance methods inherited from module FileHelper

all_files : Array(String) all_files, get_files_by_extension(extension : String) : Array(String) get_files_by_extension, get_files_by_prefix(prefix : String) : Array(String) get_files_by_prefix, get_files_by_prefix_and_extension(prefix : String, extension : String) : Array(String) get_files_by_prefix_and_extension, get_public_dir_files(base_path : String, folder : String) : Array(String) get_public_dir_files, get_public_files(base_path : String, anchors : Array(String) = ["shard.yml", "Gemfile"]) : Array(String) get_public_files

Instance methods inherited from class Tagger

name : String name, perform(endpoints : Array(Endpoint)) : Array(Endpoint) perform

Constructor methods inherited from class Tagger

new(options : Hash(String, YAML::Any)) new

Constructor Detail

def self.new(options : Hash(String, YAML::Any)) #

[View source]

Class Method Detail

def self.target_techs : Array(String) #

[View source]

Instance Method Detail

def perform(endpoints : Array(Endpoint)) : Array(Endpoint) #

[View source]