def METHOD_NAME(self) -> typing.Union[BasicCredentials, TokenCredentials]:
    if (auth_scheme := self.auth_scheme()) is ProtecodeAuthScheme.BASIC_AUTH:
        return BasicCredentials(
            raw_dict={
                'password': self.raw['credentials']['password'],
                'username': self.raw['credentials']['username']
            }
        )
    elif auth_scheme is ProtecodeAuthScheme.BEARER_TOKEN:
        return TokenCredentials(
            raw_dict={
                'token': self.raw['credentials']['token'],
            }
        )
    else:
        raise NotImplementedError(auth_scheme)