# Rust API client for p7m-userauth # API for authentication and managing user accounts This is the API of the service at P7M that manages tenants, accounts and authentication. It is the basis of many services of P7M. The caller has to be authenticated with the system and provide a JWT token in the Authorization header of the HTTP request. When using the API you typically get this token by authenticating first with OAuth 2.0. When you are trying this API using the Swagger interface, you need to click the `Authorize` button and then again the Authorize button in the pop-up that gets opened. ## Overview This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec](https://openapis.org) from a remote server, you can easily generate an API client. - API version: 0.13.0 - Package version: 0.13.0 - Build package: `org.openapitools.codegen.languages.RustClientCodegen` ## Installation Put the package under your project folder in a directory named `p7m-userauth` and add the following to `Cargo.toml` under `[dependencies]`: ``` p7m-userauth = { path = "./p7m-userauth" } ``` ## Documentation for API Endpoints All URIs are relative to *https://login.p7m.de/v1* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- *AccountApi* | [**delete_account_by_id**](docs/AccountApi.md#delete_account_by_id) | **DELETE** /accounts/{id} | Delete a user account *AccountApi* | [**get_account_by_id**](docs/AccountApi.md#get_account_by_id) | **GET** /accounts/{id} | Get an account, that is known by its ID (UUID) *AccountApi* | [**get_accounts**](docs/AccountApi.md#get_accounts) | **GET** /accounts | Get the list of all accounts of the tenant *AccountApi* | [**post_accounts**](docs/AccountApi.md#post_accounts) | **POST** /accounts | *AccountApi* | [**put_account_by_id**](docs/AccountApi.md#put_account_by_id) | **PUT** /accounts/{id} | *AuthApi* | [**post_login**](docs/AuthApi.md#post_login) | **POST** /login | Authenticate (= proof who you are) to the system using a username and password *AuthApi* | [**post_login_authorize**](docs/AuthApi.md#post_login_authorize) | **POST** /login/authorize | Authorize access to a given tenant and get JWT for that access *ClientApi* | [**delete_clients_by_id_superadmin**](docs/ClientApi.md#delete_clients_by_id_superadmin) | **DELETE** /clients/{id} | Deletes an OAuth client *ClientApi* | [**get_clients_by_id_superadmin**](docs/ClientApi.md#get_clients_by_id_superadmin) | **GET** /clients/{id} | Requests a single OAuth client by its ID *ClientApi* | [**get_clients_superadmin**](docs/ClientApi.md#get_clients_superadmin) | **GET** /clients | Gets the list of all registered OAuth clients *ClientApi* | [**post_clients_superadmin**](docs/ClientApi.md#post_clients_superadmin) | **POST** /clients | Create a new OAuth client *ClientApi* | [**put_clients_by_id_superadmin**](docs/ClientApi.md#put_clients_by_id_superadmin) | **PUT** /clients/{id} | Updates an OAuth client *ServiceApi* | [**delete_services_superadmin**](docs/ServiceApi.md#delete_services_superadmin) | **DELETE** /services/{id} | Deletes a service *ServiceApi* | [**get_services**](docs/ServiceApi.md#get_services) | **GET** /services | Get the list of all known services of P7M *ServiceApi* | [**post_services_superadmin**](docs/ServiceApi.md#post_services_superadmin) | **POST** /services | Create a new service *TenantApi* | [**delete_tenant_by_id**](docs/TenantApi.md#delete_tenant_by_id) | **DELETE** /tenants/{id} | Delete a tenant specified by the tenant's ID *TenantApi* | [**get_tenant_by_id**](docs/TenantApi.md#get_tenant_by_id) | **GET** /tenants/{id} | Request a the tenant identified by its ID *TenantApi* | [**get_tenants**](docs/TenantApi.md#get_tenants) | **GET** /tenants | Get the list of tenants *TenantApi* | [**post_tenants**](docs/TenantApi.md#post_tenants) | **POST** /tenants | *TenantApi* | [**put_tenant_by_id**](docs/TenantApi.md#put_tenant_by_id) | **PUT** /tenants/{id} | Update an existing tenant ## Documentation For Models - [Account](docs/Account.md) - [AccountData](docs/AccountData.md) - [AuthorizationRequest](docs/AuthorizationRequest.md) - [AuthorizationResponse](docs/AuthorizationResponse.md) - [Client](docs/Client.md) - [ClientData](docs/ClientData.md) - [ClientUpdate](docs/ClientUpdate.md) - [NewAccount](docs/NewAccount.md) - [NewClient](docs/NewClient.md) - [NewService](docs/NewService.md) - [NewTenant](docs/NewTenant.md) - [PasswordLoginAttempt](docs/PasswordLoginAttempt.md) - [PasswordLoginResponse](docs/PasswordLoginResponse.md) - [Service](docs/Service.md) - [ServiceData](docs/ServiceData.md) - [Tenant](docs/Tenant.md) - [TenantData](docs/TenantData.md) - [UserType](docs/UserType.md) To get access to the crate's generated documentation, use: ``` cargo doc --open ``` ## Author tech@p7m.de