com.brightcove.player.edge

## Class BrightcoveTokenAuthorizer

- java.lang.Object
- - com.brightcove.player.edge.BrightcoveTokenAuthorizer

-     public final class BrightcoveTokenAuthorizer
      extends java.lang.Object

  The class responsible to configure a `Video` with a Brightcove aiuthorization token.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `BRIGHTCOVE_AUTHORIZATION_HEADER_KEY` The constant BRIGHTCOVE_AUTHORIZATION_HEADER_KEY.
    `static java.lang.String` | `BRIGHTCOVE_AUTHORIZATION_QUERY_PARAM_KEY` The constant BRIGHTCOVE_AUTHORIZATION_QUERY_PARAM_KEY.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `BrightcoveTokenAuthorizer()` Instantiates a new Brightcove Token Authorizer.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Video` | `configure(Video video, java.lang.String brightcoveAuthorizationToken)` Configures the video with the Authorization Token.
    `java.lang.String` | `findAuthorizationToken(Video video)` Attempts to find the Authorization Token string configured in the Video.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### BRIGHTCOVE_AUTHORIZATION_HEADER_KEY

          public static final java.lang.String BRIGHTCOVE_AUTHORIZATION_HEADER_KEY

      The constant BRIGHTCOVE_AUTHORIZATION_HEADER_KEY.
      See Also:
        Constant Field Values

    - #### BRIGHTCOVE_AUTHORIZATION_QUERY_PARAM_KEY

          public static final java.lang.String BRIGHTCOVE_AUTHORIZATION_QUERY_PARAM_KEY

      The constant BRIGHTCOVE_AUTHORIZATION_QUERY_PARAM_KEY.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### BrightcoveTokenAuthorizer

          public BrightcoveTokenAuthorizer()

      Instantiates a new Brightcove Token Authorizer.

  - ### Method Detail

    - #### configure

          @NonNull
          public Video configure(@NonNull
                                          Video video,
                                          @NonNull
                                          java.lang.String brightcoveAuthorizationToken)

      Configures the video with the Authorization Token. The configuration depends on the kind of sources the video contains. Please refer to Brightcove Support documentation for more information.
      Parameters:
        `video` - the video
        `brightcoveAuthorizationToken` - the Authorization Token
      Returns:
        the configured video

    - #### findAuthorizationToken

          @Nullable
          public java.lang.String findAuthorizationToken(@NonNull
                                                                   Video video)

      Attempts to find the Authorization Token string configured in the Video.
      Parameters:
        `video` - the video
      Returns:
        the Authorization Token if available, or null otherwise.