Skip to content

Latest commit

 

History

History

README.md

Auth with Secret OTP (Python)

Authentication example using secret-based OTP verification.

Run on Intuned

Run on Intuned

APIs

API Description
list-contracts List contracts for the authenticated user

Getting started

Install dependencies

uv sync

If the intuned CLI is not installed, install it globally:

npm install -g @intuned/cli

After installing dependencies, intuned command should be available in your environment.

Run an API

intuned dev run api list-contracts .parameters/api/list-contracts/default.json --auth-session test-authsession

Auth Sessions

# Create
intuned dev run authsession create .parameters/auth-sessions/create/default.json

# Validate
intuned dev run authsession validate test-authsession

# Update
intuned dev run authsession update test-authsession

Save project

intuned dev provision

Deploy

intuned dev deploy

Project structure

/
├── api/
│   └── list-contracts.py             # List contracts for authenticated user
├── auth-sessions/
│   ├── check.py                      # Validates if the auth session is still active
│   └── create.py                     # Creates/recreates the auth session via OTP
├── auth-sessions-instances/
│   └── test-authsession/            # Example local auth session
│       ├── auth-session.json
│       └── metadata.json
├── utils/
│   └── types_and_schemas.py          # Type definitions and schemas
├── intuned-resources/
│   ├── jobs/
│   │   └── list-contracts.job.jsonc  # Job definition (payload, auth session)
│   └── auth-sessions/
│       └── test-authsession.auth-session.jsonc  # Auth session credentials
├── .parameters/api/                  # Test parameters
├── Intuned.jsonc                      # Project config
├── pyproject.toml                     # Python dependencies
└── README.md

Related