[fpc-devel] Google API service acct and JWT

Michael Van Canneyt michael at freepascal.org
Wed Oct 21 09:42:09 CEST 2020



On Tue, 20 Oct 2020, Wayne Sherman via fpc-devel wrote:

> Michael Van Canneyt, there is a discussion about using fphttpclient
> with Google API service account on the forums:
> https://forum.lazarus.freepascal.org/index.php/topic,51478.0.html
>
> The last post has a code example of signing a JWT:
> https://forum.lazarus.freepascal.org/index.php/topic,51478.msg381426.html#msg381426
>
> Is that basically what is needed to get it working?

This is a very limited example of how to do it, yes.

If you wonder why I write 'limited', then check the amount of available
encodings:

https://jwt.io/

The example does 1 kind of signing, hardcoded. 
However, the server must be able to understand your encoding. 
If it does not, you're stuck.

So we need a framework where the encoding to be used can be specified.

And that is is what is planned.

Michael.


More information about the fpc-devel mailing list