How to pass scopes using OAuth 2.0 authentication on dev portal?

My authorization code end point requires to pass scope in request (in query param or in form param). Using the auth setting on dev portal how can i achieve this? I specify the scope in scope section but they does not gets pass in request. I tried to specify scope in authorization URL but it also has character limit which is getting exceed in my case. I am specifying these option in security Definations object in swagger json file.

0 2 674
2 REPLIES 2

Would it be possible for you to upload your swagger file and steps to reproduce so we can try to replicate the issue? You can remove any proprietary info from the json file and/or reduce it to the one API call if needed. It would be good to get exact steps on what you changing on the Dev Portal side after uploading this model.

Hi, @Chris,

Attached reduced sample swagger file I'm using.

I am uploading the file to smardocs model, setting client id and secret in template auth settings, and in security settings I got attached configuration.

[In that also I need to set Authorization Request methio (to Header )manually. No value get set by default.]

My requirement is that for GET method call I need to pass "scope1" and for POST method call need to pass "scope2" to authorize end point in query param or in form param.

Now if I does not specify scope parameter in authorizationUrl, it does not take any value of scope in swagger method definition and call fails.

The actual value of scopes are greate in length so if I specify both scopes in authorizationUrl, size limit get exceeds. So cant do that.

Hence currently I have specified only one scope in url, but this cause I cant use POST call.

So, what is missing in my implementation? and what is best way of specifying the security definition with scopes for dev portal security settings.

security.jpg

swagger.txt