Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/awncorp/zing-encoder-jwt
JWT Serialization for Zing Processes
https://github.com/awncorp/zing-encoder-jwt
json jwt perl perl5
Last synced: about 2 months ago
JSON representation
JWT Serialization for Zing Processes
- Host: GitHub
- URL: https://github.com/awncorp/zing-encoder-jwt
- Owner: awncorp
- License: other
- Created: 2020-12-26T01:33:05.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2020-12-26T03:29:46.000Z (about 4 years ago)
- Last Synced: 2023-08-20T22:57:46.434Z (over 1 year ago)
- Topics: json, jwt, perl, perl5
- Language: Perl
- Homepage: https://metacpan.org/release/Zing-Encoder-Jwt
- Size: 19.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
- Changelog: CHANGES
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
NAME
Zing::Encoder::Jwt - JWT Serialization Abstraction
ABSTRACT
JWT Data Serialization Abstraction
SYNOPSIS
use Zing::Encoder::Jwt;
my $encoder = Zing::Encoder::Jwt->new(
secret => '...',
);
# $encoder->encode({ status => 'okay' });DESCRIPTION
This package provides a Crypt::JWT data serialization abstraction for
use with Zing::Store stores. The JWT encoding algorithm can be set
using the ZING_JWT_ALGO environment variable or the algo attribute, and
defaults to HS256. The JWT secret can be set using the ZING_JWT_SECRET
environment variable or the secret attribute.LIBRARIES
This package uses type constraints from:
Zing::Types
METHODS
This package implements the following methods:
decode
decode(Str $data) : HashRef
The decode method decodes the data provided.
decode example #1
# given: synopsis
$encoder->decode('eyJhbGciOiJIUzI1NiJ9.eyJzdGF0dXMiOiJva2F5In0.tXdQmMPi25VOJZaOySFS-hM2ofIxbyFBVTA7I-GI_lU');encode
encode(HashRef $data) : Str
The encode method encodes the data provided.
encode example #1
# given: synopsis
$encoder->encode({ status => 'okay' });AUTHOR
Al Newkirk, [email protected]
LICENSE
Copyright (C) 2011-2019, Al Newkirk, et al.
This is free software; you can redistribute it and/or modify it under
the terms of the The Apache License, Version 2.0, as elucidated in the
"license file"
.PROJECT
Wiki
Project
Initiatives
Milestones
Contributing
Issues