Hi Wenxing,

Yes, You can call Carbon API from your webapp. You can refer to the example
webapp[1] provided with the WSO2AS 5.3.0. This is a normal webapp.
Similarly you can use the carbon APIs in your jaxrs webapp.

[1] -
https://github.com/wso2/product-as/tree/wso2as-5.3.0/modules/samples/example/src/main/resources/carbon

Thanks
Thusitha

On Wed, Sep 28, 2016 at 7:41 AM, wenxzhen <wenxing.zh...@qq.com> wrote:

> Dear experts,
>
> Please advice whether it's a feasible way to call the Carbon API instead
> of the Admin service in the JAX-RS service. My concerns are that:
>
>    1. call the API can improve the performance and we don't need to go
>    with SOAP messages over HTTP
>    2. the Admin Service interface sometimes didn't meet with our
>    requirement.
>
> Thanks, Wenxing
>
> ------------------ Original ------------------
> *From: * "wenxzhen";<wenxing.zh...@qq.com>;
> *Date: * Sep 27, 2016
> *To: * "Lakshman Udayakantha"<lakshm...@wso2.com>;
> *Cc: * "dev"<dev@wso2.org>;
> *Subject: * Re: [Dev] How to do authentication/authorization
> onJAX-RSRESTservice running on WSO2 AS?
>
> Cool, I need to go back to review the AS document again.
>
> From the AS Doc [3] below, I found the words below. In this case, in the
> JAX-RS application, we can call the Carbon API instead of the Admin
> Service, am I right?
>
> *In addition to the significant ease in hosting and managing, CXF-based
> applications deployed in a Carbon instance automatically inherits all the
> underlying capabilities of the platform. Some of them are listed below.*
>
>    - *Ability to use the Carbon user store through CarbonContext.*
>
>
>    - *Ability to use WSO2 Registry APIs through CarbonContext.*
>
> If I am right, does it mean the codes in the Admin Service almost can be
> run in the JAX-RS application?
>
> [3] https://docs.wso2.com/display/AS530/JAX-WS+and+JAX-RS+Support
>
> Thanks, Wenxing
>
> ------------------ Original ------------------
> *From: * "Lakshman Udayakantha";<lakshm...@wso2.com>;
> *Send time:* Tuesday, Sep 27, 2016 5:12 PM
> *To:* "wenxzhen"<wenxing.zh...@qq.com>;
> *Cc:* "dev"<dev@wso2.org>;
> *Subject: * Re: [Dev] How to do authentication/authorization on
> JAX-RSRESTservice running on WSO2 AS?
>
> Hi Wenxing,
>
> While go through the AS docs I found [1] to provide authentication and
> authorizations for services deployed on WSO2 AS. That might suit for you.
>
> [1] https://docs.wso2.com/display/AS530/Developing+JAX-RS+
> Applications#DevelopingJAX-RSApplications-SecuringJAX-RSapplications
>
> Thanks
>
> On Tue, Sep 27, 2016 at 1:25 PM, wenxzhen <wenxing.zh...@qq.com> wrote:
>
>> Thansk to Lakshman.
>>
>> I hope it's just only one of the solutions. But if don't want to deploy
>> the API manager, any other way?
>>
>> From the post [1], we can see the JAX-RS provides the related mechanism
>> to help implementing the authentication and authorization. The main concern
>> is that: which carbon API can be called to do the work?
>>
>> [1] http://stackoverflow.com/questions/26777083/best-practice-
>> for-rest-token-based-authentication-with-jax-rs-and-jersey
>>
>> Regards, Wenxing
>>
>> ------------------ Original ------------------
>> *From: * "Lakshman Udayakantha";<lakshm...@wso2.com>;
>> *Send time:* Tuesday, Sep 27, 2016 4:19 PM
>> *To:* "wenxzhen"<wenxing.zh...@qq.com>;
>> *Cc:* "dev"<dev@wso2.org>;
>> *Subject: * Re: [Dev] How to do authentication/authorization on JAX-RS
>> RESTservice running on WSO2 AS?
>>
>> Hi Wenxing,
>>
>> You can expose your rest services as REST APIs via WSO2 API Manager. In
>> API Manager we can provide authentication and authorization to APIs.
>>
>> Thanks
>>
>> On Tue, Sep 27, 2016 at 8:15 AM, wenxzhen <wenxing.zh...@qq.com> wrote:
>>
>>> Dear all,
>>>
>>> For a JAX-RS REST service running on WSO2 AS, what's the best way to
>>> implement the authentication and authorization for each REST API? Please
>>> kindly advice.
>>>
>>> Thank you very much
>>> Regards, Wenxing
>>>
>>> _______________________________________________
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> Lakshman Udayakantha
>> WSO2 Inc. www.wso2.com
>> lean.enterprise.middleware
>> Mobile: *0717429601*
>>
>>
>
>
> --
> Lakshman Udayakantha
> WSO2 Inc. www.wso2.com
> lean.enterprise.middleware
> Mobile: *0717429601*
>
>
> _______________________________________________
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Thusitha Dayaratne
Software Engineer
WSO2 Inc. - lean . enterprise . middleware |  wso2.com

Mobile  +94712756809
Blog      alokayasoya.blogspot.com
About    http://about.me/thusithathilina
<http://wso2.com/signature>
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to