Hi All,
I’m using the Oauth 2.0 authentication provider from tyk. After a token request, tyk is calling the notification endpoint. I’m using symfony2 to catch the notifications. In the log I can see the request, but there is no post data. I was expecting something like this:
{
“auth_code”: “”,
“new_oauth_token”: “”,
“refresh_token”: “”,
“old_refresh_token”: “”,
“notification_type”: “”
}
The routing accepts post request, but there is no data.
Martin
April 14, 2016, 9:58am
2
Can you share your logs?
Also, in your API definition have you set up the required fields? The function that sends the notification is:
package tykcommon
import (
"time"
"github.com/franela/goreq"
)
// NotificationsManager handles sending notifications to OAuth endpoints to notify the provider of key changes.
// TODO: Make this more generic
type NotificationsManager struct {
SharedSecret string `bson:"shared_secret" json:"shared_secret"`
OAuthKeyChangeURL string `bson:"oauth_on_keychange_url" json:"oauth_on_keychange_url"`
}
// SendRequest sends the requested package (as a POST) to the defined
func (n NotificationsManager) SendRequest(wait bool, count int, notification interface{}) {
if wait {
if count < 3 {
time.Sleep(10 * time.Second)
Hi Martin,
Thany you for your response, I have already fixed it.
The result was found in the request response in symfony2.
1 Like