Skip to content

Commit

Permalink
Merge pull request #144 from packbackbooks/mgmt-155-lti-error
Browse files Browse the repository at this point in the history
MGMT-155 Update state not found error message
  • Loading branch information
dbhynds authored Jul 9, 2024
2 parents 53a6dc0 + 9064ed0 commit 199510d
Show file tree
Hide file tree
Showing 13 changed files with 14 additions and 29 deletions.
3 changes: 1 addition & 2 deletions src/DeepLinkResources/Icon.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ public function __construct(
private string $url,
private int $width,
private int $height
) {
}
) {}

public static function new(string $url, int $width, int $height): self
{
Expand Down
3 changes: 1 addition & 2 deletions src/DeepLinkResources/Iframe.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ public function __construct(
private ?string $src = null,
private ?int $width = null,
private ?int $height = null
) {
}
) {}

public static function new(): self
{
Expand Down
3 changes: 1 addition & 2 deletions src/DeepLinkResources/Window.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ public function __construct(
private ?int $width = null,
private ?int $height = null,
private ?string $window_features = null
) {
}
) {}

public static function new(): self
{
Expand Down
4 changes: 1 addition & 3 deletions src/JwksEndpoint.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@

class JwksEndpoint
{
public function __construct(private array $keys)
{
}
public function __construct(private array $keys) {}

public static function new(array $keys): self
{
Expand Down
3 changes: 1 addition & 2 deletions src/LtiAbstractService.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ public function __construct(
private ILtiServiceConnector $serviceConnector,
private ILtiRegistration $registration,
private array $serviceData
) {
}
) {}

public function getServiceData(): array
{
Expand Down
3 changes: 1 addition & 2 deletions src/LtiDeepLink.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ public function __construct(
private ILtiRegistration $registration,
private string $deployment_id,
private array $deep_link_settings
) {
}
) {}

public function getResponseJwt(array $resources): string
{
Expand Down
3 changes: 1 addition & 2 deletions src/LtiDeployment.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ class LtiDeployment implements ILtiDeployment
{
public function __construct(
private $deployment_id
) {
}
) {}

public static function new($deployment_id): self
{
Expand Down
4 changes: 1 addition & 3 deletions src/LtiException.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,4 @@

use Exception;

class LtiException extends Exception
{
}
class LtiException extends Exception {}
4 changes: 2 additions & 2 deletions src/LtiMessageLaunch.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ class LtiMessageLaunch
public const ERR_FETCH_PUBLIC_KEY = 'Failed to fetch public key.';
public const ERR_NO_PUBLIC_KEY = 'Unable to find public key.';
public const ERR_NO_MATCHING_PUBLIC_KEY = 'Unable to find a public key which matches your JWT.';
public const ERR_STATE_NOT_FOUND = 'Please make sure you have cookies enabled in this browser and that you are not in private or incognito mode';
public const ERR_STATE_NOT_FOUND = 'Please make sure you have cookies and cross-site tracking enabled in the privacy and security settings of your browser.';
public const ERR_MISSING_ID_TOKEN = 'Missing id_token.';
public const ERR_INVALID_ID_TOKEN = 'Invalid id_token, JWT must contain 3 parts';
public const ERR_INVALID_ID_TOKEN = 'Invalid id_token, JWT must contain 3 parts.';
public const ERR_MISSING_NONCE = 'Missing Nonce.';
public const ERR_INVALID_NONCE = 'Invalid Nonce.';

Expand Down
3 changes: 1 addition & 2 deletions src/LtiOidcLogin.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ public function __construct(
public IDatabase $db,
public ICache $cache,
public ICookie $cookie
) {
}
) {}

/**
* Static function to allow for method chaining without having to assign to a variable first.
Expand Down
3 changes: 1 addition & 2 deletions src/LtiServiceConnector.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ class LtiServiceConnector implements ILtiServiceConnector
public function __construct(
private ICache $cache,
private Client $client
) {
}
) {}

public function setDebuggingMode(bool $enable): self
{
Expand Down
4 changes: 1 addition & 3 deletions src/OidcException.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,4 @@

use Exception;

class OidcException extends Exception
{
}
class OidcException extends Exception {}
3 changes: 1 addition & 2 deletions src/ServiceRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ public function __construct(
private string $method,
private string $url,
private string $type = self::TYPE_UNSUPPORTED
) {
}
) {}

public function getMethod(): string
{
Expand Down

0 comments on commit 199510d

Please sign in to comment.