AgentPushKit-Client

 view release on metacpan or  search on metacpan

README.md  view on Meta::CPAN

For documentation of all these methods, see AUTOMATIC DOCUMENTATION below.

## Configuring authentication

In the normal case, the OpenAPI Spec will describe what parameters are
required and where to put them. You just need to supply the tokens.

    my $tokens = {
        # basic
        username => $username,
        password => $password,

        # oauth
        access_token => $oauth_token,

        # keys
        $some_key => { token => $token,
                       prefix => $prefix,
                       in => $in,             # 'head||query',
                       },

README.md  view on Meta::CPAN

the spec and you will not need to set them at run time. If not, `in` will
default to 'head' and `prefix` to the empty string.

The tokens will be placed in a L<AgentPushKit::Client::Configuration> instance
as follows, but you don't need to know about this.

- `$cfg->{username}`

    String. The username for basic auth.

- `$cfg->{password}`

    String. The password for basic auth.

- `$cfg->{api_key}`

    Hashref. Keyed on the name of each key (there can be multiple tokens).

            $cfg->{api_key} = {
                    secretKey => 'aaaabbbbccccdddd',
                    anotherKey => '1111222233334444',
                    };

README.md  view on Meta::CPAN

All URIs are relative to *https://api.chatdna.co/agent-push-kit/v1*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*AccountApi* | [**delete_current_account**](docs/AccountApi.md#delete_current_account) | **DELETE** /me | Delete the current user and customer accounts they own
*AccountApi* | [**get_current_account**](docs/AccountApi.md#get_current_account) | **GET** /me | Get the current user and customer accounts
*AgentTokensApi* | [**call_mcp**](docs/AgentTokensApi.md#call_mcp) | **POST** /mcp | Connect through stateless MCP Streamable HTTP
*AgentTokensApi* | [**create_agent_token**](docs/AgentTokensApi.md#create_agent_token) | **POST** /agent-tokens | Create a named non-expiring agent token
*AgentTokensApi* | [**list_agent_tokens**](docs/AgentTokensApi.md#list_agent_tokens) | **GET** /agent-tokens | List agent access tokens without their secrets
*AgentTokensApi* | [**revoke_agent_token**](docs/AgentTokensApi.md#revoke_agent_token) | **DELETE** /agent-tokens/{tokenId} | Revoke one of the current user&#39;s agent tokens
*AuthenticationApi* | [**complete_password_reset**](docs/AuthenticationApi.md#complete_password_reset) | **POST** /auth/password-reset/complete | Choose a new password and log in
*AuthenticationApi* | [**login_with_apple**](docs/AuthenticationApi.md#login_with_apple) | **POST** /auth/apple | Log in or attach an account using a Sign in with Apple identity token
*AuthenticationApi* | [**login_with_google**](docs/AuthenticationApi.md#login_with_google) | **POST** /auth/google | Log in or attach an account using a verified Google ID token
*AuthenticationApi* | [**login_with_password**](docs/AuthenticationApi.md#login_with_password) | **POST** /auth/login | Log in with email and password
*AuthenticationApi* | [**register**](docs/AuthenticationApi.md#register) | **POST** /auth/register | Create a user and first customer account
*AuthenticationApi* | [**request_password_reset**](docs/AuthenticationApi.md#request_password_reset) | **POST** /auth/password-reset/request | Email a single-use password reset token
*CustomerAccountsApi* | [**add_organization_member**](docs/CustomerAccountsApi.md#add_organization_member) | **POST** /organizations/{organizationId}/members | Add an already-registered user to a customer account
*CustomerAccountsApi* | [**create_organization**](docs/CustomerAccountsApi.md#create_organization) | **POST** /organizations | Create another Agent Push Kit customer account
*CustomerAccountsApi* | [**list_organization_members**](docs/CustomerAccountsApi.md#list_organization_members) | **GET** /organizations/{organizationId}/members | List members of a customer account
*CustomerAccountsApi* | [**list_organizations**](docs/CustomerAccountsApi.md#list_organizations) | **GET** /organizations | List customer accounts available to the current user
*CustomerAccountsApi* | [**regenerate_organization_api_key**](docs/CustomerAccountsApi.md#regenerate_organization_api_key) | **POST** /organizations/{organizationId}/api-key/regenerate | Rotate the application event-ingestion key
*DevicesApi* | [**get_web_push_configuration**](docs/DevicesApi.md#get_web_push_configuration) | **GET** /web-push/configuration | Get browser push availability and its public VAPID key
*DevicesApi* | [**register_device**](docs/DevicesApi.md#register_device) | **POST** /devices | Register or refresh an APNs device
*DevicesApi* | [**register_web_push_subscription**](docs/DevicesApi.md#register_web_push_subscription) | **POST** /web-push/subscriptions | Register or refresh a browser push subscription
*DevicesApi* | [**remove_device**](docs/DevicesApi.md#remove_device) | **DELETE** /devices/{installationId} | Disable push delivery to one installation
*DevicesApi* | [**remove_web_push_subscription**](docs/DevicesApi.md#remove_web_push_subscription) | **DELETE** /web-push/subscriptions/{subscriptionId} | Disable a browser push subscription

docs/AuthenticationApi.md  view on Meta::CPAN


## Load the API package
```perl
use AgentPushKit::Client::Object::AuthenticationApi;
```

All URIs are relative to *https://api.chatdna.co/agent-push-kit/v1*

Method | HTTP request | Description
------------- | ------------- | -------------
[**complete_password_reset**](AuthenticationApi.md#complete_password_reset) | **POST** /auth/password-reset/complete | Choose a new password and log in
[**login_with_apple**](AuthenticationApi.md#login_with_apple) | **POST** /auth/apple | Log in or attach an account using a Sign in with Apple identity token
[**login_with_google**](AuthenticationApi.md#login_with_google) | **POST** /auth/google | Log in or attach an account using a verified Google ID token
[**login_with_password**](AuthenticationApi.md#login_with_password) | **POST** /auth/login | Log in with email and password
[**register**](AuthenticationApi.md#register) | **POST** /auth/register | Create a user and first customer account
[**request_password_reset**](AuthenticationApi.md#request_password_reset) | **POST** /auth/password-reset/request | Email a single-use password reset token


# **complete_password_reset**
> AuthResponse complete_password_reset(password_reset_complete_input => $password_reset_complete_input)

Choose a new password and log in

### Example
```perl
use Data::Dumper;
use AgentPushKit::Client::AuthenticationApi;
my $api_instance = AgentPushKit::Client::AuthenticationApi->new(
);

my $password_reset_complete_input = AgentPushKit::Client::Object::PasswordResetCompleteInput->new(); # PasswordResetCompleteInput | 

eval {
    my $result = $api_instance->complete_password_reset(password_reset_complete_input => $password_reset_complete_input);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AuthenticationApi->complete_password_reset: $@\n";
}
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **password_reset_complete_input** | [**PasswordResetCompleteInput**](PasswordResetCompleteInput.md)|  | 

### Return type

[**AuthResponse**](AuthResponse.md)

### Authorization

No authorization required

### HTTP request headers

docs/AuthenticationApi.md  view on Meta::CPAN


No authorization required

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **login_with_password**
> AuthResponse login_with_password(password_login_input => $password_login_input)

Log in with email and password

### Example
```perl
use Data::Dumper;
use AgentPushKit::Client::AuthenticationApi;
my $api_instance = AgentPushKit::Client::AuthenticationApi->new(
);

my $password_login_input = AgentPushKit::Client::Object::PasswordLoginInput->new(); # PasswordLoginInput | 

eval {
    my $result = $api_instance->login_with_password(password_login_input => $password_login_input);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AuthenticationApi->login_with_password: $@\n";
}
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **password_login_input** | [**PasswordLoginInput**](PasswordLoginInput.md)|  | 

### Return type

[**AuthResponse**](AuthResponse.md)

### Authorization

No authorization required

### HTTP request headers

docs/AuthenticationApi.md  view on Meta::CPAN


No authorization required

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **request_password_reset**
> AcceptedResponse request_password_reset(password_reset_request_input => $password_reset_request_input)

Email a single-use password reset token

### Example
```perl
use Data::Dumper;
use AgentPushKit::Client::AuthenticationApi;
my $api_instance = AgentPushKit::Client::AuthenticationApi->new(
);

my $password_reset_request_input = AgentPushKit::Client::Object::PasswordResetRequestInput->new(); # PasswordResetRequestInput | 

eval {
    my $result = $api_instance->request_password_reset(password_reset_request_input => $password_reset_request_input);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AuthenticationApi->request_password_reset: $@\n";
}
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **password_reset_request_input** | [**PasswordResetRequestInput**](PasswordResetRequestInput.md)|  | 

### Return type

[**AcceptedResponse**](AcceptedResponse.md)

### Authorization

No authorization required

### HTTP request headers

docs/PasswordLoginInput.md  view on Meta::CPAN


## Load the model package
```perl
use AgentPushKit::Client::Object::PasswordLoginInput;
```

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**email** | **string** |  | 
**password** | **string** |  | 

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


docs/PasswordResetCompleteInput.md  view on Meta::CPAN


## Load the model package
```perl
use AgentPushKit::Client::Object::PasswordResetCompleteInput;
```

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**token** | **string** |  | 
**password** | **string** |  | 

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


docs/RegisterInput.md  view on Meta::CPAN


## Load the model package
```perl
use AgentPushKit::Client::Object::RegisterInput;
```

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**email** | **string** |  | 
**password** | **string** |  | 
**display_name** | **string** |  | [optional] 

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


docs/User.md  view on Meta::CPAN

```perl
use AgentPushKit::Client::Object::User;
```

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **string** |  | 
**email** | **string** |  | 
**display_name** | **string** |  | [optional] 
**has_password** | **boolean** |  | 
**has_google** | **boolean** |  | 
**has_apple** | **boolean** |  | 

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


lib/AgentPushKit/Client/ApiClient.pm  view on Meta::CPAN

# OpenAPI Spec does not describe the intended authorization. So we check in the config for any
# auth tokens and if we find any, we use them for all endpoints;
sub _global_auth_setup {
    my ($self, $header_params, $query_params) = @_;

    my $tokens = $self->{config}->get_tokens;
    return unless keys %$tokens;

    # basic
    if (my $uname = delete $tokens->{username}) {
        my $pword = delete $tokens->{password};
        $header_params->{'Authorization'} = 'Basic '.encode_base64($uname.":".$pword);
    }

    # oauth
    if (my $access_token = delete $tokens->{access_token}) {
        $header_params->{'Authorization'} = 'Bearer ' . $access_token;
    }

    # other keys
    foreach my $token_name (keys %$tokens) {

lib/AgentPushKit/Client/AuthenticationApi.pm  view on Meta::CPAN

    } else {
        $api_client = AgentPushKit::Client::ApiClient->new(@_);
    }

    bless { api_client => $api_client }, $class;

}


#
# complete_password_reset
#
# Choose a new password and log in
#
# @param PasswordResetCompleteInput $password_reset_complete_input  (required)
{
    my $params = {
    'password_reset_complete_input' => {
        data_type => 'PasswordResetCompleteInput',
        description => '',
        required => '1',
    },
    };
    __PACKAGE__->method_documentation->{ 'complete_password_reset' } = {
        summary => 'Choose a new password and log in',
        params => $params,
        returns => 'AuthResponse',
        };
}
# @return AuthResponse
#
sub complete_password_reset {
    my ($self, %args) = @_;

    # verify the required parameter 'password_reset_complete_input' is set
    unless (exists $args{'password_reset_complete_input'}) {
      croak("Missing the required parameter 'password_reset_complete_input' when calling complete_password_reset");
    }

    # parse inputs
    my $_resource_path = '/auth/password-reset/complete';

    my $_method = 'POST';
    my $query_params = {};
    my $header_params = {};
    my $form_params = {};

    # 'Accept' and 'Content-Type' header
    my $_header_accept = $self->{api_client}->select_header_accept('application/json');
    if ($_header_accept) {
        $header_params->{'Accept'} = $_header_accept;
    }
    $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json');

    my $_body_data;
    # body params
    if ( exists $args{'password_reset_complete_input'}) {
        $_body_data = $args{'password_reset_complete_input'};
    }

    # authentication setting, if any
    my $auth_settings = [qw()];

    # make the API Call
    my $response = $self->{api_client}->call_api($_resource_path, $_method,
                                           $query_params, $form_params,
                                           $header_params, $_body_data, $auth_settings);
    if (!$response) {

lib/AgentPushKit/Client/AuthenticationApi.pm  view on Meta::CPAN

                                           $query_params, $form_params,
                                           $header_params, $_body_data, $auth_settings);
    if (!$response) {
        return;
    }
    my $_response_object = $self->{api_client}->deserialize('AuthResponse', $response);
    return $_response_object;
}

#
# login_with_password
#
# Log in with email and password
#
# @param PasswordLoginInput $password_login_input  (required)
{
    my $params = {
    'password_login_input' => {
        data_type => 'PasswordLoginInput',
        description => '',
        required => '1',
    },
    };
    __PACKAGE__->method_documentation->{ 'login_with_password' } = {
        summary => 'Log in with email and password',
        params => $params,
        returns => 'AuthResponse',
        };
}
# @return AuthResponse
#
sub login_with_password {
    my ($self, %args) = @_;

    # verify the required parameter 'password_login_input' is set
    unless (exists $args{'password_login_input'}) {
      croak("Missing the required parameter 'password_login_input' when calling login_with_password");
    }

    # parse inputs
    my $_resource_path = '/auth/login';

    my $_method = 'POST';
    my $query_params = {};
    my $header_params = {};
    my $form_params = {};

    # 'Accept' and 'Content-Type' header
    my $_header_accept = $self->{api_client}->select_header_accept('application/json');
    if ($_header_accept) {
        $header_params->{'Accept'} = $_header_accept;
    }
    $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json');

    my $_body_data;
    # body params
    if ( exists $args{'password_login_input'}) {
        $_body_data = $args{'password_login_input'};
    }

    # authentication setting, if any
    my $auth_settings = [qw()];

    # make the API Call
    my $response = $self->{api_client}->call_api($_resource_path, $_method,
                                           $query_params, $form_params,
                                           $header_params, $_body_data, $auth_settings);
    if (!$response) {

lib/AgentPushKit/Client/AuthenticationApi.pm  view on Meta::CPAN

                                           $query_params, $form_params,
                                           $header_params, $_body_data, $auth_settings);
    if (!$response) {
        return;
    }
    my $_response_object = $self->{api_client}->deserialize('AuthResponse', $response);
    return $_response_object;
}

#
# request_password_reset
#
# Email a single-use password reset token
#
# @param PasswordResetRequestInput $password_reset_request_input  (required)
{
    my $params = {
    'password_reset_request_input' => {
        data_type => 'PasswordResetRequestInput',
        description => '',
        required => '1',
    },
    };
    __PACKAGE__->method_documentation->{ 'request_password_reset' } = {
        summary => 'Email a single-use password reset token',
        params => $params,
        returns => 'AcceptedResponse',
        };
}
# @return AcceptedResponse
#
sub request_password_reset {
    my ($self, %args) = @_;

    # verify the required parameter 'password_reset_request_input' is set
    unless (exists $args{'password_reset_request_input'}) {
      croak("Missing the required parameter 'password_reset_request_input' when calling request_password_reset");
    }

    # parse inputs
    my $_resource_path = '/auth/password-reset/request';

    my $_method = 'POST';
    my $query_params = {};
    my $header_params = {};
    my $form_params = {};

    # 'Accept' and 'Content-Type' header
    my $_header_accept = $self->{api_client}->select_header_accept('application/json');
    if ($_header_accept) {
        $header_params->{'Accept'} = $_header_accept;
    }
    $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json');

    my $_body_data;
    # body params
    if ( exists $args{'password_reset_request_input'}) {
        $_body_data = $args{'password_reset_request_input'};
    }

    # authentication setting, if any
    my $auth_settings = [qw()];

    # make the API Call
    my $response = $self->{api_client}->call_api($_resource_path, $_method,
                                           $query_params, $form_params,
                                           $header_params, $_body_data, $auth_settings);
    if (!$response) {

lib/AgentPushKit/Client/Configuration.pm  view on Meta::CPAN

        secretKey => 'string',
        anotherKey => 'same or some other string',
    };

=item api_key_in: (optional)

=item username: (optional)

String. The username for basic auth.

=item password: (optional)

String. The password for basic auth.

=item access_token: (optional)

String. The OAuth access token.

=item base_url: (optional)

String. The base URL of the API

default: https://api.chatdna.co/agent-push-kit/v1

lib/AgentPushKit/Client/Configuration.pm  view on Meta::CPAN


    # class/static variables
    $p{http_timeout} //= 180;
    $p{http_user_agent} //= 'OpenAPI-Generator/' . VERSION . '/perl';

    # authentication setting
    $p{api_key} //= {};
    $p{api_key_prefix} //= {};
    $p{api_key_in} //= {};

    # username and password for HTTP basic authentication
    $p{username} //= '';
    $p{password} //= '';

    # access token for OAuth
    $p{access_token} //= '';

    # base_url
    $p{base_url} //= 'https://api.chatdna.co/agent-push-kit/v1';

    return bless \%p => $self;
}


sub get_tokens {
    my $self = shift;

    my $tokens = {};
    $tokens->{username} = $self->{username} if $self->{username};
    $tokens->{password} = $self->{password} if $self->{password};
    $tokens->{access_token} = $self->{access_token} if $self->{access_token};

    foreach my $token_name (keys %{ $self->{api_key} }) {
        $tokens->{$token_name}->{token} = $self->{api_key}{$token_name};
        $tokens->{$token_name}->{prefix} = $self->{api_key_prefix}{$token_name};
        $tokens->{$token_name}->{in} = $self->{api_key_in}{$token_name};
    }

    return $tokens;
}

sub clear_tokens {
    my $self = shift;
    my %tokens = %{$self->get_tokens}; # copy

    $self->{username} = '';
    $self->{password} = '';
    $self->{access_token} = '';

    $self->{api_key} = {};
    $self->{api_key_prefix} = {};
    $self->{api_key_in} = {};

    return \%tokens;
}

sub accept_tokens {
    my ($self, $tokens) = @_;

    foreach my $known_name (qw(username password access_token)) {
        next unless $tokens->{$known_name};
        $self->{$known_name} = delete $tokens->{$known_name};
    }

    foreach my $token_name (keys %$tokens) {
        $self->{api_key}{$token_name} = $tokens->{$token_name}{token};
        if ($tokens->{$token_name}{prefix}) {
            $self->{api_key_prefix}{$token_name} = $tokens->{$token_name}{prefix};
        }
        my $in = $tokens->{$token_name}->{in} || 'head';

lib/AgentPushKit/Client/Object/PasswordLoginInput.pm  view on Meta::CPAN

}                                 );

__PACKAGE__->method_documentation({
    'email' => {
        datatype => 'string',
        base_name => 'email',
        description => '',
        format => '',
        read_only => '',
            },
    'password' => {
        datatype => 'string',
        base_name => 'password',
        description => '',
        format => '',
        read_only => '',
            },
});

__PACKAGE__->openapi_types( {
    'email' => 'string',
    'password' => 'string'
} );

__PACKAGE__->attribute_map( {
    'email' => 'email',
    'password' => 'password'
} );

__PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map});


1;

lib/AgentPushKit/Client/Object/PasswordResetCompleteInput.pm  view on Meta::CPAN

}                                 );

__PACKAGE__->method_documentation({
    'token' => {
        datatype => 'string',
        base_name => 'token',
        description => '',
        format => '',
        read_only => '',
            },
    'password' => {
        datatype => 'string',
        base_name => 'password',
        description => '',
        format => '',
        read_only => '',
            },
});

__PACKAGE__->openapi_types( {
    'token' => 'string',
    'password' => 'string'
} );

__PACKAGE__->attribute_map( {
    'token' => 'token',
    'password' => 'password'
} );

__PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map});


1;

lib/AgentPushKit/Client/Object/RegisterInput.pm  view on Meta::CPAN

}                                 );

__PACKAGE__->method_documentation({
    'email' => {
        datatype => 'string',
        base_name => 'email',
        description => '',
        format => '',
        read_only => '',
            },
    'password' => {
        datatype => 'string',
        base_name => 'password',
        description => '',
        format => '',
        read_only => '',
            },
    'display_name' => {
        datatype => 'string',
        base_name => 'displayName',
        description => '',
        format => '',
        read_only => '',
            },
});

__PACKAGE__->openapi_types( {
    'email' => 'string',
    'password' => 'string',
    'display_name' => 'string'
} );

__PACKAGE__->attribute_map( {
    'email' => 'email',
    'password' => 'password',
    'display_name' => 'displayName'
} );

__PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map});


1;

lib/AgentPushKit/Client/Object/User.pm  view on Meta::CPAN

        format => '',
        read_only => '',
            },
    'display_name' => {
        datatype => 'string',
        base_name => 'displayName',
        description => '',
        format => '',
        read_only => '',
            },
    'has_password' => {
        datatype => 'boolean',
        base_name => 'hasPassword',
        description => '',
        format => '',
        read_only => '',
            },
    'has_google' => {
        datatype => 'boolean',
        base_name => 'hasGoogle',
        description => '',

lib/AgentPushKit/Client/Object/User.pm  view on Meta::CPAN

        description => '',
        format => '',
        read_only => '',
            },
});

__PACKAGE__->openapi_types( {
    'id' => 'string',
    'email' => 'string',
    'display_name' => 'string',
    'has_password' => 'boolean',
    'has_google' => 'boolean',
    'has_apple' => 'boolean'
} );

__PACKAGE__->attribute_map( {
    'id' => 'id',
    'email' => 'email',
    'display_name' => 'displayName',
    'has_password' => 'hasPassword',
    'has_google' => 'hasGoogle',
    'has_apple' => 'hasApple'
} );

__PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map});


1;

lib/AgentPushKit/Client/Role.pm  view on Meta::CPAN

For documentation of all these methods, see AUTOMATIC DOCUMENTATION below.

=head2 Configuring authentication

In the normal case, the OpenAPI Spec will describe what parameters are
required and where to put them. You just need to supply the tokens.

    my $tokens = {
        # basic
        username => $username,
        password => $password,

        # oauth
        access_token => $oauth_token,

        # keys
        $some_key => { token => $token,
                       prefix => $prefix,
                       in => $in,             # 'head||query',
                       },

lib/AgentPushKit/Client/Role.pm  view on Meta::CPAN


The tokens will be placed in a L<AgentPushKit::Client::Configuration> instance
as follows, but you don't need to know about this.

=over 4

=item C<$cfg-\>{username}>

String. The username for basic auth.

=item C<$cfg-\>{password}>

String. The password for basic auth.

=item C<$cfg-\>{api_key}>

Hashref. Keyed on the name of each key (there can be multiple tokens).

    $cfg->{api_key} = {
        secretKey => 'aaaabbbbccccdddd',
        anotherKey => '1111222233334444',
        };

t/AuthenticationApiTest.t  view on Meta::CPAN

use lib 'lib';
use strict;
use warnings;

use_ok('AgentPushKit::Client::AuthenticationApi');

my $api = AgentPushKit::Client::AuthenticationApi->new();
isa_ok($api, 'AgentPushKit::Client::AuthenticationApi');

#
# complete_password_reset test
#
# uncomment below and update the test
#my $complete_password_reset_password_reset_complete_input = undef; # replace NULL with a proper value
#my $complete_password_reset_result = $api->complete_password_reset(password_reset_complete_input => $complete_password_reset_password_reset_complete_input);

#
# login_with_apple test
#
# uncomment below and update the test
#my $login_with_apple_provider_login_input = undef; # replace NULL with a proper value
#my $login_with_apple_result = $api->login_with_apple(provider_login_input => $login_with_apple_provider_login_input);

#
# login_with_google test
#
# uncomment below and update the test
#my $login_with_google_provider_login_input = undef; # replace NULL with a proper value
#my $login_with_google_result = $api->login_with_google(provider_login_input => $login_with_google_provider_login_input);

#
# login_with_password test
#
# uncomment below and update the test
#my $login_with_password_password_login_input = undef; # replace NULL with a proper value
#my $login_with_password_result = $api->login_with_password(password_login_input => $login_with_password_password_login_input);

#
# register test
#
# uncomment below and update the test
#my $register_register_input = undef; # replace NULL with a proper value
#my $register_result = $api->register(register_input => $register_register_input);

#
# request_password_reset test
#
# uncomment below and update the test
#my $request_password_reset_password_reset_request_input = undef; # replace NULL with a proper value
#my $request_password_reset_result = $api->request_password_reset(password_reset_request_input => $request_password_reset_password_reset_request_input);


done_testing();



( run in 3.164 seconds using v1.01-cache-2.11-cpan-4ef0a570458 )