Error generating OAuth Client Id

Imported Google Group message. Original thread at: Redirecting to Google Groups Import Date: 2016-01-19 21:13:52 +0000.
Sender:Jayadatta Vallabhaneni.
Date:Wednesday, 27 May 2015 00:54:42 UTC+1.

Hi Martin,

I am trying to create a client Id for OAuth key management and i am getting the below error. Could you please let me know if i am missing anything? I am following the documentation from http://tyk.io/v1.6/rest-api/oauth-key-management/ and http://tyk.io/v1.6/access-control/oauth2/

URL: http://serverName:5000/tyk/oauth/clients/create
Headers: X-Tyk-Authorization: secretId

Post Body:
{
“api_id”: “MyAPIId”,
“redirect_uri”: “App redirect url”
}

Error that i am getting is Status Code: 504 GATEWAY_TIMEOUT

Thanks,
Jay

Imported Google Group message.
Sender:Jayadatta Vallabhaneni.
Date:Wednesday, 27 May 2015 03:28:35 UTC+1.

Hi Martin,

Not sure if this helps. Below is the error i am seeing in the log file.

http: panic serving 10.81.54.181:17466: runtime error: invalid memory address or nil pointer dereference
goroutine 258 [running]:
net/http.func·011()
/usr/local/go/src/net/http/server.go:1130 +0xbb
main.createOauthClient(0x7fcbf9fa15c8, 0xc20883d2c0, 0xc2087b88f0)
/home/tyk/go/src/github.com/lonelycode/tyk/api.go:1062 +0xa8d
main.func·005(0x7fcbf9fa15c8, 0xc20883d2c0, 0xc2087b88f0)
/home/tyk/go/src/github.com/lonelycode/tyk/middleware_api_security_handler.go:24 +0xdc
net/http.HandlerFunc.ServeHTTP(0xc208198870, 0x7fcbf9fa15c8, 0xc20883d2c0, 0xc2087b88f0)
/usr/local/go/src/net/http/server.go:1265 +0x41
net/http.(*ServeMux).ServeHTTP(0xc20803d4d0, 0x7fcbf9fa15c8, 0xc20883d2c0, 0xc2087b88f0)
/usr/local/go/src/net/http/server.go:1541 +0x17d
net/http.serverHandler.ServeHTTP(0xc2087e2de0, 0x7fcbf9fa15c8, 0xc20883d2c0, 0xc2087b88f0)
/usr/local/go/src/net/http/server.go:1703 +0x19a
net/http.(*conn).serve(0xc2081c3c20)
/usr/local/go/src/net/http/server.go:1204 +0xb57
created by net/http.(*Server).Serve
/usr/local/go/src/net/http/server.go:1751 +0x35e

Thanks,
Jay

  • show quoted text -

Imported Google Group message.
Sender:Jayadatta Vallabhaneni.
Date:Wednesday, 27 May 2015 07:48:08 UTC+1.

Martin,

This is resolved. I missed adding the oAuth related attributes while creating the API. It is working fine now.

Thanks,
Jay

  • show quoted text -

Imported Google Group message.
Sender:Martin Buhr.
Date:Wednesday, 27 May 2015 08:29:08 UTC+1.

Hi Jay,

Glad you got it sorted - only saw this thread this morning, was about to jump into the debugger! Tyk should probably catch this better instead of just crashing out. Will add it to the list of fixes :slight_smile:

thanks,
Martin

  • show quoted text -