我正在尝试创建与 Workday 的 OAuth 集成,但收到未经授权的客户端错误。我启用了 API 客户端,获得了密钥和访问密钥,并配置了一个指向我的服务器的重定向 URI。
当我访问https://impl.workday.com/myTenant/authorize?response_type=token&client_id=myClientID时,我被带到一个屏幕以允许此应用访问我的工作日,我点击接受,然后被重定向到我的服务器. 但是,当我检查显示请求 URL 和标头的服务器日志时,这就是我所看到的:
URL: /workday?error=unauthorized_client
Headers: { host: 'localhost:9001',
connection: 'close',
'cache-control': 'max-age=0',
'upgrade-insecure-requests': '1',
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.100 Safari/537.36',
'sec-fetch-mode': 'navigate',
'sec-fetch-user': '?1',
accept: 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3',
'sec-fetch-site': 'cross-site',
referer: 'https://impl.workday.com/wday/authgwy/myTenant/authorize?response_type=token&client_id=myClientID',
'accept-encoding': 'gzip, deflate, br',
'accept-language': 'en-US,en;q=0.9'
}
我预计会收到一个标题“位置:https ://example.com/#access_token=someAccessToken&token_type=Bearer ”,但我收到了未经授权的客户端错误。