identity capa

identity-auth

Authentication: users, sessions, passwords, API keys

Authentication: users, sessions, passwords, API keys

Tieridentity
Roleunclassified (baselined)
Pathcrates/identity/auth
Edition2021
Targetsgen_hash, identity_auth
Public items0 across 0 modules
Tests39

What it is for

Authentication library crates for Rust applications.

This crate provides:

# Example

use identity_auth::{User, Password, Session};

// Create a user
let user = User::new("john@example.com")
.with_password("secure_password")?;

// Verify password
assert!(user.verify_password("secure_password")?);

// Create a session
let session = Session::new(user.id);

Capabilities

No public items.

How to use it

From `examples/gen_hash.rs`:

use identity_auth::Password;
use std::env;

fn main() {
    let password = env::args()
        .nth(1)
        .unwrap_or_else(|| "changeme123".to_string());
    match Password::hash(&password) {
        Ok(hash) => println!("{}", hash),
        Err(e) => eprintln!("Error: {}", e),
    }
}

Module structure

No public modules: the crate root is its whole surface.

Public surface

No public items.

Re-exports. Exported here, defined elsewhere.

ExportDefined in
ApiKeyapi_key::ApiKey
AuthErrorerror::AuthError
LoginAttemptlogin_attempt::LoginAttempt
Passwordpassword::Password
Sessionsession::Session
{User,UserStatus}user::{User,UserStatus}

Boundary

Reaches into foundation.

Shares tier identity with 7 other crates: identity-identifiers, identity-impersonation, identity-parties, identity-party-places, identity-rbac, identity-tenant, identity-user-prefs.

_What this crate deliberately does NOT own is a judgment. No committed registry records one for it, so none is stated here._

Where it sits

Tier (ontology)identity
Architectural role (taxonomy)unclassified (baselined)
Locationcrates/identity/auth
Vocabulary in force (lexicon)current

Tier flow. Which tiers this crate's own edges cross.

flowchart LR
  n_identity["identity"] --> n_foundation["foundation"]

Dependencies

Runtime, in this workspace.

CrateTierOptionalOnly on
`foundation-basemodels`foundationnoalways
`identity-parties`identitynoalways

Runtime, from outside the workspace.

CrateRequirementFeaturesOptionalOnly on
argon2^0.5noalways
base64^0.22noalways
chrono^0.4serdenoalways
hex^0.4noalways
rand^0.8noalways
serde^1derivenoalways
serde_json^1noalways
sha2^0.10noalways
sqlx^0.8runtime-tokio, postgres, chrono, uuid, jsonnoalways
subtle^2noalways
thiserror^2noalways
tokio^1fullnoalways
uuid^1v4, v7, serde, jsnoalways

Development, from outside the workspace.

CrateRequirementFeaturesOptionalOnly on
tokio-test^0.4noalways

Build. None.

Depended on by. 4 workspace crates.

Signal flow — what reaches this crate, and what it reaches.

flowchart LR
  n_application_auth["application-auth"] -->|uses| SELF
  n_application_dlp["application-dlp"] -->|uses| SELF
  n_application_party_api["application-party-api"] -->|uses| SELF
  n_application_rbac["application-rbac"] -->|uses| SELF
  SELF["identity-auth"]
  SELF -->|runtime| n_foundation_basemodels["foundation-basemodels"]
  SELF -->|runtime| n_identity_parties["identity-parties"]
  classDef self fill:#1f883d,stroke:#1f883d,color:#fff;
  class SELF self;

Feature flags

No Cargo features are defined: every capability is unconditional, so no consumer can receive a half-wired crate.

Targets

KindNameSource
examplegen_hash`examples/gen_hash.rs`
libidentity_auth`src/lib.rs`

Error model

No public error type was detected: no public item declares a type named *Error, and no public signature returns one.

Operational characteristics

PropertyEvidence
async public surfacenone detected
async runtimeyes
database accessyes
network I/Onone detected
unsafe codenone detected
environment variablesnone detected

No unsafe block, unsafe fn, unsafe impl or unsafe trait was found by the parser anywhere in this crate's source.

Configuration

No environment variable is read with a literal name anywhere in this crate. A variable whose key is computed at run time cannot be listed here, and is not claimed to be absent.

4 workspace crates depend on this one: application-auth, application-dlp, application-party-api, application-rbac.

Verification

KindCount
Unit tests39
Integration tests0
Examples1
Doctests0

What the tests establish, by name:

Documentation coverage

MeasureDocumentedTotal
Public items with rustdoc00
Public modules with a //! block00

Metrics

MetricValue
Rust source files7
Source lines1051
Code lines681
Public API items0
Public modules0
Tests39
Examples1
Cargo features0
Direct runtime dependencies15
Workspace reverse dependencies4
pie showData
    title Rust source composition
    "Code" : 681
    "Blank or comment" : 370

Generation

Rendered by tools-corpus corpus readme from repository evidence alone, renderer schema 2, lexicon current. No model, network service or database was consulted. Regenerate with tools-corpus corpus readme --write; verify with --check.

Todas las identity · Manual