| 1 | ##---------------------------------------------------------------------------- | ||
| 2 | ## REST API Framework - ~/lib/Net/API/REST/Cookie.pm | ||
| 3 | ## Version v1.0.0 | ||
| 4 | ## Copyright(c) 2022 DEGUEST Pte. Ltd. | ||
| 5 | ## Author: Jacques Deguest <jack@deguest.jp> | ||
| 6 | ## Created 2019/10/08 | ||
| 7 | ## Modified 2023/06/10 | ||
| 8 | ## All rights reserved | ||
| 9 | ## | ||
| 10 | ## This program is free software; you can redistribute it and/or modify it | ||
| 11 | ## under the same terms as Perl itself. | ||
| 12 | ##---------------------------------------------------------------------------- | ||
| 13 | package Net::API::REST::Cookie; | ||
| 14 | BEGIN | ||
| 15 | { | ||
| 16 | use strict; | ||
| 17 | use warnings; | ||
| 18 | use parent qw( Cookie ); | ||
| 19 | use vars qw( $VERSION ); | ||
| 20 | our $VERSION = 'v1.0.0'; | ||
| 21 | }; | ||
| 22 | |||
| 23 | use strict; | ||
| 24 | use warnings; | ||
| 25 | |||
| 26 | 1; | ||
| 27 | # NOTE: pod | ||
| 28 | __END__ | ||
| 29 | |||
| 30 | =encoding utf8 | ||
| 31 | |||
| 32 | =head1 NAME | ||
| 33 | |||
| 34 | Net::API::REST::Cookie - Cookie Object | ||
| 35 | |||
| 36 | =head1 SYNOPSIS | ||
| 37 | |||
| 38 | use Net::API::REST::Cookies; | ||
| 39 | my $cookie = Net::API::REST::Cookie->new( | ||
| 40 | name => 'my-cookie', | ||
| 41 | domain => 'example.com', | ||
| 42 | value => 'sid1234567', | ||
| 43 | path => '/', | ||
| 44 | expires => '+10D', | ||
| 45 | # or alternatively | ||
| 46 | maxage => 864000 | ||
| 47 | # to make it exclusively accessible by regular http request and not ajax | ||
| 48 | http_only => 1, | ||
| 49 | # should it be used under ssl only? | ||
| 50 | secure => 1, | ||
| 51 | request => $request_obj, # Net::API::REST::Request object | ||
| 52 | ); | ||
| 53 | |||
| 54 | =head1 VERSION | ||
| 55 | |||
| 56 | v1.0.0 | ||
| 57 | |||
| 58 | =head1 DESCRIPTION | ||
| 59 | |||
| 60 | This module represents a cookie. This can be used as a standalone module, or can be managed as part of the cookie jar L<Cookie::Jar> | ||
| 61 | |||
| 62 | This module inherits all of its methods from L<Cookie>. Please check its documentation directly. | ||
| 63 | |||
| 64 | =head1 AUTHOR | ||
| 65 | |||
| 66 | Jacques Deguest E<lt>F<jack@deguest.jp>E<gt> | ||
| 67 | |||
| 68 | =head1 SEE ALSO | ||
| 69 | |||
| 70 | L<Cookie>, L<Cookie::Jar> | ||
| 71 | |||
| 72 | =head1 COPYRIGHT & LICENSE | ||
| 73 | |||
| 74 | Copyright (c) 2018-2023 DEGUEST Pte. Ltd. | ||
| 75 | |||
| 76 | You can use, copy, modify and redistribute this package and associated | ||
| 77 | files under the same terms as Perl itself. | ||
| 78 | |||
| 79 | =cut |