| 1 | ### AUTO-GENERATED FILE ### | ||||||||||
| 2 | ### DO NOT EDIT. YOUR CHANGES WILL BE LOST. ### | ||||||||||
| 3 | package WebService::Bonusly::Authentication; | ||||||||||
| 4 | 1 | $WebService::Bonusly::Authentication::VERSION = '1.001'; | |||||||||
| 5 | 1 | ▶ | use v5.14; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | 1 | ▶ | use Moose; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | 1 | ▶ | use Carp; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | |||||||||||
| 9 | 1 | extends 'WebService::Bonusly::Service'; | |||||||||
| 10 | |||||||||||
| 11 | # ABSTRACT: Implements the bonus.ly authentication service | ||||||||||
| 12 | |||||||||||
| 13 | |||||||||||
| 14 | |||||||||||
| 15 | 4 | ▶ | sub sessions { | ||||||||
|
Subroutine
sessions: called CC=5 SCAR=16.2
Pod
undocumented
| |||||||||||
| 16 | 4 | my ($self, %params) = @_; | |||||||||
| 17 | |||||||||||
| 18 | 4 | my %clean; | |||||||||
| 19 | |||||||||||
| 20 | croak "parameter email is required for authentication->sessions" | ||||||||||
| 21 | 4 | ▶ | unless defined $params{email}; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 22 | |||||||||||
| 23 | $clean{email} = delete $params{email} | ||||||||||
| 24 | 3 | ▶ | if defined $params{email}; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 25 | |||||||||||
| 26 | croak "parameter password is required for authentication->sessions" | ||||||||||
| 27 | 3 | ▶ | unless defined $params{password}; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 28 | |||||||||||
| 29 | $clean{password} = delete $params{password} | ||||||||||
| 30 | 2 | ▶ | if defined $params{password}; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 31 | |||||||||||
| 32 | |||||||||||
| 33 | 2 | return $self->_perform_action( | |||||||||
| 34 | 'POST', | ||||||||||
| 35 | 'sessions', | ||||||||||
| 36 | \%clean, | ||||||||||
| 37 | 'tokenless', | ||||||||||
| 38 | ); | ||||||||||
| 39 | } | ||||||||||
| 40 | |||||||||||
| 41 | |||||||||||
| 42 | 1 | __PACKAGE__->meta->make_immutable; | |||||||||
| 43 | |||||||||||
| 44 | __END__ | ||||||||||