> +import org.jclouds.labs.b2.domain.Authorization;
> +import org.jclouds.http.HttpException;
> +import org.jclouds.http.HttpRequest;
> +import org.jclouds.http.HttpRequestFilter;
> +import org.jclouds.rest.annotations.Headers;
> +import org.jclouds.rest.annotations.RequestFilters;
> +
> +import com.google.common.base.Charsets;
> +import com.google.common.io.BaseEncoding;
> +
> +public interface AuthorizationApi {
> + @Named("b2_authorize_account")
> + @GET
> + @Path("/b2api/v1/b2_authorize_account")
> + @Headers(keys = "Authorization", values = "{accountId}:{applicationKey}")
> + @RequestFilters(Base64EncodeAuthorization.class)
Remove the `@Headers` annotation and use the existing filter:
`@RequestFilter(BasicAuthentication.class)`.
Also, since the accountId is the "identity", you could create a class that
extends the jclouds `MapBinder` (the one that binds the values tot he request
the request) and has the Credentials injected. The mapbinder could then update
the path with the identity, and you remove the need for the first "accountId"
parameter.
---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/270/files/08f67d68c03760ce134ccf217c3b1ee4487ac318#r64120158