Coder Social home page Coder Social logo

dinosimone / castleio-perl Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 18 KB

WebService::CastleIO - Perl wrapper for Castle.io API

Home Page: https://api.castle.io/docs

License: MIT License

Perl 100.00%
security authentication brute-force password monitoring perl

castleio-perl's Introduction

Castle.io API Client for Perl

Castle detects and mitigates account takeover in web and mobile apps. This is a Perl client for the Castle.IO API web service (api.castle.io).

Installation

To install this module, run the following commands:

cpanm WebService::CastleIO

Configuration

use WebService::CastleIO;

my $castle = WebService::CastleIO->new(
    api_secret => 'sRq3Zmzpxwu6eDXiYCFB3xyfi4ZnVjnn',
    cookie_id  => 'abcd',
    ip_address => '24.61.128.172',
    headers    => JSON->new->allow_nonref->utf8->encode({'User-Agent' => 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0'}),
    source     => 'backend',
    debug      => 1
);

Usage

Create Event

Track lets you record security-related actions your users perform. Events are processed asynchronously to return as quickly as possible.

my $event_result = $castle->track(
    data => {user_id => 'dummy', name => '$login.succeeded', properties => {threat => 'Large', whatever => 'made up'}}
);

Authenticate

Authenticate is processed synchronous and returns returns an action of the types approve, challenge or deny.

my $auth_result = $castle->authenticate(
    data => {user_id => 'dummywriter', name => '$login.succeeded'},
);

Identify

User updates are processed asynchronously to return as quickly as possible.

my $identify_result = $castle->identify(
    data => {user_id => 'dummywriter', traits => {'foo' => 'bar'}},
);

Review

Reviews lets you fetch the context for a user to review anomalous account activity.

my $reviews_result = $castle->review(review_id => 12356789);

Support and Documentation

After installing, you can find documentation for this module with the perldoc command.

perldoc WebService::CastleIO

You can also look for information at:

RT, CPAN's request tracker (report bugs here)
    http://rt.cpan.org/NoAuth/Bugs.html?Dist=WebService-CastleIO

AnnoCPAN, Annotated CPAN documentation
    http://annocpan.org/dist/WebService-CastleIO

CPAN Ratings
    http://cpanratings.perl.org/d/WebService-CastleIO

Search CPAN
    http://search.cpan.org/dist/WebService-CastleIO/

Disclaimer

This project and the code therein was not created by and is not supported by Castle.

Author

Dino Simone ([email protected])

castleio-perl's People

Contributors

dinosimone avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.