Results of 1 - 4 of about 4 for encoded (0.008 sec.)
- OAuth2 scopes 11335
- OAuth2 scopes Warning The current page still doesn't have a translation for this language. But you can help translating it: Contributing . You can use OAuth2 scopes directly with FastAPI , they are integrated to work seamlessly. This would
...lta else : expire = datetime . now ( timezone . utc ) + timedelta ( minutes = 15 ) to_encode . update ({ "exp" : expire }) encoded_jwt = jwt . encode ( to_encode , SECRET_KEY , algorithm = ALGORITHM ) return encoded_jwt async def get_current_user ( secu...lta else : expire = datetime . now ( timezone . utc ) + timedelta ( minutes = 15 ) to_encode . update ({ "exp" : expire }) encoded_jwt = jwt . encode ( to_encode , SECRET_KEY , algorithm = ALGORITHM ) return encoded_jwt async def get_current_user ( secu...lta else : expire = datetime . now ( timezone . utc ) + timedelta ( minutes = 15 ) to_encode . update ({ "exp" : expire }) encoded_jwt = jwt . encode ( to_encode , SECRET_KEY , algorithm = ALGORITHM ) return encoded_jwt async def get_current_user ( secu... - https://man.mtool.work/fastapi/0.115/advanced/security/oauth2-scopes/
- パスワード(およびハッシュ化)によるOAuth2、JWTトークンによるBearer 10651
- パスワード(およびハッシュ化)によるOAuth2、JWTトークンによるBearer これでセキュリティの流れが全てわかったので、 JWT トークンと安全なパスワードのハッシュ化を使用して、実際にアプリケーションを安全にしてみましょう。 このコードは、アプリケーシ
...lta else : expire = datetime . now ( timezone . utc ) + timedelta ( minutes = 15 ) to_encode . update ({ "exp" : expire }) encoded_jwt = jwt . encode ( to_encode , SECRET_KEY , algorithm = ALGORITHM ) return encoded_jwt async def get_current_user ( toke...lta else : expire = datetime . now ( timezone . utc ) + timedelta ( minutes = 15 ) to_encode . update ({ "exp" : expire }) encoded_jwt = jwt . encode ( to_encode , SECRET_KEY , algorithm = ALGORITHM ) return encoded_jwt async def get_current_user ( toke...lta else : expire = datetime . now ( timezone . utc ) + timedelta ( minutes = 15 ) to_encode . update ({ "exp" : expire }) encoded_jwt = jwt . encode ( to_encode , SECRET_KEY , algorithm = ALGORITHM ) return encoded_jwt async def get_current_user ( toke... - https://man.mtool.work/fastapi/0.115/tutorial/security/oauth2-jwt/
- ボディ - 更新 8210
- ボディ - 更新 PUT による置換での更新 項目を更新するには HTTPの PUT 操作を使用することができます。 jsonable_encoder を用いて、入力データをJSON形式で保存できるデータに変換することができます(例:NoSQLデータベース)。例えば、 datetime を str に
.... put ( "/items/ {item_id} " , response_model = Item ) async def update_item ( item_id : str , item : Item ): update_item_encoded = jsonable_encoder ( item ) items [ item_id ] = update_item_encoded return update_item_encoded ? Other versions and varian.... put ( "/items/ {item_id} " , response_model = Item ) async def update_item ( item_id : str , item : Item ): update_item_encoded = jsonable_encoder ( item ) items [ item_id ] = update_item_encoded return update_item_encoded from typing import Union fr.... put ( "/items/ {item_id} " , response_model = Item ) async def update_item ( item_id : str , item : Item ): update_item_encoded = jsonable_encoder ( item ) items [ item_id ] = update_item_encoded return update_item_encoded 既存のデータを置き換えるべき... - https://man.mtool.work/fastapi/0.115/tutorial/body-updates/
- Request Files 6749
- Request Files Warning The current page still doesn't have a translation for this language. But you can help translating it: Contributing . You can define files to be uploaded by the client using File . Info To receive uploaded files, first
...stAPI will make sure to read that data from the right place instead of JSON. Technical Details Data from forms is normally encoded using the "media type" application/x-www-form-urlencoded when it doesn't include files. But when the form includes files,...it is encoded as multipart/form-data . If you use File , FastAPI will know it has to get the files from the correct part of the body. If...h operation , but you can't also declare Body fields that you expect to receive as JSON, as the request will have the body encoded using multipart/form-data instead of application/json . This is not a limitation of FastAPI , it's part of the HTTP protoc... - https://man.mtool.work/fastapi/0.115/tutorial/request-files/
PREV
1
NEXT