Skip to content

Authentication

add_openID_Connect_provider async

add_openID_Connect_provider(auth: Annotated[Auth, Depends(authorize(HYBRID))], db: Annotated[Session, Depends(get_db)], body: IdentityProviderBody) -> IdentityProviderInfo

Adds a new OpenID Connect provider

args:

  • database

returns:

  • openID Connect provider

change_password_UserId async

change_password_UserId(auth: Annotated[Auth, Depends(authorize(HYBRID))], db: Annotated[Session, Depends(get_db)], body: SetPasswordBody, user_id: Annotated[int, Path(alias=userId)]) -> ChangeLoginInfoResponse

Set the password of the user to a new password

args:

  • the request body

  • The current database

returns:

  • the response from the api after the password change request

delete_openID_Connect_provider async

delete_openID_Connect_provider(auth: Annotated[Auth, Depends(authorize(HYBRID))], db: Annotated[Session, Depends(get_db)], open_Id_Connect_provider_Id: Annotated[str, Path(alias=openIDConnectProvider)]) -> ChangeLoginInfoResponse

Deletes an OpenID Connect provider

args:

  • OpenID Connect provider

  • The current database

returns:

  • database

edit_openID_Connect_provider async

edit_openID_Connect_provider(auth: Annotated[Auth, Depends(authorize(HYBRID))], db: Annotated[Session, Depends(get_db)], open_Id_Connect_provider_Id: Annotated[str, Path(alias=openIDConnectProvider)], body: IdentityProviderEditBody) -> ChangeLoginInfoResponse

Edits an OpenID Connect provider

args:

  • OpenID Connect provider

  • The current database

returns:

  • updated OpenID Connect provider

exchange_token_login async

exchange_token_login(body: ExchangeTokenLoginBody) -> TokenResponse

Login with exchange token.

Inout:

  • the request body

returns:

  • the login token

get_all_open_id_connect_providers async

get_all_open_id_connect_providers(db: Annotated[Session, Depends(get_db)]) -> list[GetIdentityProviderResponse]

Fetches all OpenID Connect providers

args: - Authorization token - Database session

returns: - List of OpenID Connect providers

get_all_open_id_connect_providers_info async

get_all_open_id_connect_providers_info(db: Annotated[Session, Depends(get_db)]) -> list[IdentityProviderInfo]

Fetches all OpenID Connect providers

args: - Authorization token - Database session

returns: - List of OpenID Connect providers

get_open_id_connect_provider_by_id async

get_open_id_connect_provider_by_id(auth: Annotated[Auth, Depends(authorize(HYBRID))], db: Annotated[Session, Depends(get_db)], provider_id: Annotated[str, Path(alias=providerId)]) -> GetIdentityProviderResponse

Fetches a single OpenID Connect provider by its ID

args: - Authorization token - Database session - Provider ID

returns: - OpenID Connect provider details

password_login async

password_login(db: Annotated[Session, Depends(get_db)], body: PasswordLoginBody) -> TokenResponse

Login with password.

args:

  • the database

  • the request body

returns:

  • the login token

redirect_to_frontend async

redirect_to_frontend(db: Annotated[Session, Depends(get_db)], identity_provider_name: Annotated[str, Path(alias=identityProviderName)], body: IdentityProviderCallbackBody) -> TokenResponse

Redirects to the frontend.

args:

  • the database

  • the identity provider id

  • the code

returns:

  • the redirection

set_password async

set_password(db: Annotated[Session, Depends(get_db)], body: ChangePasswordBody) -> TokenResponse

Sets the password of the user to a new password.

args:

  • the database

returns:

  • the response form the api after the password change request

start_login async

start_login(db: Annotated[Session, Depends(get_db)], body: StartLoginBody) -> dict

Starts the login process.

args:

  • the database

  • the request body

returns:

  • dict