Skip to content

Commit

Permalink
VCANDROID-1628 Add header to getMagistoTeamToken call
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Shteinle committed Feb 16, 2022
1 parent 3dfc14f commit beb4c04
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,10 @@ internal interface AuthService {
* @return A [VimeoCall] that provides a [TeamToken].
*/
@GET("auth/teams/{team_id}/magisto_access_token")
fun getMagistoTeamToken(@Path(value = "team_id") teamId: String): VimeoCall<TeamToken>
fun getMagistoTeamToken(
@Header(AUTHORIZATION) authorization: String,
@Path(value = "team_id") teamId: String
): VimeoCall<TeamToken>

companion object {
const val AUTHORIZATION = "Authorization"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,12 @@ internal class AuthenticatorImpl(
}

override fun getMagistoTeamToken(teamId: String, callback: VimeoCallback<TeamToken>): VimeoRequest {
return authService.getMagistoTeamToken(teamId).enqueue(callback)
return authService
.getMagistoTeamToken(
authorization = authenticationMethod.basicAuthHeader,
teamId = teamId
)
.enqueue(callback)
}

private fun VimeoCall<VimeoAccount>.enqueueWithAccountStore(callback: VimeoCallback<VimeoAccount>): VimeoRequest =
Expand Down

0 comments on commit beb4c04

Please sign in to comment.