Anasayfa / 2021 / Aralık

Monthly Archives: Aralık 2021

Python active directory login fastapi

import win32security from typing import Optional from fastapi import Body, FastAPI from pydantic import BaseModel, Field from uvicorn import run app = FastAPI() def login_windows_func(user_name:str,password:str): try: token = win32security.LogonUser( user_name, 'SOLMAZDOM', password, win32security.LOGON32_LOGON_NETWORK, win32security.LOGON32_PROVIDER_DEFAULT) authenticated = bool(token) return authenticated except Exception as e: print (str(e)) return False class LoginForm(BaseModel): username: …

Devamını Oku »

ubuntu redis server RedisJSON modülü kurulumu

Öncelikle redis kurulumu yapalım sudo add-apt-repository ppa:redislabs/redis sudo apt-get update sudo apt-get install redis sudo apt install build-essential llvm cmake libclang1 libclang-dev cargo git clone https://github.com/RedisLabsModules/rejson.git cargo build --release Can’t load module from hatası almamak için sudo mv /home/username/rejson/target/release/librejson.so /usr/local/lib/ vi /etc/redis/redis.conf ############################ MODULES ##################################### redis sunucumuz her yeniden başladığında …

Devamını Oku »