Skip to main contentIBM Video Streaming Developers

Authentication

IBM Video Streaming SDK provides a secure way to authenticate users with IBM ID or legacy Ustream account and getting access for IBM Channel API features for example listing or broadcasting. IBMWatsonMediaAuthClient wraps up IBM Video Streaming Channel APIs Authentication flow and implements a basic authentication service that present the IBM Video Streaming authentication site in an embedded SFSafariViewController on iOS or in default browser on macOS.

Current authentication flow:

  • Set up the authentication client with configureClientWithClientID:redirectURI:completion: must be called prior to any other requests.
  • Open login site with requestLoginWithPresenter:completion: on iOS or requestLoginWithCompletion: on macOS.
  • Place handleRedirectURL: into AppDelegates openURL callback for handling redirection.
  • If user successfully logged in credentials (access token, refresh token, id token payload) will be accessible via IBMWatsonMediaAuthClient properties. See IBMWatsonMediaAuthClient.h for more details.
  • If access token expires a new one can be requested with requestFreshTokensWithCompletion: it gets a new access token with IBMWatsonMediaAuthClients refreshToken.
  • For log out host app should call requestLogoutWithPresenter:completion: on iOS or requestLoginWithCompletion: on macOS. These methods opens authentication site for invalidate tokens and other credentials.

For more details see sample apps or visit IBM Video Streaming Channel API page for more information about Channel API usage.