Entitlement Flows
A. Prerequisites
-
Create your callback functions:
-
Triggered by
setRequestor()
, returns success or failure.
Success indicates you can proceed with entitlement calls. -
Triggered by
getAuthentication()
only if the user has not selected a provider (MVPD) and is not yet authenticated.
Themvpds
parameter is an array of providers available to the user. -
setAuthenticationStatus(status, errorcode)
Triggered by
checkAuthentication()
every time.
Triggered bygetAuthentication()
only if the user is already authenticated and has selected a provider.Status returned is success or failure, the errorcode describes the type of the failure.
-
Triggered by
getAuthentication()
after the user selects an MVPD. Theurl
parameter provides the location of the MVPD’s login page. -
Triggered by
checkAuthentication(), getAuthentication(), checkAuthorization(), getAuthorization(), setSelectedProvider()
.
Theevent
parameter indicates which entitlement event occurred; thedata
parameter is a list of values relating to the event. -
Triggered by
checkAuthorization()
andgetAuthorization()
after a successful authorization to view a resource.
Thetoken
parameter is the short-lived media token; theresource
parameter is the content that the user is authorized to view. -
tokenRequestFailed(resource, code, description)
Triggered by
checkAuthorization()
andgetAuthorization()
after an unsuccessful authorization.
Theresource
parameter is the content that the user was attempting to view; thecode
parameter is the error code indicating what type of failure occurred; thedescription
parameter describes the error associated with the error code. -
Triggered by
getSelectedProvider()
.
Themvpd
parameter provides information about the provider selected by the user. -
setMetadataStatus(metadata, key, arguments)
Triggered by
getMetadata().
Themetadata
parameter provides the specific data you requested; thekey
parameter is the key used in thegetMetadata()
request; and thearguments
parameter is the same dictionary that was passed togetMetadata()
. -
preauthorizedResources(resources)
Triggered by
checkPreauthorizedResources()
.
TheauthorizedResources
parameter presents the resources that the user is authorized to view.
-