[prev in list] [next in list] [prev in thread] [next in thread]
List: wsf-java-dev
Subject: Re: [Dev] Defining Scopes using Rest API - Publisher
From: Isuru Uyanage <isuruuy () wso2 ! com>
Date: 2018-01-29 16:38:10
Message-ID: CABQvYj=5y0L8-J1OAbPnu3yjEBCRwHPRSW2+nKZtitmLEO8kVA () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/related)]
[Attachment #4 (multipart/alternative)]
Hi All,
Thank you very much for your replies. I could able to it by updating the
swagger definition.
Thanks
Isuru
*Thanks and Best Regards,*
*Isuru Uyanage*
*Software Engineer - QA | WSO2*
*Mobile : **+94 77 <+94%2077%20767%201807> 55 30752*
*LinkedIn: **https://www.linkedin.com/in/isuru-uyanage/
<https://www.linkedin.com/in/isuru-uyanage/>*
On Mon, Jan 29, 2018 at 9:03 PM, Isuru Haththotuwa <isuruh@wso2.com> wrote:
> Missed the API reference: https://docs.wso2.com/display/
> AM2xx/apidocs/publisher/#!/operations#APIIndividual#apisApiIdSwaggerPut
>
> On Mon, Jan 29, 2018 at 8:41 PM, Isuru Haththotuwa <isuruh@wso2.com>
> wrote:
>
>> You can update the swagger definition via the rest API, and scopes can be
>> provided and mapped with rest URLs. A sample swagger definition would be:
>>
>> {
>> "swagger": "2.0",
>> "paths": {
>> "/": {
>> "get": {
>> "responses": {
>> "200": {
>> "description": ""
>> }
>> },
>> "x-auth-type": "Application & Application User",
>> "x-throttling-tier": "Unlimited",
>> * "x-scope": "Test"*
>> }
>> }
>> },
>> "info": {
>> "title": "HelloAPI",
>> "version": "1.0.0"
>> },
>> "x-wso2-security": {
>> "apim": {
>>
>>
>>
>>
>>
>>
>>
>> * "x-wso2-scopes": [ { "name": "Test",
>> "description": "", "key": "Test", "roles": "rolea"
>> } ]*
>> }
>> }
>> }
>>
>> On Mon, Jan 29, 2018 at 7:07 PM, Isuru Uyanage <isuruuy@wso2.com> wrote:
>>
>>> Hi All,
>>>
>>> I'm automating the process of Scope Management using OAuth 2.0 scopes
>>> which we can add scopes and assign it to a specific resource of an API.
>>>
>>> Could you please confirm if scopes can be created using REST APIs
>>> specifying Scope Key, Scope Name, and roles other than the API
>>> Publisher console.
>>>
>>>
>>>
>>> I could not find the above process in *RESTful API* for WSO2 *API
>>> Manager* - Publisher document[1]. If any other document or reference
>>> available, could you kindly share it?
>>>
>>>
>>> [1] - https://docs.wso2.com/display/AM2xx/apidocs/publisher/index.html
>>>
>>>
>>>
>>> *Thanks and Best Regards,*
>>>
>>> *Isuru Uyanage*
>>> *Software Engineer - QA | WSO2*
>>> *Mobile : **+94 77 <+94%2077%20767%201807> 55 30752*
>>> *LinkedIn: **https://www.linkedin.com/in/isuru-uyanage/
>>> <https://www.linkedin.com/in/isuru-uyanage/>*
>>>
>>>
>>>
>>>
>>
>>
>> --
>> Thanks and Regards,
>>
>> Isuru H.
>> +94 716 358 048 <071%20635%208048>* <http://wso2.com/>*
>>
>>
>>
>
>
> --
> Thanks and Regards,
>
> Isuru H.
> +94 716 358 048 <+94%2071%20635%208048>* <http://wso2.com/>*
>
>
>
[Attachment #7 (text/html)]
<div dir="ltr">Hi All, <div><br><div>Thank you very much for your replies. I could \
able to it by updating the swagger definition. \
</div><div><br></div><div><br></div><div>Thanks</div><div>Isuru</div></div></div><div \
class="gmail_extra"><br clear="all"><div><div class="gmail_signature" \
data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div \
dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><div \
style="font-size:12.8px;font-family:arial,helvetica,sans-serif"><div \
style="font-family:arial,sans-serif;font-size:12.8px"><div dir="ltr"><div \
style="font-family:georgia,serif"><div \
style="font-family:arial,sans-serif;font-size:12.8px"><i>Thanks and Best \
Regards,</i></div><div \
style="font-family:arial,sans-serif;font-size:12.8px"><i><br></i></div></div></div></div></div></div><div><font \
size="2"><b>Isuru Uyanage</b></font></div><div><font size="2"><b>Software Engineer - \
QA | WSO2</b></font></div></div><div><div style="color:rgb(136,136,136)"><font \
color="#444444" face="arial, helvetica, sans-serif"><b>Mobile : </b><span \
style="color:rgb(0,0,255)"><u><a href="tel:+94%2077%20767%201807" \
value="+94777671807" style="color:rgb(17,85,204)" target="_blank">+94 77</a> 55 \
30752</u></span></font><br></div><div><font face="arial, helvetica, \
sans-serif"><b><span style="background-color:rgb(255,255,255)"><font \
color="#000000">LinkedIn: </font></span></b></font><font face="arial, helvetica, \
sans-serif"><span style="background-color:rgb(255,255,255)"><font \
color="#0000ff"><u><a href="https://www.linkedin.com/in/isuru-uyanage/" \
target="_blank">https://www.linkedin.com/in/isuru-uyanage/</a></u></font></span><font \
color="#000000"> </font></font></div><div><font face="arial, helvetica, \
sans-serif"><b><span style="background-color:rgb(255,255,255)"><font \
color="#000000"><img \
src="http://c.content.wso2.com/signatures/wso2-signature-general.png"><br></font></span></b></font></div><div \
style="color:rgb(136,136,136)"><font color="#444444" face="arial, helvetica, \
sans-serif"><b><span \
style="color:rgb(0,0,255)"><br><br></span></b></font></div></div></div></div></div></div></div></div></div></div>
<br><div class="gmail_quote">On Mon, Jan 29, 2018 at 9:03 PM, Isuru Haththotuwa \
<span dir="ltr"><<a href="mailto:isuruh@wso2.com" \
target="_blank">isuruh@wso2.com</a>></span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div dir="ltr">Missed the API reference: <a \
href="https://docs.wso2.com/display/AM2xx/apidocs/publisher/#!/operations%23APIIndividual%23apisApiIdSwaggerPut" \
target="_blank">https://docs.wso2.com/display/<wbr>AM2xx/apidocs/publisher/#!/<wbr>operations#APIIndividual#<wbr>apisApiIdSwaggerPut</a><br></div><div \
class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div \
class="gmail_quote">On Mon, Jan 29, 2018 at 8:41 PM, Isuru Haththotuwa <span \
dir="ltr"><<a href="mailto:isuruh@wso2.com" \
target="_blank">isuruh@wso2.com</a>></span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div dir="ltr">You can update the swagger definition via the \
rest API, and scopes can be provided and mapped with rest URLs. A sample swagger \
definition would be:<br><br>{<br> "swagger": "2.0",<br> \
"paths": {<br> "/": {<br> "get": {<br> \
"responses": {<br> "200": {<br> \
"description": ""<br> }<br> \
},<br> "x-auth-type": "Application & Application \
User",<br> "x-throttling-tier": \
"Unlimited",<br><b> "x-scope": \
"Test"</b><br> }<br> }<br> },<br> "info": \
{<br> "title": "HelloAPI",<br> "version": \
"1.0.0"<br> },<br> "x-wso2-security": {<br> \
"apim": {<br><b> "x-wso2-scopes": [<br> \
{<br> "name": "Test",<br> \
"description": "",<br> "key": \
"Test",<br> "roles": "rolea"<br> \
}<br> ]</b><br> }<br> }<br>}<br></div><div \
class="gmail_extra"><br><div class="gmail_quote"><span>On Mon, Jan 29, 2018 at 7:07 \
PM, Isuru Uyanage <span dir="ltr"><<a href="mailto:isuruuy@wso2.com" \
target="_blank">isuruuy@wso2.com</a>></span> wrote:<br></span><div><div \
class="m_-3421732379129212244h5"><blockquote class="gmail_quote" style="margin:0 0 0 \
.8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi All, \
<div><br><div>I'm automating the process of Scope Management using OAuth 2.0 \
scopes which we can add scopes and assign it to a specific resource of an API. \
</div><div><br></div><div>Could you please confirm if scopes can be created using \
REST APIs specifying <span \
style="color:rgb(0,0,0);font-family:Roboto,Arial,Helvetica,sans-serif;font-style:norma \
l;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacin \
g:normal;text-align:right;text-indent:0px;text-transform:none;white-space:normal;word- \
spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">Scope \
Key, <span style="color:rgb(0,0,0);font-family:Roboto,Arial,Helvetica,sans-serif;font \
-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;l \
etter-spacing:normal;text-align:right;text-indent:0px;text-transform:none;white-space: \
normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">Scope \
Name, and roles other than the API Publisher console. </span></span></div><div><span \
style="color:rgb(0,0,0);font-family:Roboto,Arial,Helvetica,sans-serif;font-size:14px;f \
ont-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:40 \
0;letter-spacing:normal;text-align:right;text-indent:0px;text-transform:none;white-spa \
ce:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span \
style="color:rgb(0,0,0);font-family:Roboto,Arial,Helvetica,sans-serif;font-size:14px;f \
ont-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:40 \
0;letter-spacing:normal;text-align:right;text-indent:0px;text-transform:none;white-spa \
ce:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:ini \
tial;text-decoration-color:initial;float:none;display:inline"><br></span></span></div><div><span \
style="color:rgb(0,0,0);font-family:Roboto,Arial,Helvetica,sans-serif;font-size:14px;f \
ont-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:40 \
0;letter-spacing:normal;text-align:right;text-indent:0px;text-transform:none;white-spa \
ce:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span \
style="color:rgb(0,0,0);font-family:Roboto,Arial,Helvetica,sans-serif;font-size:14px;f \
ont-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:40 \
0;letter-spacing:normal;text-align:right;text-indent:0px;text-transform:none;white-spa \
ce:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><img \
src="cid:ii_jd0991hs0_161421fa88695cf6" style="margin-right:0px" width="455" \
height="253"><br></span></span></div><div><span \
style="color:rgb(0,0,0);font-family:Roboto,Arial,Helvetica,sans-serif;font-size:14px;f \
ont-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:40 \
0;letter-spacing:normal;text-align:right;text-indent:0px;text-transform:none;white-spa \
ce:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span \
style="color:rgb(0,0,0);font-family:Roboto,Arial,Helvetica,sans-serif;font-size:14px;f \
ont-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:40 \
0;letter-spacing:normal;text-align:right;text-indent:0px;text-transform:none;white-spa \
ce:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">I \
could not find the above process in <strong \
style="box-sizing:border-box;font-weight:700;color:rgb(51,51,51);font-family:"Helvetica \
Neue",Helvetica,Arial,sans-serif;font-size:14px;font-style:normal;font-variant-li \
gatures:normal;font-variant-caps:normal;letter-spacing:normal;text-align:start;text-in \
dent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb( \
255,255,255);text-decoration-style:initial;text-decoration-color:initial">RESTful \
API</strong><span style="color:rgb(51,51,51);font-family:"Helvetica \
Neue",Helvetica,Arial,sans-serif;font-size:14px;font-style:normal;font-variant-li \
gatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-ali \
gn:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;backg \
round-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span> \
</span>for WSO2<span> </span></span><strong \
style="box-sizing:border-box;font-weight:700;color:rgb(51,51,51);font-family:"Helvetica \
Neue",Helvetica,Arial,sans-serif;font-size:14px;font-style:normal;font-variant-li \
gatures:normal;font-variant-caps:normal;letter-spacing:normal;text-align:start;text-in \
dent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">API \
Manager</strong><span style="color:rgb(51,51,51);font-family:"Helvetica \
Neue",Helvetica,Arial,sans-serif;font-size:14px;font-style:normal;font-variant-li \
gatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-ali \
gn:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;backg \
round-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span> \
</span>- Publisher document[1]. If any other document or reference available, could \
you kindly share it?</span></span></span></div><div><span \
style="color:rgb(0,0,0);font-family:Roboto,Arial,Helvetica,sans-serif;font-size:14px;f \
ont-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:40 \
0;letter-spacing:normal;text-align:right;text-indent:0px;text-transform:none;white-spa \
ce:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span \
style="color:rgb(0,0,0);font-family:Roboto,Arial,Helvetica,sans-serif;font-size:14px;f \
ont-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:40 \
0;letter-spacing:normal;text-align:right;text-indent:0px;text-transform:none;white-spa \
ce:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span \
style="color:rgb(51,51,51);font-family:"Helvetica \
Neue",Helvetica,Arial,sans-serif;font-size:14px;font-style:normal;font-variant-li \
gatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-ali \
gn:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;backg \
round-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></span></span></div><div><span \
style="color:rgb(0,0,0);font-family:Roboto,Arial,Helvetica,sans-serif;font-size:14px;f \
ont-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:40 \
0;letter-spacing:normal;text-align:right;text-indent:0px;text-transform:none;white-spa \
ce:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span \
style="color:rgb(0,0,0);font-family:Roboto,Arial,Helvetica,sans-serif;font-size:14px;f \
ont-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:40 \
0;letter-spacing:normal;text-align:right;text-indent:0px;text-transform:none;white-spa \
ce:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span \
style="color:rgb(51,51,51);font-family:"Helvetica \
Neue",Helvetica,Arial,sans-serif;font-size:14px;font-style:normal;font-variant-li \
gatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-ali \
gn:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;backg \
round-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></span></span></div><div><span \
style="color:rgb(0,0,0);font-family:Roboto,Arial,Helvetica,sans-serif;font-size:14px;f \
ont-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:40 \
0;letter-spacing:normal;text-align:right;text-indent:0px;text-transform:none;white-spa \
ce:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span \
style="color:rgb(0,0,0);font-family:Roboto,Arial,Helvetica,sans-serif;font-size:14px;f \
ont-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:40 \
0;letter-spacing:normal;text-align:right;text-indent:0px;text-transform:none;white-spa \
ce:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><span \
style="color:rgb(51,51,51);font-family:"Helvetica \
Neue",Helvetica,Arial,sans-serif;font-size:14px;font-style:normal;font-variant-li \
gatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-ali \
gn:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;backg \
round-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">[1] \
- <a href="https://docs.wso2.com/display/AM2xx/apidocs/publisher/index.html" \
target="_blank">https://docs.wso2.com/displa<wbr>y/AM2xx/apidocs/publisher/inde<wbr>x. \
html</a></span></span></span></div><div><br></div><div><br></div><div><br></div><div><div><div \
class="m_-3421732379129212244m_-4213484053459856375m_5440376987199537130gmail_signature"><div \
dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div \
dir="ltr"><div><div style="font-size:12.8px;font-family:arial,helvetica,sans-serif"><div \
style="font-family:arial,sans-serif;font-size:12.8px"><div dir="ltr"><div \
style="font-family:georgia,serif"><div \
style="font-family:arial,sans-serif;font-size:12.8px"><i>Thanks and Best \
Regards,</i></div><div \
style="font-family:arial,sans-serif;font-size:12.8px"><i><br></i></div></div></div></div></div></div><div><font \
size="2"><b>Isuru Uyanage</b></font></div><div><font size="2"><b>Software Engineer - \
QA | WSO2</b></font></div></div><div><div style="color:rgb(136,136,136)"><font \
color="#444444" face="arial, helvetica, sans-serif"><b>Mobile : </b><span \
style="color:rgb(0,0,255)"><u><a href="tel:+94%2077%20767%201807" \
value="+94777671807" style="color:rgb(17,85,204)" target="_blank">+94 77</a> 55 \
30752</u></span></font><br></div><div><font face="arial, helvetica, \
sans-serif"><b><span style="background-color:rgb(255,255,255)"><font \
color="#000000">LinkedIn: </font></span></b></font><font face="arial, helvetica, \
sans-serif"><span style="background-color:rgb(255,255,255)"><font \
color="#0000ff"><u><a href="https://www.linkedin.com/in/isuru-uyanage/" \
target="_blank">https://www.linkedin<wbr>.com/in/isuru-uyanage/</a></u></font></span><font \
color="#000000"> </font></font></div><div><font face="arial, helvetica, \
sans-serif"><b><span style="background-color:rgb(255,255,255)"><font \
color="#000000"><img \
src="http://c.content.wso2.com/signatures/wso2-signature-general.png"><br></font></span></b></font></div><div \
style="color:rgb(136,136,136)"><font color="#444444" face="arial, helvetica, \
sans-serif"><b><span \
style="color:rgb(0,0,255)"><br><br></span></b></font></div></div></div></div></div></div></div></div></div></div>
</div></div></div>
</blockquote></div></div></div><span class="m_-3421732379129212244HOEnZb"><font \
color="#888888"><br><br clear="all"><br>-- <br><div \
class="m_-3421732379129212244m_-4213484053459856375gmail_signature" \
data-smartmail="gmail_signature"><div dir="ltr"><div>Thanks and Regards,<br><br>Isuru \
H.<br></div><div> <a href="tel:071%20635%208048" value="+94716358048" \
target="_blank">+94 716 358 048</a><i><a href="http://wso2.com/" \
target="_blank"></a></i><br><br><br></div></div></div> </font></span></div>
</blockquote></div><br><br clear="all"><br>-- <br><div \
class="m_-3421732379129212244gmail_signature" data-smartmail="gmail_signature"><div \
dir="ltr"><div>Thanks and Regards,<br><br>Isuru H.<br></div><div> <a \
href="tel:+94%2071%20635%208048" value="+94716358048" target="_blank">+94 716 358 \
048</a><i><a href="http://wso2.com/" \
target="_blank"></a></i><br><br><br></div></div></div> </div>
</div></div></blockquote></div><br></div>
--001a113cbab4a3ffca0563ecb65a--
["scopes.png" (image/png)]
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic