

@condition(['credential'], ['header'])
def authorization_header(self, credential):
    auth = ('Basic ' + self['base64'].b64encode(('%s:%s' % (credential['username'], credential['password']))))
    header = {
        'Authorization': auth,
    }
    return ActionResult(production=(header,))

dataset/ETHPy150Open EricssonResearch/calvin-base/calvin/actorstore/systemactors/net/BasicAuthHeader.py BasicAuthHeader.authorization_header/original