Skip to content

Authentication

add_openID_Connect_provider async

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

Adds a new OpenID Connect provider

Input:

  • database

Output:

  • openID Connect provider

change_password_UserId async

change_password_UserId(
    auth: Annotated[
        Auth, Depends(authorize(AuthStrategy.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

Input:

  • the request body

  • The current database

Output:

  • the response from the api after the password change request

delete_openID_Connect_provider async

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

Deletes an OpenID Connect provider

Input:

  • OpenID Connect provider

  • The current database

Output:

  • database

edit_openID_Connect_provider async

edit_openID_Connect_provider(
    auth: Annotated[
        Auth, Depends(authorize(AuthStrategy.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

Input:

  • OpenID Connect provider

  • The current database

Output:

  • updated OpenID Connect provider

exchange_token_login async

exchange_token_login(
    body: ExchangeTokenLoginBody,
) -> TokenResponse

Login with exchange token.

Inout:

  • the request body

Output:

  • 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

Input: - Authorization token - Database session

Output: - 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

Input: - Authorization token - Database session

Output: - 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(AuthStrategy.HYBRID))
    ],
    db: Annotated[Session, Depends(get_db)],
    provider_id: Annotated[str, Path(alias=providerId)],
) -> GetIdentityProviderResponse

Fetches a single OpenID Connect provider by its ID

Input: - Authorization token - Database session - Provider ID

Output: - OpenID Connect provider details

password_login async

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

Login with password.

Input:

  • the database

  • the request body

Output:

  • 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.

Input:

  • the database

  • the identity provider id

  • the code

Output:

  • 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.

Input:

  • the database

Output:

  • 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.

Input:

  • the database

  • the request body

Output:

  • dict