falcon_auth2/getter.py
def load(self, req: Request, *, challenges: Optional[Iterable[str]] = None) -> str:
        """Loads the auth header from the provided request"""
        prefix, _, value = super().load(req, challenges=challenges).partition(" ")
        if prefix.casefold() != self.auth_header_type:
            raise BackendNotApplicable(
                description=f"Invalid {self.header_key} header: Must "
                f"start with {self.auth_header_type.title()}",
                challenges=challenges,
            )

        if not value:
            raise BackendNotApplicable(
                description="Invalid Authorization header: Value Missing", challenges=challenges
            )

        if " " in value:
            raise BackendNotApplicable(
                description="Invalid Authorization header: Contains extra content",
                challenges=challenges,
            )

        return value
Loads the auth header from the provided request
Loads the auth header from the provided request
Loads the auth header from the provided request
def load(self, req: Request, *, challenges: Optional[Iterable[str]] = None) -> str:
        prefix, _, value = super().load(req, challenges=challenges).partition(" ")
        if prefix.casefold() != self.auth_header_type:
            raise BackendNotApplicable(
                description=f"Invalid {self.header_key} header: Must "
                f"start with {self.auth_header_type.title()}",
                challenges=challenges,
            )
        if not value:
            raise BackendNotApplicable(
                description="Invalid Authorization header: Value Missing", challenges=challenges
            )
        if " " in value:
            raise BackendNotApplicable(
                description="Invalid Authorization header: Contains extra content",
                challenges=challenges,
            )
        return value
def load ( self , req : Request , * , challenges : Optional [ Iterable [ str ] ] = None ) -> str : prefix , _ , value = super ( ) . load ( req , challenges = challenges ) . partition ( " " ) if prefix . casefold ( ) != self . auth_header_type : raise BackendNotApplicable ( description = f"Invalid {self.header_key} header: Must " f"start with {self.auth_header_type.title()}" , challenges = challenges , ) if not value : raise BackendNotApplicable ( description = "Invalid Authorization header: Value Missing" , challenges = challenges ) if " " in value : raise BackendNotApplicable ( description = "Invalid Authorization header: Contains extra content" , challenges = challenges , ) return value
Loads the auth header from the provided request
Loads the auth header from the provided request
"""Loads the auth header from the provided request"""
self
req
Request
challenges
Optional[Iterable[str]]