Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Object of class stdClass could not be converted to string #106

Open
odinuv opened this issue Dec 19, 2018 · 4 comments
Open

Object of class stdClass could not be converted to string #106

odinuv opened this issue Dec 19, 2018 · 4 comments
Labels

Comments

@odinuv
Copy link
Member

odinuv commented Dec 19, 2018

https://keboola.slack.com/archives/C09U3R1J4/p1545260644082000

image

@odinuv odinuv added the bug label Dec 19, 2018
@kacurez
Copy link
Member

kacurez commented May 8, 2019

@odinuv
Copy link
Member Author

odinuv commented May 8, 2019

@kacurez hod jsem k tomu tu konfiguraci (idelane co na ni bylo spatne), az se nekdo dostane k oprave tohohle tak uz to nedohleda

@odinuv
Copy link
Member Author

odinuv commented May 14, 2019

"attr": "username" neni podporovany v oauth contextu a konci to Recoverable fatal error: Object of class stdClass could not be converted to string in /code/vendor/keboola/codebuilder/src/Keboola/Code/Builder.php on line 141

        "api": {
            "baseUrl": "https://abcdef",
            "authentication": {
                "type": "oauth20",
                "format": "json",
                "headers": {
                    "Authorization": {
                        "function": "concat",
                        "args": [
                            "Bearer ",
                            {
                                "authorization": "data.access_token"
                            }
                        ]
                    },
                    "x-myobapi-cftoken": {
                        "function": "base64_encode",
                        "args": [
                            {
                                "function": "concat",
                                "args": [
                                    {
                                        "attr": "username"
                                    },
                                    ":",
                                    {
                                        "attr": "#password"
                                    }
                                ]
                            }
                        ]
                    },
                    "x-myobapi-key": {
                        "authorization": "data.client_id"
                    },
                    "x-myobapi-version": "v2"
                }
            }
        },

@odinuv
Copy link
Member Author

odinuv commented Aug 15, 2019

another example

{
 "parameters": {
  "api": {
   "baseUrl": "https://api",
   "authentication": {
    "type": "login",
    "loginRequest": {
     "endpoint": "auth/login",
     "method": "POST",
     "headers": {
      "Content-Type": "application/json"
     },
     "params": {
      "username": "xxx",
      "password": {
       "function": "concat",
       "args": [
        {
         "#secret": "xxx"
        }
       ]
      },
      "max_token_lifetime_s": 60
     }
    },
    "format": "json",
    "apiRequest": {
     "headers": {
      "Authorization": {
       "function": "concat",
       "args": [
        "token ",
        {
         "response": "key"
        }
       ]
      }
     }
    }
   },
   "pagination": {
    "method": "response.url",
    "urlKey": "pagination.next"
   }
  },
  "config": {
   "debug": true,
   "outputBucket": "rossum",
   "jobs": [
    {
     "endpoint": "organizations"
    }
   ]
  }
 }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants