def get_ultradns_token():
    """
    Function to call the UltraDNS Authorization API.

    Returns the Authorization access_token which is valid for 1 hour.
    Each request calls this function and we generate a new token every time.
    """
    path = "/v2/authorization/token"
    data = {
        "grant_type": "password",
        "username": current_app.config.get("ACME_ULTRADNS_USERNAME", ""),
        "password": current_app.config.get("ACME_ULTRADNS_PASSWORD", ""),
    }
    base_uri = current_app.config.get("ACME_ULTRADNS_DOMAIN", "")
    resp = requests.post(f"{base_uri}{path}", data=data, verify=True)
    return resp.json()["access_token"]

    Function to call the UltraDNS Authorization API.

    Returns the Authorization access_token which is valid for 1 hour.
    Each request calls this function and we generate a new token every time.
    
lemur/plugins/lemur_acme/ultradns.py