Skip to content

[952] doc - Specify lcobucci/jwt version, fix deprecation - #953

Merged
acrobat merged 4 commits into
2.xfrom
unknown repository
Mar 28, 2021
Merged

[952] doc - Specify lcobucci/jwt version, fix deprecation#953
acrobat merged 4 commits into
2.xfrom
unknown repository

Conversation

@ghost

@ghost ghost commented Dec 15, 2020

Copy link
Copy Markdown

Fixes #952

Comment thread doc/security.md Outdated
@GrahamCampbell

Copy link
Copy Markdown
Contributor

Actually, the code should be the following, for compatibility with both 3.4.x and 4.x:

$config = Configuration::forSymmetricSigner(
    new Sha256(),
    LocalFileReference::file('path/to/integration.private-key.pem')
);

$jwt = $config->builder()
    ->issuedBy($integrationId)
    ->issuedAt(time())
    ->expiresAt(time() + 60)
    ->getToken($config->signer(), $config->signingKey()));

$github->authenticate($jwt, null, Github\Client::AUTH_JWT)

@GrahamCampbell

GrahamCampbell commented Dec 16, 2020

Copy link
Copy Markdown
Contributor

with the following imports at the top:

use Lcobucci\JWT\Configuration;
use Lcobucci\JWT\Signer\Key\LocalFileReference;
use Lcobucci\JWT\Signer\Rsa\Sha256;

in place of the other Lcobucci\JWT imports.

Andrew MacRobert added 2 commits March 18, 2021 11:33
Update "integrating with app" example to use lcobucci/jwt 3.4

Fix whitespace formatting

update example for compatibility with both 3.4.x and 4.x
@ghost

ghost commented Mar 18, 2021

Copy link
Copy Markdown
Author

Closing this PR because I don't know why CI is failing (I did update the head branch with the most recent version of the base) and tbh I've lost interest in figuring it out.

@ghost ghost closed this Mar 18, 2021
@acrobat

acrobat commented Mar 18, 2021

Copy link
Copy Markdown
Collaborator

@amacrobert-meq Sorry I've lost track of this PR, the failing check can be ignored as it is unrelated. I think the only "action" left here was to implement the sugested changes of @GrahamCampbell or are these already "resolved"? I think these are already applied by you?

So I think we can re-open this PR and have it ready to be merged!

@ghost

ghost commented Mar 18, 2021

Copy link
Copy Markdown
Author

@acrobat Ok, in that case I'm reopening

@ghost ghost reopened this Mar 18, 2021

@acrobat acrobat left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR looks good! I've only added 1 change to avoid triggering deprecations otherwise good to merge!

Comment thread doc/security.md Outdated
acrobat added 2 commits March 28, 2021 11:26
…integration-doc-update

* upstream/2.x:
  Correctly link to github actions docs and fix backlinks
  Improved bc check
  bug #979 Deployments: use proper media-type for in_progress/queued, inactive state (staabm)

@acrobat acrobat left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've pushed the requested changes, all good now.

@acrobat
acrobat merged commit d343143 into KnpLabs:2.x Mar 28, 2021
@acrobat

acrobat commented Mar 28, 2021

Copy link
Copy Markdown
Collaborator

Thanks @amacrobert-meq! And congrats on your first contribution! 🎉

acrobat added a commit that referenced this pull request Mar 28, 2021
* 2.x:
  bug #953 [952] doc - Specify lcobucci/jwt version, fix deprecation (amacrobert-meq, acrobat)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"Authenticating as an Integration" doc is out of date

2 participants