Re: [fpc-pascal] JSON Web Token (JWT) implementation needed

2016-01-08 Thread leledumbo
> I didn't implement verification, and I don't plan any. > But contributions are welcome. Looks like a new entry in hmac unit + new sha256 unit would be needed. Codes are around the net but sticking to existing hash package citizens would be better for FPC future. Hope my crypto skill still stan

Re: [fpc-pascal] JSON Web Token (JWT) implementation needed

2016-01-08 Thread Michael Van Canneyt
On Fri, 8 Jan 2016, leledumbo wrote: Some questions:1. How to verify the signature? My grep result in packages folder doesn't show that we have HMAC256 function. I didn't implement verification, and I don't plan any. But contributions are welcome. 2. The following sample:{$mode objfpc}{$

Re: [fpc-pascal] JSON Web Token (JWT) implementation needed

2016-01-08 Thread leledumbo
Some questions:1. How to verify the signature? My grep result in packages folder doesn't show that we have HMAC256 function.2. The following sample:{$mode objfpc}{$H+}uses fpjwt, jsonparser;const EncodedStr = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIi

Re: [fpc-pascal] JSON Web Token (JWT) implementation needed

2016-01-07 Thread leledumbo
> See: > > fcl-web/src/base/fpjwt.pp Ah, didn't notice this unit. Perhaps it was on the same batch as google API? Thanks anyway, always love FPC because of this provided non-trivial functionalities :) -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/JSON-Web-T

Re: [fpc-pascal] JSON Web Token (JWT) implementation needed

2016-01-06 Thread Michael Van Canneyt
On Wed, 6 Jan 2016, leledumbo wrote: Is there anyone already implements https://tools.ietf.org/html/rfc7519? I find a Delphi implementation (https://github.com/paolo-rossi/delphi-jose-jwt), but it uses the new Delphi RTL with System. namespace. I don't want to reinvent the wheel if possible, s

[fpc-pascal] JSON Web Token (JWT) implementation needed

2016-01-06 Thread leledumbo
Is there anyone already implements https://tools.ietf.org/html/rfc7519? I find a Delphi implementation (https://github.com/paolo-rossi/delphi-jose-jwt), but it uses the new Delphi RTL with System. namespace. I don't want to reinvent the wheel if possible, so if there's already one for FPC, that wou