Last active
August 29, 2015 14:00
-
-
Save baskaran-md/11203963 to your computer and use it in GitHub Desktop.
Python Encoder [Apigee]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from com.apigee.util import Crypto | |
authHeader = flow.getVariable("request.formparam.user") + ":" + flow.getVariable("request.formparam.password"); | |
encodedValue = Crypto.base64encode(authHeader); | |
flow.setVariable("request.header.Authorization", "Basic " + encodedValue); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment