Rust API client for tapis_authenticator
REST API and web server providing authentication for a Tapis v3 instance.
For more information, please visit https://tapis-project.org
Overview
This SDK provides both low-level generated API bindings and a high-level ergonomic client wrapper for the Tapis Authenticator API.
- API version: 1
- Package version: 1.0.0
- Generator version: 7.18.0
- Build package:
org.openapitools.codegen.languages.RustClientCodegen
Installation
Put the package under your project folder in a directory named tapis_authenticator and add the following to Cargo.toml under [dependencies]:
= { = "./tapis_authenticator" }
Quick Start
Using the High-Level Client (Recommended)
The TapisAuthenticator client provides an ergonomic interface with automatic JWT authentication:
use TapisAuthenticator;
async
Available API Modules
The client provides the following sub-clients:
-
client.admin- Tenant configuration managementget_config()- Get tenant configurationupdate_config()- Update tenant configuration
-
client.clients- OAuth2 client managementlist_clients()- List all OAuth2 clientsget_client()- Get specific client detailscreate_client()- Create new OAuth2 clientupdate_client()- Update OAuth2 clientdelete_client()- Delete OAuth2 client
-
client.health_check- Service health checkshello()- Basic health checkready()- Readiness check
-
client.metadata- Server metadataget_server_metadata()- Get server version and metadata
-
client.profiles- User profile managementget_userinfo()- Get current user informationget_profile()- Get specific user profilelist_profiles()- List all profiles
-
client.tokens- Token managementcreate_token()- Generate Tapis JWTcreate_v2_token()- Create v2 bearer tokengenerate_device_code()- Generate device code for device flowrevoke_token()- Revoke authentication token
Running the Example
# Set your JWT token
# Run the example
Documentation for API Endpoints
All URIs are relative to http://localhost:5000
| Class | Method | HTTP request | Description |
|---|---|---|---|
| AdminApi | get_config | GET /v3/oauth2/admin/config | |
| AdminApi | update_config | PUT /v3/oauth2/admin/config | |
| ClientsApi | create_client | POST /v3/oauth2/clients | |
| ClientsApi | delete_client | DELETE /v3/oauth2/clients/{client_id} | Permanently set a client to inactive. |
| ClientsApi | get_client | GET /v3/oauth2/clients/{client_id} | Get client details |
| ClientsApi | list_clients | GET /v3/oauth2/clients | |
| ClientsApi | update_client | PUT /v3/oauth2/clients/{client_id} | Update client details |
| HealthCheckApi | hello | GET /v3/oauth2/hello | |
| HealthCheckApi | ready | GET /v3/oauth2/ready | |
| MetadataApi | get_server_metadata | GET /v3/oauth2/.well-known/oauth-authorization-server | |
| ProfilesApi | get_profile | GET /v3/oauth2/profiles/{username} | |
| ProfilesApi | get_userinfo | GET /v3/oauth2/userinfo | |
| ProfilesApi | list_profiles | GET /v3/oauth2/profiles | |
| TokensApi | create_token | POST /v3/oauth2/tokens | Generate a Tapis JWT |
| TokensApi | create_v2_token | POST /v3/oauth2/v2/token | Create a v2 bearer token from a Tapis v3 JWT. |
| TokensApi | generate_device_code | POST /v3/oauth2/device/code | Generate a device code. |
| TokensApi | revoke_token | POST /v3/oauth2/tokens/revoke | Revoke a token. |
Documentation For Models
- BasicResponse
- Client
- CreateClient201Response
- CreateToken201Response
- CreateV2Token200Response
- DeleteClient200Response
- DeviceCodeResposne
- GenerateDeviceCode200Response
- GetConfig200Response
- GetServerMetadata200Response
- GetUserinfo200Response
- ListClients200Response
- ListProfiles200Response
- NewClient
- NewDeviceCode
- NewTenantConfig
- NewToken
- OAuth2Metadata
- Profile
- RevokeTokenRequest
- TenantConfig
- TokenResponse
- TokenResponseAccessToken
- TokenResponseRefreshToken
- UpdateClient
- V2Token
- V2TokenResponse
To get access to the crate's generated documentation, use:
cargo doc --open