Interface B2AccountAuthorizer

  • All Known Implementing Classes:
    B2AccountAuthorizerSimpleImpl

    public interface B2AccountAuthorizer
    B2AccountAuthorizer provides a mechanism to get an accountId and a corresponding B2AccountAuthorization. The accountId is expected to never change. The B2AccountAuthorization is required to make a new authorization every time it is called.
    • Method Detail

      • authorize

        B2AccountAuthorization authorize​(B2StorageClientWebifier webifier)
                                  throws B2Exception
        This will be called to get a new B2AccountAuthorization instance.
        Parameters:
        webifier - in case it's useful. :)
        Returns:
        an account authorization for the account this represents.
        Throws:
        B2Exception - if it throws a B2UnauthorizedException, it must ensure that the requestCategory is set to ACCOUNT_AUTHORIZATION, so retries work properly.