|
| __construct (IDatabase $database, ICache $cache=null, ICookie $cookie=null, ILtiServiceConnector $serviceConnector=null) |
| Constructor.
|
|
| getAgs () |
| Fetches an instance of the assignments and grades service for the current launch.
|
|
| getDeepLink () |
| Fetches a deep link that can be used to construct a deep linking response.
|
|
| getGs () |
| Fetches an instance of the groups service for the current launch.
|
|
| getLaunchData () |
| Fetches the decoded body of the JWT used in the current launch.
|
|
| getLaunchId () |
| Get the unique launch id for the current launch.
|
|
| getNrps () |
| Fetches an instance of the names and roles service for the current launch.
|
|
| hasAgs () |
| Returns whether or not the current launch can use the assignments and grades service.
|
|
| hasGs () |
| Returns whether or not the current launch can use the groups service.
|
|
| hasNrps () |
| Returns whether or not the current launch can use the names and roles service.
|
|
| isDeepLinkLaunch () |
| Returns whether or not the current launch is a deep linking launch.
|
|
| isResourceLaunch () |
| Returns whether or not the current launch is a resource launch.
|
|
| isSubmissionReviewLaunch () |
| Returns whether or not the current launch is a submission review launch.
|
|
| validate (array $request=null) |
| Validates all aspects of an incoming LTI message launch and caches the launch if successful.
|
|
|
const | ERR_CLIENT_NOT_REGISTERED = 'Client id not registered for this issuer.' |
|
const | ERR_FETCH_PUBLIC_KEY = 'Failed to fetch public key.' |
|
const | ERR_INVALID_ALG = 'Invalid alg was specified in the JWT header.' |
|
const | ERR_INVALID_ID_TOKEN = 'Invalid id_token, JWT must contain 3 parts' |
|
const | ERR_INVALID_MESSAGE = 'Message validation failed.' |
|
const | ERR_INVALID_MESSAGE_TYPE = 'Invalid message type' |
|
const | ERR_INVALID_NONCE = 'Invalid Nonce.' |
|
const | ERR_INVALID_SIGNATURE = 'Invalid signature on id_token' |
|
const | ERR_MISMATCHED_ALG_KEY = 'The alg specified in the JWT header is incompatible with the JWK key type.' |
|
const | ERR_MISSING_DEPLOYEMENT_ID = 'No deployment ID was specified' |
|
const | ERR_MISSING_ID_TOKEN = 'Missing id_token.' |
|
const | ERR_MISSING_NONCE = 'Missing Nonce.' |
|
const | ERR_MISSING_REGISTRATION = 'LTI 1.3 Registration not found for Issuer :issuerUrl and Client ID :clientId. Please make sure the LMS has provided the right information, and that the LMS has been registered correctly in the tool.' |
|
const | ERR_NO_DEPLOYMENT = 'Unable to find deployment.' |
|
const | ERR_NO_KID = 'No KID specified in the JWT Header.' |
|
const | ERR_NO_MATCHING_PUBLIC_KEY = 'Unable to find a public key which matches your JWT.' |
|
const | ERR_NO_PUBLIC_KEY = 'Unable to find public key.' |
|
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' |
|
const | ERR_UNRECOGNIZED_MESSAGE_TYPE = 'Unrecognized message type.' |
|
const | TYPE_DEEPLINK = 'LtiDeepLinkingRequest' |
|
const | TYPE_RESOURCELINK = 'LtiResourceLinkRequest' |
|
const | TYPE_SUBMISSIONREVIEW = 'LtiSubmissionReviewRequest' |
|
◆ __construct()
Constructor.
- Parameters
-
IDatabase | $database | Instance of the database interface used for looking up registrations and deployments |
ICache | $cache | Instance of the Cache interface used to loading and storing launches |
ICookie | $cookie | Instance of the Cookie interface used to set and read cookies |
ILtiServiceConnector | $serviceConnector | Instance of the LtiServiceConnector used to by LTI services to make API requests |
◆ fromCache()
Load an LtiMessageLaunch from a Cache using a launch id.
- Parameters
-
string | $launch_id | The launch id of the LtiMessageLaunch object that is being pulled from the cache |
IDatabase | $database | Instance of the database interface used for looking up registrations and deployments |
ICache | $cache | Instance of the Cache interface used to loading and storing launches. If non is provided launch data will be store in $_SESSION. |
- Return values
-
LtiMessageLaunch | A populated and validated LtiMessageLaunch |
- Exceptions
-
LtiException | Will throw an LtiException if validation fails or launch cannot be found |
◆ getAgs()
Packback\Lti1p3\LtiMessageLaunch::getAgs |
( |
| ) |
|
Fetches an instance of the assignments and grades service for the current launch.
- Return values
-
LtiAssignmentsGradesService | An instance of the assignments an grades service that can be used to make calls within the scope of the current launch |
◆ getDeepLink()
Packback\Lti1p3\LtiMessageLaunch::getDeepLink |
( |
| ) |
|
Fetches a deep link that can be used to construct a deep linking response.
- Return values
-
LtiDeepLink | An instance of a deep link to construct a deep linking response for the current launch |
◆ getGs()
Packback\Lti1p3\LtiMessageLaunch::getGs |
( |
| ) |
|
Fetches an instance of the groups service for the current launch.
- Return values
-
LtiCourseGroupsService | An instance of the groups service that can be used to make calls within the scope of the current launch |
◆ getLaunchData()
Packback\Lti1p3\LtiMessageLaunch::getLaunchData |
( |
| ) |
|
Fetches the decoded body of the JWT used in the current launch.
- Return values
-
array|object | Returns the decoded json body of the launch as an array |
◆ getLaunchId()
Packback\Lti1p3\LtiMessageLaunch::getLaunchId |
( |
| ) |
|
Get the unique launch id for the current launch.
- Return values
-
string | A unique identifier used to re-reference the current launch in subsequent requests |
◆ getNrps()
Packback\Lti1p3\LtiMessageLaunch::getNrps |
( |
| ) |
|
Fetches an instance of the names and roles service for the current launch.
- Return values
-
LtiNamesRolesProvisioningService | An instance of the names and roles service that can be used to make calls within the scope of the current launch |
◆ hasAgs()
Packback\Lti1p3\LtiMessageLaunch::hasAgs |
( |
| ) |
|
Returns whether or not the current launch can use the assignments and grades service.
- Return values
-
bool | Returns a boolean indicating the availability of assignments and grades |
◆ hasGs()
Packback\Lti1p3\LtiMessageLaunch::hasGs |
( |
| ) |
|
Returns whether or not the current launch can use the groups service.
- Return values
-
bool | Returns a boolean indicating the availability of groups |
◆ hasNrps()
Packback\Lti1p3\LtiMessageLaunch::hasNrps |
( |
| ) |
|
Returns whether or not the current launch can use the names and roles service.
- Return values
-
bool | Returns a boolean indicating the availability of names and roles |
◆ isDeepLinkLaunch()
Packback\Lti1p3\LtiMessageLaunch::isDeepLinkLaunch |
( |
| ) |
|
Returns whether or not the current launch is a deep linking launch.
- Return values
-
bool | Returns true if the current launch is a deep linking launch |
◆ isResourceLaunch()
Packback\Lti1p3\LtiMessageLaunch::isResourceLaunch |
( |
| ) |
|
Returns whether or not the current launch is a resource launch.
- Return values
-
bool | Returns true if the current launch is a resource launch |
◆ isSubmissionReviewLaunch()
Packback\Lti1p3\LtiMessageLaunch::isSubmissionReviewLaunch |
( |
| ) |
|
Returns whether or not the current launch is a submission review launch.
- Return values
-
bool | Returns true if the current launch is a submission review launch |
◆ validate()
Packback\Lti1p3\LtiMessageLaunch::validate |
( |
array | $request = null | ) |
|
Validates all aspects of an incoming LTI message launch and caches the launch if successful.
- Parameters
-
array | string | $request | An array of post request parameters. If not set will default to $_POST. |
- Return values
-
LtiMessageLaunch | Will return $this if validation is successful |
- Exceptions
-
LtiException | Will throw an LtiException if validation fails |
The documentation for this class was generated from the following file:
- lib/lti1p3/src/LtiMessageLaunch.php