通過 OIDC 和權利進行身份驗證
驗證
Beacon 利用以下 OAuth 2.0 流程進行身份驗證:
- 
        PKCE 的授權代碼:iOS、Android 和 Web
        
          PKCE 授權  - 
        設備流程(Oauth 2.0 擴展):聯網和智能電視
        
          設備流程  
Beacon 預計將提供 3 個代幣:
- 訪問令牌:驗證用戶是否能夠進行身份驗證,並且應該被授予對信標的訪問權限(JWT 格式,並且需要包含 iss 和 sub)
 - 刷新令牌:通過提供一種代表用戶自動獲取新訪問令牌的機制(只要允許用戶訪問),允許用戶在訪問令牌過期後保持登錄狀態 - 這在電視上尤為重要
 - 身份令牌:標準化我們獲取用戶信息的方式
 
應支持以下授權類型:
- 
        
authorization_code - 
        
refresh_token - 
        
urn:ietf:params:oauth:grant-type:device_code 
需要在 Beacon 中配置以下身份驗證提供程序端點(客戶需要向我們提供這些,以便我們可以配置-如果 OpenID Connect 發現可用,我們可以發現這些):
- 訪問令牌(智威湯遜)
 - 刷新令牌 (JWT)
 - 用戶信息
 - 撤銷令牌(JWT)
 - 授權
 - 配對碼
 - JWKS
 - 登出
 - OpenID 連接發現 (/.well-known/openid-configuration) - 用於系統配置
 
Beacon CMS 中配置的項目示例
      權利
在告知 Beacon 用戶權利方面,Beacon 提供了以下 API:https://beacon.brightcove.com/{instance}/webhook/beacon (API 金鑰由布萊奇灣提供)
    
有效載荷將是 JSON:
[
  {
    "package_name": "string",			// Commerce package for SVOD or SKU for TVOD purchases - required
    "external_user_id": "string",			// User identifier (username or email depending on configuration of users)- required
    "transaction_id": "string",			// Unique transaction id for purchase - required for subscriptions (this will be used in renewal)
    "start_date": "string",				// Start date for entitlements 
    "end_date": "string",				// End date for entitlements (applicable if a rent or a subscription)
    "trial_end_date": "string",			// End date for a trial if applicable
    "effective_cancellation_date": "string",		// Date by when cancellation is effective (for example, end of current subscription period)
    "notification_type": "new",			// One of: new, renew, cancellation, buy or rent - required
    “payment_gateway”: “beaconstore”      // One of: “beaconstore”
  }
]
    使用外部身份驗證系統時,external_user_id 對應於訪問令牌中的主題值
郵遞員調用權利網絡掛鉤的示例: