pawn

A low-level API client for Pwned Passwords pwned-passwords have-i-been-pwned http-client api
1.0.3 Latest release released

Pawn

Pawn is a low-level API client for Pwned Passwords.

Installation

  1. Add the dependency to your shard.yml:

    dependencies:
      pawn:
        github: GrottoPress/pawn
    
  2. Run shards update

  3. Require Pawn in your app/library:

    # ...
    require "pawn"
    # ...
    

Usage

  1. Check if a password appears in any breach:

    Pawn.pwned?("password") # <= true
    
  2. Find how many times a password appears in breaches:

    Pawn.count("password") # <= 3861493
    

Either method accepts an optional padding, a Bool argument that sends a Add-Padding header along with the request to Pwned Passwords API.

Development

Run tests with crystal spec.

Contributing

  1. Fork it
  2. Switch to the master branch: git checkout master
  3. Create your feature branch: git checkout -b my-new-feature
  4. Make your changes, updating changelog and documentation as appropriate.
  5. Commit your changes: git commit
  6. Push to the branch: git push origin my-new-feature
  7. Submit a new Pull Request against the GrottoPress:master branch.
pawn:
  github: GrottoPress/pawn
  version: ~> 1.0.3
License MIT
Crystal ~> 1.3

Authors

Dependencies 0

Development Dependencies 2

  • ameba ~> 0.14.3
    {'github' => 'crystal-ameba/ameba', 'version' => '~> 0.14.3'}
  • webmock ~> 0.14.0
    {'github' => 'manastech/webmock.cr', 'version' => '~> 0.14.0'}

Dependents 1

Last synced .
search fire star recently