#oauth #api-client #http-request #bindings #user #p7m #api-bindings

p7m-userauth

Rust bindings for the login and authentication API of P7M

2 unstable releases

0.13.0 Jul 7, 2024
0.11.0 Jul 18, 2022

#893 in Web programming

Download history 14/week @ 2024-09-14 13/week @ 2024-09-21 1/week @ 2024-09-28

62 downloads per month

Apache-2.0

83KB
1K SLoC

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 project. By using the openapi-spec 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 DELETE /accounts/{id} Delete a user account
AccountApi get_account_by_id GET /accounts/{id} Get an account, that is known by its ID (UUID)
AccountApi get_accounts GET /accounts Get the list of all accounts of the tenant
AccountApi post_accounts POST /accounts
AccountApi put_account_by_id PUT /accounts/{id}
AuthApi post_login POST /login Authenticate (= proof who you are) to the system using a username and password
AuthApi post_login_authorize POST /login/authorize Authorize access to a given tenant and get JWT for that access
ClientApi delete_clients_by_id_superadmin DELETE /clients/{id} Deletes an OAuth client
ClientApi get_clients_by_id_superadmin GET /clients/{id} Requests a single OAuth client by its ID
ClientApi get_clients_superadmin GET /clients Gets the list of all registered OAuth clients
ClientApi post_clients_superadmin POST /clients Create a new OAuth client
ClientApi put_clients_by_id_superadmin PUT /clients/{id} Updates an OAuth client
ServiceApi delete_services_superadmin DELETE /services/{id} Deletes a service
ServiceApi get_services GET /services Get the list of all known services of P7M
ServiceApi post_services_superadmin POST /services Create a new service
TenantApi delete_tenant_by_id DELETE /tenants/{id} Delete a tenant specified by the tenant's ID
TenantApi get_tenant_by_id GET /tenants/{id} Request a the tenant identified by its ID
TenantApi get_tenants GET /tenants Get the list of tenants
TenantApi post_tenants POST /tenants
TenantApi put_tenant_by_id PUT /tenants/{id} Update an existing tenant

Documentation For Models

To get access to the crate's generated documentation, use:

cargo doc --open

Author

tech@p7m.de

Dependencies

~4–20MB
~227K SLoC