Skip to content

[Rust] Identity system in fd5 crate #168

@gerchowl

Description

@gerchowl

Parent: #161

Goal

Add identity module to the fd5 Rust crate for loading ~/.fd5/identity.toml.

Spec

  • Identity struct (serde): identity_type: String, id: String, name: String
  • load_identity() -> Fd5Result<Identity> — read ~/.fd5/identity.toml, anonymous fallback
  • save_identity(identity: &Identity) -> Fd5Result<()>
  • Identity::anonymous() -> Identity — default anonymous identity
  • Identity::to_author() -> Author — convert to Author struct for audit entries

TOML format

[identity]
type = "orcid"
id = "0000-0002-1825-0097"
name = "Lars Gerchow"

TDD

  • Test load from valid TOML
  • Test missing file → anonymous
  • Test save + load round-trip
  • Test identity type validation
  • Test to_author conversion

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:corefd5 core libraryaudit-trailAudit trail / provenance chain featureeffort:medium1-4 hoursfeatureNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions