INNER CODE UNIT · Python

jwt_in_cookies

IndominusByte/fastapi-jwt-auth · fastapi_jwt_auth/auth_config.py:48

    def jwt_in_cookies(self) -> bool:
        return 'cookies' in self._token_location

    @property
    def jwt_in_headers(self) -> bool:
        return 'headers' in self._token_location

    @classmethod
    def load_config(cls, settings: Callable[...,List[tuple]]) -> "AuthConfig":
        try:
            config = LoadConfig(**{key.lower():value for key,value in settings()})

            cls._token_location = config.authjwt_token_location
            cls._secret_key = config.authjwt_secret_key
            cls._public_key = config.authjwt_public_key
            cls._private_key = config.authjwt_private_key
            cls._algorithm = config.authjwt_algorithm
            cls._decode_algorithms = config.authjwt_decode_algorithms

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…