jonnybarnes.uk/tests/TestToken.php

55 lines
1.5 KiB
PHP
Raw Normal View History

Squashed commit of the following: commit ebbaf83a331395d86754f231ebf3852c31ee13e7 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Tue Sep 19 16:07:16 2017 +0100 Show just a name if no known author url commit 7c3fc38a5101635efbb1659d7dc0e4e87f28977a Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Tue Sep 19 15:55:07 2017 +0100 Update changelog commit e05876d604b2655fdd1b03fe5390c3333cd5e064 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Tue Sep 19 15:54:10 2017 +0100 Add a trait for testing tokens commit 1288769757e6c69fccf849a73ef53e6497953d74 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Tue Sep 19 15:53:54 2017 +0100 Add a test for the process like job commit d85a7109d51c979846b2b15d92e2b4c3978c6dc7 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Tue Sep 19 15:53:25 2017 +0100 fix typo, and allow for array of author info, or just a name commit 1fc63c6fb6c5648e31759502a011b2be0525af54 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Sep 18 15:38:16 2017 +0100 Add another test for creating likes commit 487723ac41fa00a8182f5bf3665ab7b5f8fece52 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Sep 18 15:38:03 2017 +0100 fix unexpected end of file error commit a24eef82ae7a2a3e1d3943a6cfed85757c713434 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Sep 18 15:37:31 2017 +0100 Better response when creating likes commit fa49df98613b136167dc093a97745eeb90a4a7a6 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Sep 18 14:43:39 2017 +0100 Make the author fields nullable commit 5a2f9273c18cf31a54eb54f40732024159c3dc2d Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Sep 18 14:43:20 2017 +0100 Delegate to the LikeService for creating likes commit 801d6567ec3456cbcdfa6260339dd9ed2fdfa5b0 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Sep 18 14:42:54 2017 +0100 Create the Job that gets the content of the like and the author info commit df563473606b43a330c4e977b230d4b7b2a85268 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Sep 18 14:42:28 2017 +0100 Create the service the mpub controller delegates to commit ab6ebee71ffdeb584bbef0454874d3fc1c6499f4 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Sep 18 14:42:08 2017 +0100 Allow Like::create to work for just the url commit 6d70c43f11056597a493f863c3a1ac681ed06b71 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Sep 18 14:10:20 2017 +0100 Add some initial tests commit 4049342b061594656dbf7183d7428f95ba6b3598 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Sep 18 14:10:06 2017 +0100 Add database migration/seed/factory commit 5b3aa20fa14202e84af310477b97044723201ea7 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Sep 18 14:09:21 2017 +0100 Add domain logic for likes commit 7ef5392a1833df6cee77ecb1166af4fc0abc0eb5 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Sep 18 14:08:47 2017 +0100 Add routes for likes
2017-09-19 16:07:32 +01:00
<?php
namespace Tests;
use DateTimeImmutable;
use Lcobucci\JWT\Configuration;
Squashed commit of the following: commit ebbaf83a331395d86754f231ebf3852c31ee13e7 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Tue Sep 19 16:07:16 2017 +0100 Show just a name if no known author url commit 7c3fc38a5101635efbb1659d7dc0e4e87f28977a Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Tue Sep 19 15:55:07 2017 +0100 Update changelog commit e05876d604b2655fdd1b03fe5390c3333cd5e064 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Tue Sep 19 15:54:10 2017 +0100 Add a trait for testing tokens commit 1288769757e6c69fccf849a73ef53e6497953d74 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Tue Sep 19 15:53:54 2017 +0100 Add a test for the process like job commit d85a7109d51c979846b2b15d92e2b4c3978c6dc7 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Tue Sep 19 15:53:25 2017 +0100 fix typo, and allow for array of author info, or just a name commit 1fc63c6fb6c5648e31759502a011b2be0525af54 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Sep 18 15:38:16 2017 +0100 Add another test for creating likes commit 487723ac41fa00a8182f5bf3665ab7b5f8fece52 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Sep 18 15:38:03 2017 +0100 fix unexpected end of file error commit a24eef82ae7a2a3e1d3943a6cfed85757c713434 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Sep 18 15:37:31 2017 +0100 Better response when creating likes commit fa49df98613b136167dc093a97745eeb90a4a7a6 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Sep 18 14:43:39 2017 +0100 Make the author fields nullable commit 5a2f9273c18cf31a54eb54f40732024159c3dc2d Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Sep 18 14:43:20 2017 +0100 Delegate to the LikeService for creating likes commit 801d6567ec3456cbcdfa6260339dd9ed2fdfa5b0 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Sep 18 14:42:54 2017 +0100 Create the Job that gets the content of the like and the author info commit df563473606b43a330c4e977b230d4b7b2a85268 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Sep 18 14:42:28 2017 +0100 Create the service the mpub controller delegates to commit ab6ebee71ffdeb584bbef0454874d3fc1c6499f4 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Sep 18 14:42:08 2017 +0100 Allow Like::create to work for just the url commit 6d70c43f11056597a493f863c3a1ac681ed06b71 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Sep 18 14:10:20 2017 +0100 Add some initial tests commit 4049342b061594656dbf7183d7428f95ba6b3598 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Sep 18 14:10:06 2017 +0100 Add database migration/seed/factory commit 5b3aa20fa14202e84af310477b97044723201ea7 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Sep 18 14:09:21 2017 +0100 Add domain logic for likes commit 7ef5392a1833df6cee77ecb1166af4fc0abc0eb5 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Sep 18 14:08:47 2017 +0100 Add routes for likes
2017-09-19 16:07:32 +01:00
trait TestToken
{
2023-02-18 09:34:57 +00:00
public function getToken(): string
Squashed commit of the following: commit ebbaf83a331395d86754f231ebf3852c31ee13e7 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Tue Sep 19 16:07:16 2017 +0100 Show just a name if no known author url commit 7c3fc38a5101635efbb1659d7dc0e4e87f28977a Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Tue Sep 19 15:55:07 2017 +0100 Update changelog commit e05876d604b2655fdd1b03fe5390c3333cd5e064 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Tue Sep 19 15:54:10 2017 +0100 Add a trait for testing tokens commit 1288769757e6c69fccf849a73ef53e6497953d74 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Tue Sep 19 15:53:54 2017 +0100 Add a test for the process like job commit d85a7109d51c979846b2b15d92e2b4c3978c6dc7 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Tue Sep 19 15:53:25 2017 +0100 fix typo, and allow for array of author info, or just a name commit 1fc63c6fb6c5648e31759502a011b2be0525af54 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Sep 18 15:38:16 2017 +0100 Add another test for creating likes commit 487723ac41fa00a8182f5bf3665ab7b5f8fece52 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Sep 18 15:38:03 2017 +0100 fix unexpected end of file error commit a24eef82ae7a2a3e1d3943a6cfed85757c713434 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Sep 18 15:37:31 2017 +0100 Better response when creating likes commit fa49df98613b136167dc093a97745eeb90a4a7a6 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Sep 18 14:43:39 2017 +0100 Make the author fields nullable commit 5a2f9273c18cf31a54eb54f40732024159c3dc2d Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Sep 18 14:43:20 2017 +0100 Delegate to the LikeService for creating likes commit 801d6567ec3456cbcdfa6260339dd9ed2fdfa5b0 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Sep 18 14:42:54 2017 +0100 Create the Job that gets the content of the like and the author info commit df563473606b43a330c4e977b230d4b7b2a85268 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Sep 18 14:42:28 2017 +0100 Create the service the mpub controller delegates to commit ab6ebee71ffdeb584bbef0454874d3fc1c6499f4 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Sep 18 14:42:08 2017 +0100 Allow Like::create to work for just the url commit 6d70c43f11056597a493f863c3a1ac681ed06b71 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Sep 18 14:10:20 2017 +0100 Add some initial tests commit 4049342b061594656dbf7183d7428f95ba6b3598 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Sep 18 14:10:06 2017 +0100 Add database migration/seed/factory commit 5b3aa20fa14202e84af310477b97044723201ea7 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Sep 18 14:09:21 2017 +0100 Add domain logic for likes commit 7ef5392a1833df6cee77ecb1166af4fc0abc0eb5 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Sep 18 14:08:47 2017 +0100 Add routes for likes
2017-09-19 16:07:32 +01:00
{
$config = $this->app->make(Configuration::class);
return $config->builder()
->issuedAt(new DateTimeImmutable)
->withClaim('client_id', 'https://quill.p3k.io')
->withClaim('me', 'http://jonnybarnes.localhost')
->withClaim('scope', ['create', 'update'])
->getToken($config->signer(), $config->signingKey())
->toString();
Squashed commit of the following: commit ebbaf83a331395d86754f231ebf3852c31ee13e7 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Tue Sep 19 16:07:16 2017 +0100 Show just a name if no known author url commit 7c3fc38a5101635efbb1659d7dc0e4e87f28977a Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Tue Sep 19 15:55:07 2017 +0100 Update changelog commit e05876d604b2655fdd1b03fe5390c3333cd5e064 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Tue Sep 19 15:54:10 2017 +0100 Add a trait for testing tokens commit 1288769757e6c69fccf849a73ef53e6497953d74 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Tue Sep 19 15:53:54 2017 +0100 Add a test for the process like job commit d85a7109d51c979846b2b15d92e2b4c3978c6dc7 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Tue Sep 19 15:53:25 2017 +0100 fix typo, and allow for array of author info, or just a name commit 1fc63c6fb6c5648e31759502a011b2be0525af54 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Sep 18 15:38:16 2017 +0100 Add another test for creating likes commit 487723ac41fa00a8182f5bf3665ab7b5f8fece52 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Sep 18 15:38:03 2017 +0100 fix unexpected end of file error commit a24eef82ae7a2a3e1d3943a6cfed85757c713434 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Sep 18 15:37:31 2017 +0100 Better response when creating likes commit fa49df98613b136167dc093a97745eeb90a4a7a6 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Sep 18 14:43:39 2017 +0100 Make the author fields nullable commit 5a2f9273c18cf31a54eb54f40732024159c3dc2d Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Sep 18 14:43:20 2017 +0100 Delegate to the LikeService for creating likes commit 801d6567ec3456cbcdfa6260339dd9ed2fdfa5b0 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Sep 18 14:42:54 2017 +0100 Create the Job that gets the content of the like and the author info commit df563473606b43a330c4e977b230d4b7b2a85268 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Sep 18 14:42:28 2017 +0100 Create the service the mpub controller delegates to commit ab6ebee71ffdeb584bbef0454874d3fc1c6499f4 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Sep 18 14:42:08 2017 +0100 Allow Like::create to work for just the url commit 6d70c43f11056597a493f863c3a1ac681ed06b71 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Sep 18 14:10:20 2017 +0100 Add some initial tests commit 4049342b061594656dbf7183d7428f95ba6b3598 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Sep 18 14:10:06 2017 +0100 Add database migration/seed/factory commit 5b3aa20fa14202e84af310477b97044723201ea7 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Sep 18 14:09:21 2017 +0100 Add domain logic for likes commit 7ef5392a1833df6cee77ecb1166af4fc0abc0eb5 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Sep 18 14:08:47 2017 +0100 Add routes for likes
2017-09-19 16:07:32 +01:00
}
2023-02-18 09:34:57 +00:00
public function getTokenWithIncorrectScope(): string
Squashed commit of the following: commit ebbaf83a331395d86754f231ebf3852c31ee13e7 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Tue Sep 19 16:07:16 2017 +0100 Show just a name if no known author url commit 7c3fc38a5101635efbb1659d7dc0e4e87f28977a Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Tue Sep 19 15:55:07 2017 +0100 Update changelog commit e05876d604b2655fdd1b03fe5390c3333cd5e064 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Tue Sep 19 15:54:10 2017 +0100 Add a trait for testing tokens commit 1288769757e6c69fccf849a73ef53e6497953d74 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Tue Sep 19 15:53:54 2017 +0100 Add a test for the process like job commit d85a7109d51c979846b2b15d92e2b4c3978c6dc7 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Tue Sep 19 15:53:25 2017 +0100 fix typo, and allow for array of author info, or just a name commit 1fc63c6fb6c5648e31759502a011b2be0525af54 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Sep 18 15:38:16 2017 +0100 Add another test for creating likes commit 487723ac41fa00a8182f5bf3665ab7b5f8fece52 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Sep 18 15:38:03 2017 +0100 fix unexpected end of file error commit a24eef82ae7a2a3e1d3943a6cfed85757c713434 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Sep 18 15:37:31 2017 +0100 Better response when creating likes commit fa49df98613b136167dc093a97745eeb90a4a7a6 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Sep 18 14:43:39 2017 +0100 Make the author fields nullable commit 5a2f9273c18cf31a54eb54f40732024159c3dc2d Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Sep 18 14:43:20 2017 +0100 Delegate to the LikeService for creating likes commit 801d6567ec3456cbcdfa6260339dd9ed2fdfa5b0 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Sep 18 14:42:54 2017 +0100 Create the Job that gets the content of the like and the author info commit df563473606b43a330c4e977b230d4b7b2a85268 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Sep 18 14:42:28 2017 +0100 Create the service the mpub controller delegates to commit ab6ebee71ffdeb584bbef0454874d3fc1c6499f4 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Sep 18 14:42:08 2017 +0100 Allow Like::create to work for just the url commit 6d70c43f11056597a493f863c3a1ac681ed06b71 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Sep 18 14:10:20 2017 +0100 Add some initial tests commit 4049342b061594656dbf7183d7428f95ba6b3598 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Sep 18 14:10:06 2017 +0100 Add database migration/seed/factory commit 5b3aa20fa14202e84af310477b97044723201ea7 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Sep 18 14:09:21 2017 +0100 Add domain logic for likes commit 7ef5392a1833df6cee77ecb1166af4fc0abc0eb5 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Sep 18 14:08:47 2017 +0100 Add routes for likes
2017-09-19 16:07:32 +01:00
{
$config = $this->app->make(Configuration::class);
return $config->builder()
->issuedAt(new DateTimeImmutable)
->withClaim('client_id', 'https://quill.p3k.io')
->withClaim('me', 'https://jonnybarnes.localhost')
->withClaim('scope', 'view')
->getToken($config->signer(), $config->signingKey())
->toString();
Squashed commit of the following: commit ebbaf83a331395d86754f231ebf3852c31ee13e7 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Tue Sep 19 16:07:16 2017 +0100 Show just a name if no known author url commit 7c3fc38a5101635efbb1659d7dc0e4e87f28977a Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Tue Sep 19 15:55:07 2017 +0100 Update changelog commit e05876d604b2655fdd1b03fe5390c3333cd5e064 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Tue Sep 19 15:54:10 2017 +0100 Add a trait for testing tokens commit 1288769757e6c69fccf849a73ef53e6497953d74 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Tue Sep 19 15:53:54 2017 +0100 Add a test for the process like job commit d85a7109d51c979846b2b15d92e2b4c3978c6dc7 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Tue Sep 19 15:53:25 2017 +0100 fix typo, and allow for array of author info, or just a name commit 1fc63c6fb6c5648e31759502a011b2be0525af54 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Sep 18 15:38:16 2017 +0100 Add another test for creating likes commit 487723ac41fa00a8182f5bf3665ab7b5f8fece52 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Sep 18 15:38:03 2017 +0100 fix unexpected end of file error commit a24eef82ae7a2a3e1d3943a6cfed85757c713434 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Sep 18 15:37:31 2017 +0100 Better response when creating likes commit fa49df98613b136167dc093a97745eeb90a4a7a6 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Sep 18 14:43:39 2017 +0100 Make the author fields nullable commit 5a2f9273c18cf31a54eb54f40732024159c3dc2d Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Sep 18 14:43:20 2017 +0100 Delegate to the LikeService for creating likes commit 801d6567ec3456cbcdfa6260339dd9ed2fdfa5b0 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Sep 18 14:42:54 2017 +0100 Create the Job that gets the content of the like and the author info commit df563473606b43a330c4e977b230d4b7b2a85268 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Sep 18 14:42:28 2017 +0100 Create the service the mpub controller delegates to commit ab6ebee71ffdeb584bbef0454874d3fc1c6499f4 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Sep 18 14:42:08 2017 +0100 Allow Like::create to work for just the url commit 6d70c43f11056597a493f863c3a1ac681ed06b71 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Sep 18 14:10:20 2017 +0100 Add some initial tests commit 4049342b061594656dbf7183d7428f95ba6b3598 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Sep 18 14:10:06 2017 +0100 Add database migration/seed/factory commit 5b3aa20fa14202e84af310477b97044723201ea7 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Sep 18 14:09:21 2017 +0100 Add domain logic for likes commit 7ef5392a1833df6cee77ecb1166af4fc0abc0eb5 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Sep 18 14:08:47 2017 +0100 Add routes for likes
2017-09-19 16:07:32 +01:00
}
Squashed commit of the following: commit b87b6b2a96de870f1782b00cfe3f393cc79b7d3b Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Dec 18 14:05:11 2017 +0000 Even more tests for this micropub refactor commit 2d967f33c3abeea8fc89f91e1764e970681dc58f Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Sat Dec 16 22:19:53 2017 +0000 Fill out token endpoint tests commit 440dcbe3e53f058060c918429bea75911ddafdc1 Merge: 02a25b0 f60164f Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Fri Dec 15 14:32:50 2017 +0000 Merge pull request #77 from jonnybarnes/analysis-8KABW6 Apply fixes from StyleCI commit f60164fe81dbcc1d2343704145d26c6d6412579a Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Fri Dec 15 14:27:40 2017 +0000 Apply fixes from StyleCI commit 02a25b083a0305f73d715feb3f9d34f9de8f67d4 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Fri Dec 15 14:17:43 2017 +0000 phpcs fix commit 144998de0866bf11f235847d7edc076235294545 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Fri Dec 15 14:16:59 2017 +0000 Don’t pass the request object to service files, pass request()->all() commit dd5e52010c51a359665efa349ff8c13d4d6dbf57 Merge: 97b270a 23b145e Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Sun Dec 10 20:01:03 2017 +0000 Merge pull request #76 from jonnybarnes/analysis-86AVg6 Apply fixes from StyleCI commit 23b145e7bf67a358b3cb894ea0793984b65ecab5 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Sun Dec 10 19:50:53 2017 +0000 Apply fixes from StyleCI commit 97b270a89abe92e167e0d363029ae0b86608bbc9 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Sun Dec 10 19:43:38 2017 +0000 Improve test coverage of the refactor commit 244102264559e4fb0b0614d1738c0283703a71dc Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Fri Dec 8 13:31:13 2017 +0000 Refactor the note creation code commit 22b4786cbd7ae508b51a47f0c8cf9a15535edbb1 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Thu Dec 7 17:39:41 2017 +0000 Remove ununsed importsed classes in the controller
2017-12-18 15:51:02 +00:00
public function getTokenWithNoScope()
{
$config = $this->app->make(Configuration::class);
return $config->builder()
->issuedAt(new DateTimeImmutable)
->withClaim('client_id', 'https://quill.p3k.io')
->withClaim('me', 'https://jonnybarnes.localhost')
->getToken($config->signer(), $config->signingKey())
->toString();
Squashed commit of the following: commit b87b6b2a96de870f1782b00cfe3f393cc79b7d3b Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Dec 18 14:05:11 2017 +0000 Even more tests for this micropub refactor commit 2d967f33c3abeea8fc89f91e1764e970681dc58f Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Sat Dec 16 22:19:53 2017 +0000 Fill out token endpoint tests commit 440dcbe3e53f058060c918429bea75911ddafdc1 Merge: 02a25b0 f60164f Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Fri Dec 15 14:32:50 2017 +0000 Merge pull request #77 from jonnybarnes/analysis-8KABW6 Apply fixes from StyleCI commit f60164fe81dbcc1d2343704145d26c6d6412579a Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Fri Dec 15 14:27:40 2017 +0000 Apply fixes from StyleCI commit 02a25b083a0305f73d715feb3f9d34f9de8f67d4 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Fri Dec 15 14:17:43 2017 +0000 phpcs fix commit 144998de0866bf11f235847d7edc076235294545 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Fri Dec 15 14:16:59 2017 +0000 Don’t pass the request object to service files, pass request()->all() commit dd5e52010c51a359665efa349ff8c13d4d6dbf57 Merge: 97b270a 23b145e Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Sun Dec 10 20:01:03 2017 +0000 Merge pull request #76 from jonnybarnes/analysis-86AVg6 Apply fixes from StyleCI commit 23b145e7bf67a358b3cb894ea0793984b65ecab5 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Sun Dec 10 19:50:53 2017 +0000 Apply fixes from StyleCI commit 97b270a89abe92e167e0d363029ae0b86608bbc9 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Sun Dec 10 19:43:38 2017 +0000 Improve test coverage of the refactor commit 244102264559e4fb0b0614d1738c0283703a71dc Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Fri Dec 8 13:31:13 2017 +0000 Refactor the note creation code commit 22b4786cbd7ae508b51a47f0c8cf9a15535edbb1 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Thu Dec 7 17:39:41 2017 +0000 Remove ununsed importsed classes in the controller
2017-12-18 15:51:02 +00:00
}
public function getInvalidToken()
{
$token = $this->getToken();
return substr($token, 0, -5);
}
Squashed commit of the following: commit ebbaf83a331395d86754f231ebf3852c31ee13e7 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Tue Sep 19 16:07:16 2017 +0100 Show just a name if no known author url commit 7c3fc38a5101635efbb1659d7dc0e4e87f28977a Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Tue Sep 19 15:55:07 2017 +0100 Update changelog commit e05876d604b2655fdd1b03fe5390c3333cd5e064 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Tue Sep 19 15:54:10 2017 +0100 Add a trait for testing tokens commit 1288769757e6c69fccf849a73ef53e6497953d74 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Tue Sep 19 15:53:54 2017 +0100 Add a test for the process like job commit d85a7109d51c979846b2b15d92e2b4c3978c6dc7 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Tue Sep 19 15:53:25 2017 +0100 fix typo, and allow for array of author info, or just a name commit 1fc63c6fb6c5648e31759502a011b2be0525af54 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Sep 18 15:38:16 2017 +0100 Add another test for creating likes commit 487723ac41fa00a8182f5bf3665ab7b5f8fece52 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Sep 18 15:38:03 2017 +0100 fix unexpected end of file error commit a24eef82ae7a2a3e1d3943a6cfed85757c713434 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Sep 18 15:37:31 2017 +0100 Better response when creating likes commit fa49df98613b136167dc093a97745eeb90a4a7a6 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Sep 18 14:43:39 2017 +0100 Make the author fields nullable commit 5a2f9273c18cf31a54eb54f40732024159c3dc2d Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Sep 18 14:43:20 2017 +0100 Delegate to the LikeService for creating likes commit 801d6567ec3456cbcdfa6260339dd9ed2fdfa5b0 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Sep 18 14:42:54 2017 +0100 Create the Job that gets the content of the like and the author info commit df563473606b43a330c4e977b230d4b7b2a85268 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Sep 18 14:42:28 2017 +0100 Create the service the mpub controller delegates to commit ab6ebee71ffdeb584bbef0454874d3fc1c6499f4 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Sep 18 14:42:08 2017 +0100 Allow Like::create to work for just the url commit 6d70c43f11056597a493f863c3a1ac681ed06b71 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Sep 18 14:10:20 2017 +0100 Add some initial tests commit 4049342b061594656dbf7183d7428f95ba6b3598 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Sep 18 14:10:06 2017 +0100 Add database migration/seed/factory commit 5b3aa20fa14202e84af310477b97044723201ea7 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Sep 18 14:09:21 2017 +0100 Add domain logic for likes commit 7ef5392a1833df6cee77ecb1166af4fc0abc0eb5 Author: Jonny Barnes <jonny@jonnybarnes.uk> Date: Mon Sep 18 14:08:47 2017 +0100 Add routes for likes
2017-09-19 16:07:32 +01:00
}