[Dev] Fwd: Integrate Active Directory (AD) with WSO2.

2019-02-21 Thread shibsankar
Is there any solution to this?

Regards
Shib

-- Forwarded message -
From: shibsankar 
Date: Thu, Feb 21, 2019 at 4:16 PM
Subject: Integrate Active Directory (AD) with WSO2.
To: WSO2 Developers' List 


Hi,

My goal is to  Integrate Active Directory (AD) with WSO2.

Version :  wso2am-2.1.0
OS: Ubuntu 16.04


I'm following this documentation
https://docs.wso2.com/display/IS500/Configuring+an+Active+Directory+User+Store



I have updated user-mgt.xml with  Active Directory connection URL and
restarted WSo2.

I am now getting connectivity error to Active Directory in  WSO2 log.
[Screenshot attached]

However, I can do the telnet to Activity Directory host and port from the
WSO2 machine successfully.[Screenshot attached]

What is the issue here ? Why WSO2  is throwing connectivity error as shown
in the screenshot?

How to fix this?

Regards
Shib
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Integrate Active Directory (AD) with WSO2.

2019-02-21 Thread shibsankar
Hi,

My goal is to  Integrate Active Directory (AD) with WSO2.

Version :  wso2am-2.1.0


I'm following this documentation
https://docs.wso2.com/display/IS500/Configuring+an+Active+Directory+User+Store



I have updated user-mgt.xml with  Active Directory connection URL and
restarted WSo2.

I am now getting connectivity error to Active Directory in  WSO2 log.
[Screenshot attached]

However, I can do the telnet to Activity Directory host and port from the
WSO2 machine successfully.[Screenshot attached]

What is the issue here ? Why WSO2  is throwing connectivity error as shown
in the screenshot?

How to fix this?

Regards
Shib
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] API statistics

2018-09-19 Thread shibsankar
Checked that link.  It talks about APIM configuration first.

I am not clear, do I need to install any package for this?

Or

Do I need to  set the Enabled property under Analytics to true in
api-manager.xml only?

On Wed, Sep 19, 2018, 12:52 PM Dinusha Dissanayake 
wrote:

> Hi Shibsankar,
>
> Please follow the documentation below[1] to understand API statistics. It
> contains the details of the available visualizations/graphs.
>
> [1] https://docs.wso2.com/display/AM250/Viewing+API+Statistics
>
> Thanks,
> DinushaD
>
> On Wed, Sep 19, 2018 at 12:45 PM shibsankar  wrote:
>
>> Is there any way to find wso2 hit statistics , request/response etc when
>> I call  my API?
>>
>> Any UI or graph in wso2 which shows that information?
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>
>
> --
> Dinusha Dissanayake
> Software Engineer
> WSO2 Inc
> Mobile: +94712939439
> <https://wso2.com/signature>
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] API statistics

2018-09-19 Thread shibsankar
Is there any way to find wso2 hit statistics , request/response etc when I
call  my API?

Any UI or graph in wso2 which shows that information?
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] CORS error in public server

2018-08-03 Thread shibsankar
any comments to this please ?

Regards
Shib

On Thu, Aug 2, 2018 at 1:45 PM, shibsankar  wrote:

>
> It works when I whitelist localhost in wso2 api manager XML  and run from
> local.
>
> But when I move the application to a public server and whitelist the
> public IP in wso2 api manager XML , it does not work.
>
> My CORS configuration Is correct as per your link.
>
> Issue is when I move my angular application to public server and whitelist
> the public server IP in wso2 api manager XML it throws error.
>
>
> Please see the earlier screenshot for error message and IP white listing.
>
> Regards
> Shib
>
>
> On Wednesday, August 1, 2018, Rukshan Premathunga 
> wrote:
>
>> Hi Shib,
>>
>> It seems like you have try to do a request to token api. CORS
>> configuration done in the api-manager.xml not added to the token api by
>> default and you have to do some changes to make it work.
>> Please refer following article which explain how to enable cors for token
>> api.
>>
>> [1] https://medium.com/@iloshinikarunarathne/enabling-cors-
>> for-token-apis-in-wso2-apim-d04f7ef5171
>>
>> Thanks and Regards
>>
>> On Wed, Aug 1, 2018 at 9:22 PM, shibsankar  wrote:
>>
>>> any comments on this, please?
>>>
>>> Regards
>>> Shib
>>>
>>>
>>> On Tue, Jul 31, 2018 at 11:31 AM, shibsankar  wrote:
>>>
>>>> any comments on this?
>>>>
>>>> Regards
>>>> Shib
>>>>
>>>>
>>>> On Mon, Jul 30, 2018 at 12:15 PM, shibsankar  wrote:
>>>>
>>>>> Hi
>>>>>
>>>>> I have deployed my angular application in a  *public server. *
>>>>>
>>>>> and then *whitelisted  the public server IP* in wso2's
>>>>> *api-manager.xml *
>>>>>
>>>>>
>>>>>
>>>>> However, when I call  wso2  token API  from my angular application I
>>>>> am getting CORS error.
>>>>>
>>>>> *Please see the CORS error and WSO2 settings in the screenshot
>>>>> attached.*
>>>>>
>>>>> Could you please suggest what is wrong here and how to fix it?
>>>>>
>>>>> Regards
>>>>> Shib
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> Rukshan Chathuranga.
>> Software Engineer.
>> WSO2, Inc.
>> +94711822074
>>
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] CORS error in public server

2018-08-02 Thread shibsankar
It works when I whitelist localhost in wso2 api manager XML  and run from
local.

But when I move the application to a public server and whitelist the public
IP in wso2 api manager XML , it does not work.

My CORS configuration Is correct as per your link.

Issue is when I move my angular application to public server and whitelist
the public server IP in wso2 api manager XML it throws error.


Please see the earlier screenshot for error message and IP white listing.

Regards
Shib

On Wednesday, August 1, 2018, Rukshan Premathunga  wrote:

> Hi Shib,
>
> It seems like you have try to do a request to token api. CORS
> configuration done in the api-manager.xml not added to the token api by
> default and you have to do some changes to make it work.
> Please refer following article which explain how to enable cors for token
> api.
>
> [1] https://medium.com/@iloshinikarunarathne/enabling-
> cors-for-token-apis-in-wso2-apim-d04f7ef5171
>
> Thanks and Regards
>
> On Wed, Aug 1, 2018 at 9:22 PM, shibsankar  wrote:
>
>> any comments on this, please?
>>
>> Regards
>> Shib
>>
>>
>> On Tue, Jul 31, 2018 at 11:31 AM, shibsankar  wrote:
>>
>>> any comments on this?
>>>
>>> Regards
>>> Shib
>>>
>>>
>>> On Mon, Jul 30, 2018 at 12:15 PM, shibsankar  wrote:
>>>
>>>> Hi
>>>>
>>>> I have deployed my angular application in a  *public server. *
>>>>
>>>> and then *whitelisted  the public server IP* in wso2's
>>>> *api-manager.xml *
>>>>
>>>>
>>>>
>>>> However, when I call  wso2  token API  from my angular application I am
>>>> getting CORS error.
>>>>
>>>> *Please see the CORS error and WSO2 settings in the screenshot
>>>> attached.*
>>>>
>>>> Could you please suggest what is wrong here and how to fix it?
>>>>
>>>> Regards
>>>> Shib
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Rukshan Chathuranga.
> Software Engineer.
> WSO2, Inc.
> +94711822074
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] CORS error in public server

2018-08-01 Thread shibsankar
 any comments on this, please?

Regards
Shib


On Tue, Jul 31, 2018 at 11:31 AM, shibsankar  wrote:

> any comments on this?
>
> Regards
> Shib
>
>
> On Mon, Jul 30, 2018 at 12:15 PM, shibsankar  wrote:
>
>> Hi
>>
>> I have deployed my angular application in a  *public server. *
>>
>> and then *whitelisted  the public server IP* in wso2's *api-manager.xml *
>>
>>
>>
>> However, when I call  wso2  token API  from my angular application I am
>> getting CORS error.
>>
>> *Please see the CORS error and WSO2 settings in the screenshot attached.*
>>
>> Could you please suggest what is wrong here and how to fix it?
>>
>> Regards
>> Shib
>>
>>
>>
>>
>>
>
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] CORS error in public server

2018-07-31 Thread shibsankar
any comments on this?

Regards
Shib


On Mon, Jul 30, 2018 at 12:15 PM, shibsankar  wrote:

> Hi
>
> I have deployed my angular application in a  *public server. *
>
> and then *whitelisted  the public server IP* in wso2's *api-manager.xml *
>
>
>
> However, when I call  wso2  token API  from my angular application I am
> getting CORS error.
>
> *Please see the CORS error and WSO2 settings in the screenshot attached.*
>
> Could you please suggest what is wrong here and how to fix it?
>
> Regards
> Shib
>
>
>
>
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] CORS error in public server

2018-07-30 Thread shibsankar
Hi

I have deployed my angular application in a  *public server. *

and then *whitelisted  the public server IP* in wso2's *api-manager.xml *



However, when I call  wso2  token API  from my angular application I am
getting CORS error.

*Please see the CORS error and WSO2 settings in the screenshot attached.*

Could you please suggest what is wrong here and how to fix it?

Regards
Shib
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] CORS ERROR in Custom Service API

2018-07-18 Thread shibsankar
Any comments to this?

Regards
Shib

On Mon, Jul 16, 2018 at 1:34 PM, shibsankar  wrote:

> Yes.  I was asking configuring CROSS-ORIGIN resources sharing for a
> particular API.
>
>
> I checked your link and I  did the configuration for
> Access-Control-Allow-Origin as value  http://localhost but this value is
> not saved.
>
> Why this value is not saved ?
>
> Please find the screenshots attached to before saving and after saving of
> CORS configuration.
>
> Is there anything I'm missing?
>
>
> Regards
> Shib
>
>
> On Fri, Jul 13, 2018 at 10:18 PM, Dushani Wellappili 
> wrote:
>
>> Those API based CORS configurations are set as properties
>> in CORSRequestHandler of the particular API. You can see that in your
>> relevant api.xml file which inside the synapse-configs/default/api di
>> rectory.
>>
>>
>> Regards,
>>
>> *Dushani Wellappili*
>> Software Engineer - WSO2
>>
>> Email : dusha...@wso2.com
>> Mobile : +94779367571
>> Web : https://wso2.com/
>>
>>
>>
>>
>> On Fri, Jul 13, 2018 at 10:09 PM Dushani Wellappili 
>> wrote:
>>
>>> Hi Shib,
>>>
>>> If I have understood correctly, you are asking about configuring
>>> Cross-Origin Resource Sharing for a particular API. Please refer this [1]
>>> documentation for enabling API based CORS configurations and see whether it
>>> works for you.
>>>
>>>
>>> [1] https://docs.wso2.com/display/AM200/Enabling+CORS+for+APIs#E
>>> nablingCORSforAPIs-EnablingCORSPerAPI
>>>
>>> Thanks.
>>>
>>> Regards,
>>> Dushani Wellappili
>>> Software Engineer - WSO2
>>>
>>> Email : dusha...@wso2.com
>>> Mobile : +94779367571
>>> Web : https://wso2.com/
>>>
>>>
>>>
>>> *Dushani Wellappili*
>>> Software Engineer - WSO2
>>>
>>> Email : dusha...@wso2.com
>>> Mobile : +94779367571
>>> Web : https://wso2.com/
>>>
>>>
>>>
>>>
>>> On Fri, Jul 13, 2018 at 4:46 PM shibsankar  wrote:
>>>
>>>> Hi ,
>>>>
>>>> I'm  getting  CORS  ERROR  in  my OrderWorkFlow service API  invocation.
>>>>
>>>>
>>>> Which  *file / **files*  has the  CORS configuration in WSO2  for   *Custom
>>>> Service  **API*  ?
>>>>
>>>>
>>>> *Error :*
>>>>
>>>> Failed to load 
>>>> *http://xx-xx-xxx-xx-xx..xx.xxx.xxx:8280/bsi/custOrderWorkflow/v1/init
>>>> <http://xx-xx-xxx-xx-xx..xx.xxx.xxx:8280/bsi/custOrderWorkflow/v1/init>:
>>>> The value of the 'Access-Control-Allow-Origin' header in the response must
>>>> not be the wildcard '*' when the request's credentials mode is 'include'.
>>>> Origin 'http://localhost <http://localhost>' is therefore not allowed
>>>> access. The credentials mode of requests initiated by the XMLHttpRequest is
>>>> controlled by the withCredentials attribute.*
>>>>
>>>> Regards
>>>> Shib
>>>> ___
>>>> Dev mailing list
>>>> Dev@wso2.org
>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>>
>>>
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] CORS ERROR in Custom Service API

2018-07-13 Thread shibsankar
Hi ,

I'm  getting  CORS  ERROR  in  my OrderWorkFlow service API  invocation.


Which  *file / **files*  has the  CORS configuration in WSO2  for   *Custom
Service  **API*  ?


*Error :*

Failed to load 
*http://xx-xx-xxx-xx-xx..xx.xxx.xxx:8280/bsi/custOrderWorkflow/v1/init
:
The value of the 'Access-Control-Allow-Origin' header in the response must
not be the wildcard '*' when the request's credentials mode is 'include'.
Origin 'http://localhost ' is therefore not allowed
access. The credentials mode of requests initiated by the XMLHttpRequest is
controlled by the withCredentials attribute.*

Regards
Shib
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] CORS ERROR in userinfo API

2018-07-09 Thread shibsankar
Hi ,

I'm  getting  CORS  ERROR  in  * userinfo**  API * invocation.


Which * file / **files*  has the  CORS  configuration  in WSO2  for
*userinfo
**API *?


Error :

*Failed to load
http://xx-xx-xxx-xx-xx..xx.xxx.com:8280/userinfo
:
Response to preflight request doesn't pass access control check: No
'Access-Control-Allow-Origin' header is present on the requested resource.
Origin 'http://localhost ' is therefore not allowed
access.*


Regards
Shib
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] CORS Errors not resolved

2018-06-28 Thread shibsankar
I believe you meant this configuration (attached).

I already have it.


Please let me know if you mean something else?

Regards
Shib




On Fri, Jun 29, 2018 at 10:40 AM, Pubudu Gunatilaka 
wrote:

> Please find the link in [1].
>
>
> [1] - https://docs.wso2.com/display/AM210/Include+
> Additional+Headers+in+the+API+Console
>
> On Fri, Jun 29, 2018 at 10:34 AM shibsankar  wrote:
>
>> your Link  is not opening.
>>
>> Could you please check and resend the link?
>>
>> Regards
>> Shib
>>
>>
>> On Fri, Jun 29, 2018 at 10:25 AM, Pubudu Gunatilaka 
>> wrote:
>>
>>> Hi Shib,
>>>
>>> Have you enabled CORs for token endpoint? If not could you please enable
>>> CORs for token as in https://docs.wso2.com/display/AM210/Include+
>>> Additional+Headers+in+the+API+Console.
>>>
>>> Last part of the document explains how to enable CORs for token endpoint
>>> and other Oauth2 APIs.
>>>
>>> Thank you!
>>>
>>> On Thu, Jun 28, 2018 at 12:41 PM shibsankar  wrote:
>>>
>>>> Any comments to this?
>>>>
>>>> For your convenience, I'm also attaching   Chrome browser console
>>>>  Network report for  token API   call
>>>>
>>>> Is there anything I'm missing?
>>>>
>>>> why I'm getting   *Failed to
>>>> load http://xx-xx-xxx-xx-xx.xx.xx..com:8280/token
>>>> <http://xx-xx-xxx-xx-xx.xx.xx..com:8280/token>: Request
>>>> header field Access-Control-Allow-Methods is not allowed by
>>>> Access-Control-Allow-Headers in preflight response.*
>>>>
>>>> Is there anything missing?
>>>>
>>>> Regards
>>>> Shib
>>>>
>>>>
>>>>
>>>> On Thu, Jun 28, 2018 at 11:07 AM, shibsankar  wrote:
>>>>
>>>>> Okay.  I   did  this step as per your suggestion
>>>>>
>>>>>
>>>>> *"...I think you have to explicitly set withCredentials atribute which
>>>>> is a client side attribute to false from your angular application .."*
>>>>>
>>>>>
>>>>>
>>>>> So my current code :
>>>>>
>>>>> *// from Angular Controller js*
>>>>>
>>>>> var dataObj="grant_type=password=x=
>>>>> x=openid";
>>>>>
>>>>>  Service.callTokenAPI(dataObj)
>>>>> .then(function onSuccess(response) {
>>>>> console.log("Success");
>>>>> console.log("result  = " + JSON.stringify(response));
>>>>> }, function onFailure(error) {
>>>>> console.log("failure");
>>>>> });
>>>>>
>>>>>
>>>>>
>>>>> *//from Service.js*
>>>>>
>>>>> var callTokenAPI = function (dataObj) {
>>>>> console.log("Call server dataObj =" + angular.toJson(dataObj));
>>>>> var secret=clientKey+":"+clientPass;
>>>>> var base64Encoded= btoa(secret);
>>>>> console.log("base64Encoded="+base64Encoded);
>>>>> return $http({
>>>>> url: tokenAPI,
>>>>> method: 'POST',
>>>>> data: dataObj,
>>>>> *withCredentials:false,*
>>>>> headers: { "Content-Type": "application/x-www-form-urlencoded"
>>>>> ,"Authorization":base64Encoded}
>>>>> });
>>>>> };
>>>>>
>>>>>
>>>>> When I run my application I  get the CORS error in Chrome *browser console
>>>>> *as below
>>>>>
>>>>> *Failed to load
>>>>> http://xx-xx-xxx-xx-xx.xx.xx..com:8280/token
>>>>> <http://xx-xx-xxx-xx-xx.xx.xx..com:8280/token>: Request
>>>>> header field Access-Control-Allow-Methods is not allowed by
>>>>> Access-Control-Allow-Headers in preflight response.*
>>>>>
>>>>>
>>>>> Configuration changes to enable CORS in wso2 server screenshots are
>>>>> attached.
>>>>>
>>>>>
>>>>> Is there anything I'm missing now?
>>>>>
>>>>> Regards
>>>>> Shib
>>>>>
>>>>>
>>>&g

Re: [Dev] CORS Errors not resolved

2018-06-28 Thread shibsankar
your Link  is not opening.

Could you please check and resend the link?

Regards
Shib


On Fri, Jun 29, 2018 at 10:25 AM, Pubudu Gunatilaka 
wrote:

> Hi Shib,
>
> Have you enabled CORs for token endpoint? If not could you please enable
> CORs for token as in https://docs.wso2.com/display/AM210/Include+
> Additional+Headers+in+the+API+Console.
>
> Last part of the document explains how to enable CORs for token endpoint
> and other Oauth2 APIs.
>
> Thank you!
>
> On Thu, Jun 28, 2018 at 12:41 PM shibsankar  wrote:
>
>> Any comments to this?
>>
>> For your convenience, I'm also attaching   Chrome browser console
>>  Network report for  token API   call
>>
>> Is there anything I'm missing?
>>
>> why I'm getting   *Failed to
>> load http://xx-xx-xxx-xx-xx.xx.xx..com:8280/token
>> <http://xx-xx-xxx-xx-xx.xx.xx..com:8280/token>: Request
>> header field Access-Control-Allow-Methods is not allowed by
>> Access-Control-Allow-Headers in preflight response.*
>>
>> Is there anything missing?
>>
>> Regards
>> Shib
>>
>>
>>
>> On Thu, Jun 28, 2018 at 11:07 AM, shibsankar  wrote:
>>
>>> Okay.  I   did  this step as per your suggestion
>>>
>>>
>>> *"...I think you have to explicitly set withCredentials atribute which
>>> is a client side attribute to false from your angular application .."*
>>>
>>>
>>>
>>> So my current code :
>>>
>>> *// from Angular Controller js*
>>>
>>> var dataObj="grant_type=password=x=
>>> x=openid";
>>>
>>>  Service.callTokenAPI(dataObj)
>>> .then(function onSuccess(response) {
>>> console.log("Success");
>>> console.log("result  = " + JSON.stringify(response));
>>> }, function onFailure(error) {
>>> console.log("failure");
>>> });
>>>
>>>
>>>
>>> *//from Service.js*
>>>
>>> var callTokenAPI = function (dataObj) {
>>> console.log("Call server dataObj =" + angular.toJson(dataObj));
>>> var secret=clientKey+":"+clientPass;
>>> var base64Encoded= btoa(secret);
>>> console.log("base64Encoded="+base64Encoded);
>>> return $http({
>>> url: tokenAPI,
>>> method: 'POST',
>>> data: dataObj,
>>> *withCredentials:false,*
>>> headers: { "Content-Type": "application/x-www-form-urlencoded"
>>> ,"Authorization":base64Encoded}
>>> });
>>> };
>>>
>>>
>>> When I run my application I  get the CORS error in Chrome *browser console
>>> *as below
>>>
>>> *Failed to load
>>> http://xx-xx-xxx-xx-xx.xx.xx..com:8280/token
>>> <http://xx-xx-xxx-xx-xx.xx.xx..com:8280/token>: Request
>>> header field Access-Control-Allow-Methods is not allowed by
>>> Access-Control-Allow-Headers in preflight response.*
>>>
>>>
>>> Configuration changes to enable CORS in wso2 server screenshots are
>>> attached.
>>>
>>>
>>> Is there anything I'm missing now?
>>>
>>> Regards
>>> Shib
>>>
>>>
>>>
>>>
>>> On Tue, Jun 26, 2018 at 5:51 PM, Ishara Cooray  wrote:
>>>
>>>> Hi Shib,
>>>>
>>>> Configuration changes to enable CORS in wso2 server seem to be correct.
>>>>
>>>> I think you have to explicitly set withCredentials atribute which is a
>>>> client side attribute to false from your
>>>> angular application or whitelist the origin in api-manager.xml without
>>>> using '*'.
>>>>
>>>> Please refer [1]
>>>>
>>>> [1] https://stackoverflow.com/questions/42803394/cors-
>>>> credentials-mode-is-include
>>>>
>>>> Thanks & Regards,
>>>> Ishara Cooray
>>>> Senior Software Engineer
>>>> Mobile : +9477 262 9512
>>>> WSO2, Inc. | http://wso2.com/
>>>> Lean . Enterprise . Middleware
>>>>
>>>> On Tue, Jun 26, 2018 at 12:30 PM, shibsankar  wrote:
>>>>
>>>>> I'm receiving  CORS errors from WSO2   in Chrome browser console.
>>>>>
>>>>>
>>>>> Here is my angular application code & WSO2 CORS configuration
>>

Re: [Dev] CORS Errors not resolved

2018-06-28 Thread shibsankar
Any comments to this?

For your convenience, I'm also attaching   Chrome browser console   Network
report for  token API   call

Is there anything I'm missing?

why I'm getting   *Failed to
load http://xx-xx-xxx-xx-xx.xx.xx..com:8280/token
<http://xx-xx-xxx-xx-xx.xx.xx..com:8280/token>: Request
header field Access-Control-Allow-Methods is not allowed by
Access-Control-Allow-Headers in preflight response.*

Is there anything missing?

Regards
Shib



On Thu, Jun 28, 2018 at 11:07 AM, shibsankar  wrote:

> Okay.  I   did  this step as per your suggestion
>
>
> *"...I think you have to explicitly set withCredentials atribute which is
> a client side attribute to false from your angular application .."*
>
>
>
> So my current code :
>
> *// from Angular Controller js*
>
> var dataObj="grant_type=password=x=xxx
> xx=openid";
>
>  Service.callTokenAPI(dataObj)
> .then(function onSuccess(response) {
> console.log("Success");
> console.log("result  = " + JSON.stringify(response));
> }, function onFailure(error) {
> console.log("failure");
> });
>
>
>
> *//from Service.js*
>
> var callTokenAPI = function (dataObj) {
> console.log("Call server dataObj =" + angular.toJson(dataObj));
> var secret=clientKey+":"+clientPass;
> var base64Encoded= btoa(secret);
> console.log("base64Encoded="+base64Encoded);
> return $http({
> url: tokenAPI,
> method: 'POST',
> data: dataObj,
> *withCredentials:false,*
> headers: { "Content-Type": "application/x-www-form-urlencoded"
> ,"Authorization":base64Encoded}
> });
> };
>
>
> When I run my application I  get the CORS error in Chrome *browser console
> *as below
>
> *Failed to load
> http://xx-xx-xxx-xx-xx.xx.xx..com:8280/token
> <http://xx-xx-xxx-xx-xx.xx.xx..com:8280/token>: Request
> header field Access-Control-Allow-Methods is not allowed by
> Access-Control-Allow-Headers in preflight response.*
>
>
> Configuration changes to enable CORS in wso2 server screenshots are
> attached.
>
>
> Is there anything I'm missing now?
>
> Regards
> Shib
>
>
>
>
> On Tue, Jun 26, 2018 at 5:51 PM, Ishara Cooray  wrote:
>
>> Hi Shib,
>>
>> Configuration changes to enable CORS in wso2 server seem to be correct.
>>
>> I think you have to explicitly set withCredentials atribute which is a
>> client side attribute to false from your
>> angular application or whitelist the origin in api-manager.xml without
>> using '*'.
>>
>> Please refer [1]
>>
>> [1] https://stackoverflow.com/questions/42803394/cors-credential
>> s-mode-is-include
>>
>> Thanks & Regards,
>> Ishara Cooray
>> Senior Software Engineer
>> Mobile : +9477 262 9512
>> WSO2, Inc. | http://wso2.com/
>> Lean . Enterprise . Middleware
>>
>> On Tue, Jun 26, 2018 at 12:30 PM, shibsankar  wrote:
>>
>>> I'm receiving  CORS errors from WSO2   in Chrome browser console.
>>>
>>>
>>> Here is my angular application code & WSO2 CORS configuration
>>> screenshots attached.
>>>
>>>
>>>
>>> *// from Angular Controller js*
>>>
>>> var dataObj="grant_type=password=x=xxx
>>> xx=openid";
>>>
>>>  Service.callTokenAPI(dataObj)
>>> .then(function onSuccess(response) {
>>> console.log("Success");
>>> console.log("result  = " + JSON.stringify(response));
>>> }, function onFailure(error) {
>>> console.log("failure");
>>> });
>>>
>>>
>>>
>>> *//from Service.js*
>>>
>>> var callTokenAPI = function (dataObj) {
>>> console.log("Call server dataObj =" + angular.toJson(dataObj));
>>> var secret=clientKey+":"+clientPass;
>>> var base64Encoded= btoa(secret);
>>> console.log("base64Encoded="+base64Encoded);
>>> return $http({
>>> url: tokenAPI,
>>> method: 'POST',
>>> data: dataObj,
>>> headers: { "Content-Type": "application/x-www-form-urlencoded"
>>> ,"Authorization":base64Encoded}
>>> });
>>> };
>>>
>>>
>>> When I run my application I  get the CORS error as below attached.
>>>
>>> *CORS Error  in Chrome Browser Console :*
>>>
>>>
>>>
>>>
>>>
>>>
>>> I  have the CORS config settings  in these mentioned files* (screenshot
>>> attached)*
>>> *api-manager.xml*
>>> *_tokenapi_.xml*
>>> *-revokeapi_.xml*
>>>
>>>
>>> I'm still receiving CORS errors from WSO2.
>>>
>>> Is there anything I'm missing?
>>>
>>> Regards
>>> Shib
>>>
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] CORS Error

2018-06-25 Thread shibsankar
Okay.

I tried with  setting the 'content-type' header to
'application/x-www-form-urlencoded'
and make the call.

still  received same error.

also  tried  allowing 9443 for this and make this call .

still  received same error.

*Please see the error message attached.*

Regards
Shib





On Mon, Jun 18, 2018 at 8:36 AM, Prakhash Sivakumar 
wrote:

>
>
> On Fri, Jun 15, 2018 at 5:21 PM Farasath Ahamed 
> wrote:
>
>>
>>
>> On Thu, Jun 14, 2018 at 3:32 PM, shibsankar  wrote:
>>
>>> *grant_type=password.*
>>>
>>>
>>>
>>> For your convenience, I  am providing the Angular JS relevant code
>>>
>>>
>>> *// from Angular Controller js*
>>>
>>> var dataObj="grant_type=password=x=
>>> x=openid";
>>>
>>>  Service.callTokenAPI(dataObj)
>>> .then(function onSuccess(response) {
>>> console.log("Success");
>>> console.log("result  = " + JSON.stringify(response));
>>> }, function onFailure(error) {
>>> console.log("failure");
>>> });
>>>
>>>
>>>
>>> *//from Service.js*
>>>
>>> var callTokenAPI = function (dataObj) {
>>> console.log("Call server dataObj =" + angular.toJson(dataObj));
>>> var secret=clientKey+":"+clientPass;
>>> var base64Encoded= btoa(secret);
>>> console.log("base64Encoded="+base64Encoded);
>>> return $http({
>>> url: tokenAPI,
>>> method: 'POST',
>>> data: dataObj,
>>> headers: { "Content-Type": "application/json;charset=utf-8"
>>> ,"Authorization":base64Encoded}
>>> });
>>> };
>>>
>>>
>> Can you try setting the 'content-type' header to 
>> 'application/x-www-form-urlencoded'?
>> (Check [1])
>>
>> [1] https://security.stackexchange.com/questions/
>> 187311/why-cors-preflight-is-not-available-for-post-
>> requests-when-content-type-is-appli/187312#187312
>>
>
> This should work. Also I think the reason for your observation is when
> adding CORS related configs in tokenapi.xml and revokeapi.xml files, the
> CORS allowing is not getting applied for the inbound and outbound requests
> which uses 8280 and 8243 ports, just to confirm can you please try allowing
> 9443 for this and make this call ?
>
>>
>>
>>>
>>> When I  run this I am getting CORS error screenshot shared earlier.
>>>
>>> Regards
>>> Shib
>>>
>>>
>>> On Thu, Jun 14, 2018 at 3:00 PM, Rushmin Fernando 
>>> wrote:
>>>
>>>> Could you please let us know the grant type you are using here. I would
>>>> like to know whether this is a valid use case.
>>>>
>>>> On Thu, Jun 14, 2018 at 2:54 PM shibsankar  wrote:
>>>>
>>>>> Yes.  I get  same CORS error with the correct endpoint, which is */*
>>>>> *token*
>>>>>
>>>>> screenshot attached.
>>>>>
>>>>> Regards
>>>>> Shib
>>>>>
>>>>> On Thu, Jun 14, 2018 at 2:42 PM, Rushmin Fernando 
>>>>> wrote:
>>>>>
>>>>>> In the console logs, it says */toekn, *which is wrong spellings.
>>>>>>
>>>>>> Do you get the same CORS error with the correct endpoint, which is
>>>>>> */**token *?
>>>>>>
>>>>>> On Thu, Jun 14, 2018 at 2:26 PM shibsankar  wrote:
>>>>>>
>>>>>>> I am receiving CORS Error when I call the WSO2 token API  from
>>>>>>> Angular JS application.
>>>>>>>
>>>>>>> How do you fix this?
>>>>>>>
>>>>>>> Regards
>>>>>>> Shib(9831418066)
>>>>>>>
>>>>>>>
>>>>>>> ___
>>>>>>> Dev mailing list
>>>>>>> Dev@wso2.org
>>>>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> *Best Regards*
>>>>>>
>>>>>> *Rushmin Fernando*
>>>>>> *Technical Lead*
>>>>>>
>>>>>> WSO2 Inc. <http://wso2.com/> - Lean . Enterprise . Middleware
>>>>>>
>>>>>> mobile : +94775615183
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>
>>>> --
>>>> *Best Regards*
>>>>
>>>> *Rushmin Fernando*
>>>> *Technical Lead*
>>>>
>>>> WSO2 Inc. <http://wso2.com/> - Lean . Enterprise . Middleware
>>>>
>>>> mobile : +94775615183
>>>>
>>>>
>>>>
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> Farasath Ahamed
>> Senior Software Engineer, WSO2 Inc.; http://wso2.com
>> Mobile: +94777603866
>> Blog: blog.farazath.com
>> Twitter: @farazath619 <https://twitter.com/farazath619>
>> <http://wso2.com/signature>
>>
>>
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>
>
> --
> Prakhash Sivakumar
> Senior Software Engineer | WSO2 Inc
> Platform Security Team
> Mobile : +94771510080
> Blog : https://medium.com/@PrakhashS
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] CORS Error

2018-06-14 Thread shibsankar
No.Its not working yet.

I added  CORS Handler in tokenapi.xml and revokeapi.xml

restarted  server

tested  my application.

Now I am getting a CORS wildcard error  in my application.   Please see the
application error screenhsot and wso2 cors handler screenshot.

Regards
Shib



On Thu, Jun 14, 2018 at 3:55 PM, Bhathiya Jayasekara 
wrote:

> This should work for you.
>
> https://medium.com/@iloshinikarunarathne/enabling-
> cors-for-token-apis-in-wso2-apim-d04f7ef5171
>
> Thanks,
> Bhathiya
>
> On Thu, Jun 14, 2018 at 3:33 PM shibsankar  wrote:
>
>> *grant_type=password.*
>>
>>
>>
>> For your convenience, I  am providing the Angular JS relevant code
>>
>>
>> *// from Angular Controller js*
>>
>> var dataObj="grant_type=password=x=
>> x=openid";
>>
>>  Service.callTokenAPI(dataObj)
>> .then(function onSuccess(response) {
>> console.log("Success");
>> console.log("result  = " + JSON.stringify(response));
>> }, function onFailure(error) {
>> console.log("failure");
>> });
>>
>>
>>
>> *//from Service.js*
>>
>> var callTokenAPI = function (dataObj) {
>> console.log("Call server dataObj =" + angular.toJson(dataObj));
>> var secret=clientKey+":"+clientPass;
>> var base64Encoded= btoa(secret);
>> console.log("base64Encoded="+base64Encoded);
>> return $http({
>> url: tokenAPI,
>> method: 'POST',
>> data: dataObj,
>> headers: { "Content-Type": "application/json;charset=utf-8"
>> ,"Authorization":base64Encoded}
>> });
>> };
>>
>>
>> When I  run this I am getting CORS error screenshot shared earlier.
>>
>> Regards
>> Shib
>>
>>
>> On Thu, Jun 14, 2018 at 3:00 PM, Rushmin Fernando 
>> wrote:
>>
>>> Could you please let us know the grant type you are using here. I would
>>> like to know whether this is a valid use case.
>>>
>>> On Thu, Jun 14, 2018 at 2:54 PM shibsankar  wrote:
>>>
>>>> Yes.  I get  same CORS error with the correct endpoint, which is */*
>>>> *token*
>>>>
>>>> screenshot attached.
>>>>
>>>> Regards
>>>> Shib
>>>>
>>>> On Thu, Jun 14, 2018 at 2:42 PM, Rushmin Fernando 
>>>> wrote:
>>>>
>>>>> In the console logs, it says */toekn, *which is wrong spellings.
>>>>>
>>>>> Do you get the same CORS error with the correct endpoint, which is 
>>>>> */**token
>>>>> *?
>>>>>
>>>>> On Thu, Jun 14, 2018 at 2:26 PM shibsankar  wrote:
>>>>>
>>>>>> I am receiving CORS Error when I call the WSO2 token API  from
>>>>>> Angular JS application.
>>>>>>
>>>>>> How do you fix this?
>>>>>>
>>>>>> Regards
>>>>>> Shib(9831418066)
>>>>>>
>>>>>>
>>>>>> ___
>>>>>> Dev mailing list
>>>>>> Dev@wso2.org
>>>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> *Best Regards*
>>>>>
>>>>> *Rushmin Fernando*
>>>>> *Technical Lead*
>>>>>
>>>>> WSO2 Inc. <http://wso2.com/> - Lean . Enterprise . Middleware
>>>>>
>>>>> mobile : +94775615183
>>>>>
>>>>>
>>>>>
>>>>
>>>
>>> --
>>> *Best Regards*
>>>
>>> *Rushmin Fernando*
>>> *Technical Lead*
>>>
>>> WSO2 Inc. <http://wso2.com/> - Lean . Enterprise . Middleware
>>>
>>> mobile : +94775615183
>>>
>>>
>>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>
>
> --
> *Bhathiya Jayasekara*
> *Associate Technical Lead,*
> *WSO2 inc., http://wso2.com <http://wso2.com>*
>
> *Phone: +94715478185*
> *LinkedIn: http://www.linkedin.com/in/bhathiyaj
> <http://www.linkedin.com/in/bhathiyaj>*
> *Twitter: https://twitter.com/bhathiyax <https://twitter.com/bhathiyax>*
> *Blog: http://movingaheadblog.blogspot.com
> <http://movingaheadblog.blogspot.com/>*
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] CORS Error

2018-06-14 Thread shibsankar
 *grant_type=password.*



For your convenience, I  am providing the Angular JS relevant code


*// from Angular Controller js*

var dataObj="
grant_type=password=x=x=openid";

 Service.callTokenAPI(dataObj)
.then(function onSuccess(response) {
console.log("Success");
console.log("result  = " + JSON.stringify(response));
}, function onFailure(error) {
console.log("failure");
});



*//from Service.js*

var callTokenAPI = function (dataObj) {
console.log("Call server dataObj =" + angular.toJson(dataObj));
var secret=clientKey+":"+clientPass;
var base64Encoded= btoa(secret);
console.log("base64Encoded="+base64Encoded);
return $http({
url: tokenAPI,
method: 'POST',
data: dataObj,
headers: { "Content-Type": "application/json;charset=utf-8"
,"Authorization":base64Encoded}
});
};


When I  run this I am getting CORS error screenshot shared earlier.

Regards
Shib


On Thu, Jun 14, 2018 at 3:00 PM, Rushmin Fernando  wrote:

> Could you please let us know the grant type you are using here. I would
> like to know whether this is a valid use case.
>
> On Thu, Jun 14, 2018 at 2:54 PM shibsankar  wrote:
>
>> Yes.  I get  same CORS error with the correct endpoint, which is */*
>> *token*
>>
>> screenshot attached.
>>
>> Regards
>> Shib
>>
>> On Thu, Jun 14, 2018 at 2:42 PM, Rushmin Fernando 
>> wrote:
>>
>>> In the console logs, it says */toekn, *which is wrong spellings.
>>>
>>> Do you get the same CORS error with the correct endpoint, which is */**token
>>> *?
>>>
>>> On Thu, Jun 14, 2018 at 2:26 PM shibsankar  wrote:
>>>
>>>> I am receiving CORS Error when I call the WSO2 token API  from Angular
>>>> JS application.
>>>>
>>>> How do you fix this?
>>>>
>>>> Regards
>>>> Shib(9831418066)
>>>>
>>>>
>>>> ___
>>>> Dev mailing list
>>>> Dev@wso2.org
>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>>
>>>
>>>
>>> --
>>> *Best Regards*
>>>
>>> *Rushmin Fernando*
>>> *Technical Lead*
>>>
>>> WSO2 Inc. <http://wso2.com/> - Lean . Enterprise . Middleware
>>>
>>> mobile : +94775615183
>>>
>>>
>>>
>>
>
> --
> *Best Regards*
>
> *Rushmin Fernando*
> *Technical Lead*
>
> WSO2 Inc. <http://wso2.com/> - Lean . Enterprise . Middleware
>
> mobile : +94775615183
>
>
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] CORS Error

2018-06-14 Thread shibsankar
Yes.  I get  same CORS error with the correct endpoint, which is */**token*

screenshot attached.

Regards
Shib

On Thu, Jun 14, 2018 at 2:42 PM, Rushmin Fernando  wrote:

> In the console logs, it says */toekn, *which is wrong spellings.
>
> Do you get the same CORS error with the correct endpoint, which is */**token
> *?
>
> On Thu, Jun 14, 2018 at 2:26 PM shibsankar  wrote:
>
>> I am receiving CORS Error when I call the WSO2 token API  from Angular JS
>> application.
>>
>> How do you fix this?
>>
>> Regards
>> Shib(9831418066)
>>
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>
>
> --
> *Best Regards*
>
> *Rushmin Fernando*
> *Technical Lead*
>
> WSO2 Inc. <http://wso2.com/> - Lean . Enterprise . Middleware
>
> mobile : +94775615183
>
>
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] CORS Error

2018-06-14 Thread shibsankar
I am receiving CORS Error when I call the WSO2 token API  from Angular JS
application.

How do you fix this?

Regards
Shib(9831418066)
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] userinfo not received

2018-06-12 Thread shibsankar
I have LDAP User store configured in WSO2.

I am calling *userinfo *API  to get  user info for a given user *access
token.  *

( This *access token* has been generated for a given LDAP username &
password with grant type is password )

I was expecting *userinfo API*  to respond with user First Name & Last
Name  but it did not.

Please see the screenshot attached.

How to fix this?



Regards
Shib
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] WSO2 Store

2018-06-12 Thread shibsankar
Yup. got it.

Thanks

Regards
Shib

On Tue, Jun 12, 2018 at 1:24 PM, Fazlan Nazeem  wrote:

> Hi Shib,
>
> Unsubscribing an API from an application can be done in applications page
> under subscriptions tab.
>
> please check step 12 in [1]
>
> [1] https://docs.wso2.com/display/AM210/Subscribe+to+an+API
>
> On Tue, Jun 12, 2018 at 1:16 PM shibsankar  wrote:
>
>> How do you unsubscribe a service from Application store?
>>
>> Screenshot attached.
>>
>> Regards
>> Shib
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>
>
> --
> Thanks & Regards,
>
> *Fazlan Nazeem*
> Senior Software Engineer
> WSO2 Inc
> Mobile : +94772338839
> fazl...@wso2.com
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] WSO2 Store

2018-06-12 Thread shibsankar
How do you unsubscribe a service from Application store?

Screenshot attached.

Regards
Shib
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] WSO2 and LDAP

2018-06-11 Thread shibsankar
Okay. I guess there is no user validation APIM API then.  No problem.


I would like to try  your suggestion

*" ...I think it would be best to use implicit grant type for this purpose.
Basically, when someone wants to login to the your application they will be
redirected to APIM which they will prompt the login screen..."*

What is the APIM redirection url?  Is it this  URL ?https://
:9443/carbon/admin/index.jsp
or
some other url?



*"...After successful authentication, they will obtain a token and redirect
back to your application. "*

How to configure here to obtain token and redirect back to my application?
Could you please post configuration steps for this part.


Regards
Shib









<https://www.avast.com/sig-email?utm_medium=email_source=link_campaign=sig-email_content=webmail>
Virus-free.
www.avast.com
<https://www.avast.com/sig-email?utm_medium=email_source=link_campaign=sig-email_content=webmail>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

On Mon, Jun 11, 2018 at 5:36 PM, shibsankar  wrote:

> Your suggestion is good,
>
> However, I don't want to redirect my application to APIM and prompt the
> login screen.
>
> Rather, *as an alternative*, I'd like to invoke user validation APIM  API
> ( *exist ?*) for authentication.  Do we have user validation APIM API?
>
>
>
> *something like this ...*
>
>
> // invoke APIM LDAP user authentication API
>
> *// Request JSON payload data:*
>
> {
> "credentials": {
> "username": "userx",
> "password": "mypass"
> }
> }
>
> *// Response data:*
>
> {
> "response": {
> "status": "true"
> }
> }
>
>
> Do we have similar such facility?
>
> Regards
> Shib
>
>
>
> On Mon, Jun 11, 2018 at 5:01 PM, Harsha Kumara  wrote:
>
>>
>>
>> On Mon, Jun 11, 2018 at 2:57 PM shibsankar  wrote:
>>
>>> Let me explain in detail what I plan to achieve.
>>>
>>>
>>> Step 1:  User will login to my web application (angular js front end).
>>>
>>> *Step 2: I want to validate these users against LDAP User Store
>>> configured in WSO2*
>>>
>> I think it would be best to use implict grant type for this purpose.
>> Basically when someone want to login to the your application they will be
>> redirect to APIM which they will prompt the login screen. After successful
>> authentication they will obtain a token and redirect back to your
>> application.
>>
>>> Step 3: Once these users are authenticated, I plan to invoke token API
>>> with password grant to obtain an OAuth 2 token.
>>>
>>> Step 4: Once I receive the OAuth2 token, I would invoke APIM to get a
>>> response from backend rest API.
>>>
>>>
>>> I'm at *Step 2. * Can we authenticate logged in users against WSO2 LDAP
>>> user store?  whats the curl command for this?
>>>
>>> Regards
>>> Shib
>>>
>>>
>>> <https://www.avast.com/sig-email?utm_medium=email_source=link_campaign=sig-email_content=webmail>
>>>  Virus-free.
>>> www.avast.com
>>> <https://www.avast.com/sig-email?utm_medium=email_source=link_campaign=sig-email_content=webmail>
>>> <#m_-2480271623769723822_m_8422013387296300243_m_4987511863897348861_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>>>
>>> On Mon, Jun 11, 2018 at 2:34 PM, Dinusha Dissanayake 
>>> wrote:
>>>
>>>> Hi Shib,
>>>>
>>>> I guess you are authenticating the user to perform certain operations
>>>> in APIM through rest APIs ?.
>>>> Please refer the documentation[1] which includes details of our REST
>>>> APIs (store/publisher and admin portal). There it has explained what you
>>>> have to do to get the necessary access tokens before invocation those rest
>>>> APIs. Please refer the "Getting started" section of any of the subsections
>>>> (eg [2] ) for necessary details.
>>>>
>>>> [1] https://docs.wso2.com/display/AM210/RESTful+APIs
>>>> [2] https://docs.wso2.com/display/AM210/apidocs/store/#guide
>>>>
>>>>
>>>>
>>>> On Mon, Jun 11, 2018 at 2:21 PM, shibsankar  wrote:
>>>>
>>>>> I have configured LDAP as a User Store in WSO2 (*screenshot attached*).
>>>>> This is okay.
>>>>>
>>>>> Now  I plan to send an LDAP user id & password through *Postman *to
>>>>> WSO2 server to verify successful authentication.
>>>>>
&

Re: [Dev] WSO2 and LDAP

2018-06-11 Thread shibsankar
Your suggestion is good,

However, I don't want to redirect my application to APIM and prompt the
login screen.

Rather, *as an alternative*, I'd like to invoke user validation APIM
API ( *exist
?*) for authentication.  Do we have user validation APIM API?



*something like this ...*


// invoke APIM LDAP user authentication API

*// Request JSON payload data:*

{
"credentials": {
"username": "userx",
"password": "mypass"
}
}

*// Response data:*

{
"response": {
"status": "true"
}
}


Do we have similar such facility?

Regards
Shib



On Mon, Jun 11, 2018 at 5:01 PM, Harsha Kumara  wrote:

>
>
> On Mon, Jun 11, 2018 at 2:57 PM shibsankar  wrote:
>
>> Let me explain in detail what I plan to achieve.
>>
>>
>> Step 1:  User will login to my web application (angular js front end).
>>
>> *Step 2: I want to validate these users against LDAP User Store
>> configured in WSO2*
>>
> I think it would be best to use implict grant type for this purpose.
> Basically when someone want to login to the your application they will be
> redirect to APIM which they will prompt the login screen. After successful
> authentication they will obtain a token and redirect back to your
> application.
>
>> Step 3: Once these users are authenticated, I plan to invoke token API
>> with password grant to obtain an OAuth 2 token.
>>
>> Step 4: Once I receive the OAuth2 token, I would invoke APIM to get a
>> response from backend rest API.
>>
>>
>> I'm at *Step 2. * Can we authenticate logged in users against WSO2 LDAP
>> user store?  whats the curl command for this?
>>
>> Regards
>> Shib
>>
>>
>> <https://www.avast.com/sig-email?utm_medium=email_source=link_campaign=sig-email_content=webmail>
>>  Virus-free.
>> www.avast.com
>> <https://www.avast.com/sig-email?utm_medium=email_source=link_campaign=sig-email_content=webmail>
>> <#m_8422013387296300243_m_4987511863897348861_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>>
>> On Mon, Jun 11, 2018 at 2:34 PM, Dinusha Dissanayake 
>> wrote:
>>
>>> Hi Shib,
>>>
>>> I guess you are authenticating the user to perform certain operations in
>>> APIM through rest APIs ?.
>>> Please refer the documentation[1] which includes details of our REST
>>> APIs (store/publisher and admin portal). There it has explained what you
>>> have to do to get the necessary access tokens before invocation those rest
>>> APIs. Please refer the "Getting started" section of any of the subsections
>>> (eg [2] ) for necessary details.
>>>
>>> [1] https://docs.wso2.com/display/AM210/RESTful+APIs
>>> [2] https://docs.wso2.com/display/AM210/apidocs/store/#guide
>>>
>>>
>>>
>>> On Mon, Jun 11, 2018 at 2:21 PM, shibsankar  wrote:
>>>
>>>> I have configured LDAP as a User Store in WSO2 (*screenshot attached*).
>>>> This is okay.
>>>>
>>>> Now  I plan to send an LDAP user id & password through *Postman *to
>>>> WSO2 server to verify successful authentication.
>>>>
>>>> Could you please tell which WSO2 URL to invoke and what parameters to
>>>> pass through *Postman* to test successful authentication?
>>>>
>>>> Regards
>>>> Shib
>>>>
>>>>
>>>> On Mon, Jun 11, 2018 at 12:46 PM, Dinusha Dissanayake <
>>>> dinus...@wso2.com> wrote:
>>>>
>>>>> Hi Shib,
>>>>>
>>>>> Yes you can. But you may need to configure LDAP as a user store first.
>>>>>
>>>>> Please follow the document[1] to configure use stores.
>>>>>
>>>>> [1] https://docs.wso2.com/display/AM210/Configuring+User+Stores
>>>>>
>>>>> Thanks,
>>>>> DinushaD
>>>>>
>>>>> On Mon, Jun 11, 2018 at 12:42 PM, shibsankar  wrote:
>>>>>
>>>>>> Hi,
>>>>>> I have an LDAP with user credentials.
>>>>>>
>>>>>> Can I  use LDAP user credentials as password grant to generating
>>>>>> Oauth 2 token?
>>>>>>
>>>>>>
>>>>>> *Please see the screenshot attached.*
>>>>>>
>>>>>> Regards
>>>>>> Shib
>>>>>>
>>>>>>
>>>>>> <https://www.avast.com/sig-email?utm_medium=email_source=link_campaign=sig-email_content=webmail>
>>>>>>  Virus-free.
>>>>>> www.avast.com
>>>>>> <https://www.avast.com/sig-email?utm_medium=email_source=link_campaign=sig-email_content=webmail>
>>>>>> <#m_8422013387296300243_m_4987511863897348861_m_5925729601328441019_m_4045808147317074170_m_3545910350936696630_m_-7733728954474898531_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Dinusha Dissanayake
>>>>> Software Engineer
>>>>> WSO2 Inc
>>>>> Mobile: +94712939439
>>>>> <https://wso2.com/signature>
>>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> Dinusha Dissanayake
>>> Software Engineer
>>> WSO2 Inc
>>> Mobile: +94712939439
>>> <https://wso2.com/signature>
>>>
>>
>>
>
> --
> Harsha Kumara
> Associate Technical Lead, WSO2 Inc.
> Mobile: +94775505618
> Blog:harshcreationz.blogspot.com
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] WSO2 and LDAP

2018-06-11 Thread shibsankar
Does WSO2 have any API for LDAP user validation?

Regards
Shib

On Mon, Jun 11, 2018 at 2:57 PM, shibsankar  wrote:

> Let me explain in detail what I plan to achieve.
>
>
> Step 1:  User will login to my web application (angular js front end).
>
> *Step 2: I want to validate these users against LDAP User Store configured
> in WSO2*
>
> Step 3: Once these users are authenticated, I plan to invoke token API
> with password grant to obtain an OAuth 2 token.
>
> Step 4: Once I receive the OAuth2 token, I would invoke APIM to get a
> response from backend rest API.
>
>
> I'm at *Step 2. * Can we authenticate logged in users against WSO2 LDAP
> user store?  whats the curl command for this?
>
> Regards
> Shib
>
>
> <https://www.avast.com/sig-email?utm_medium=email_source=link_campaign=sig-email_content=webmail>
>  Virus-free.
> www.avast.com
> <https://www.avast.com/sig-email?utm_medium=email_source=link_campaign=sig-email_content=webmail>
> <#m_-3943128146528446382_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>
> On Mon, Jun 11, 2018 at 2:34 PM, Dinusha Dissanayake 
> wrote:
>
>> Hi Shib,
>>
>> I guess you are authenticating the user to perform certain operations in
>> APIM through rest APIs ?.
>> Please refer the documentation[1] which includes details of our REST APIs
>> (store/publisher and admin portal). There it has explained what you have to
>> do to get the necessary access tokens before invocation those rest APIs.
>> Please refer the "Getting started" section of any of the subsections (eg
>> [2] ) for necessary details.
>>
>> [1] https://docs.wso2.com/display/AM210/RESTful+APIs
>> [2] https://docs.wso2.com/display/AM210/apidocs/store/#guide
>>
>>
>>
>> On Mon, Jun 11, 2018 at 2:21 PM, shibsankar  wrote:
>>
>>> I have configured LDAP as a User Store in WSO2 (*screenshot attached*).
>>> This is okay.
>>>
>>> Now  I plan to send an LDAP user id & password through *Postman *to
>>> WSO2 server to verify successful authentication.
>>>
>>> Could you please tell which WSO2 URL to invoke and what parameters to
>>> pass through *Postman* to test successful authentication?
>>>
>>> Regards
>>> Shib
>>>
>>>
>>> On Mon, Jun 11, 2018 at 12:46 PM, Dinusha Dissanayake >> > wrote:
>>>
>>>> Hi Shib,
>>>>
>>>> Yes you can. But you may need to configure LDAP as a user store first.
>>>>
>>>> Please follow the document[1] to configure use stores.
>>>>
>>>> [1] https://docs.wso2.com/display/AM210/Configuring+User+Stores
>>>>
>>>> Thanks,
>>>> DinushaD
>>>>
>>>> On Mon, Jun 11, 2018 at 12:42 PM, shibsankar  wrote:
>>>>
>>>>> Hi,
>>>>> I have an LDAP with user credentials.
>>>>>
>>>>> Can I  use LDAP user credentials as password grant to generating Oauth
>>>>> 2 token?
>>>>>
>>>>>
>>>>> *Please see the screenshot attached.*
>>>>>
>>>>> Regards
>>>>> Shib
>>>>>
>>>>>
>>>>> <https://www.avast.com/sig-email?utm_medium=email_source=link_campaign=sig-email_content=webmail>
>>>>>  Virus-free.
>>>>> www.avast.com
>>>>> <https://www.avast.com/sig-email?utm_medium=email_source=link_campaign=sig-email_content=webmail>
>>>>> <#m_-3943128146528446382_m_5925729601328441019_m_4045808147317074170_m_3545910350936696630_m_-7733728954474898531_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Dinusha Dissanayake
>>>> Software Engineer
>>>> WSO2 Inc
>>>> Mobile: +94712939439
>>>> <https://wso2.com/signature>
>>>>
>>>
>>>
>>
>>
>> --
>> Dinusha Dissanayake
>> Software Engineer
>> WSO2 Inc
>> Mobile: +94712939439
>> <https://wso2.com/signature>
>>
>
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] WSO2 and LDAP

2018-06-11 Thread shibsankar
Let me explain in detail what I plan to achieve.


Step 1:  User will login to my web application (angular js front end).

*Step 2: I want to validate these users against LDAP User Store configured
in WSO2*

Step 3: Once these users are authenticated, I plan to invoke token API with
password grant to obtain an OAuth 2 token.

Step 4: Once I receive the OAuth2 token, I would invoke APIM to get a
response from backend rest API.


I'm at *Step 2. * Can we authenticate logged in users against WSO2 LDAP
user store?  whats the curl command for this?

Regards
Shib

<https://www.avast.com/sig-email?utm_medium=email_source=link_campaign=sig-email_content=webmail>
Virus-free.
www.avast.com
<https://www.avast.com/sig-email?utm_medium=email_source=link_campaign=sig-email_content=webmail>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

On Mon, Jun 11, 2018 at 2:34 PM, Dinusha Dissanayake 
wrote:

> Hi Shib,
>
> I guess you are authenticating the user to perform certain operations in
> APIM through rest APIs ?.
> Please refer the documentation[1] which includes details of our REST APIs
> (store/publisher and admin portal). There it has explained what you have to
> do to get the necessary access tokens before invocation those rest APIs.
> Please refer the "Getting started" section of any of the subsections (eg
> [2] ) for necessary details.
>
> [1] https://docs.wso2.com/display/AM210/RESTful+APIs
> [2] https://docs.wso2.com/display/AM210/apidocs/store/#guide
>
>
>
> On Mon, Jun 11, 2018 at 2:21 PM, shibsankar  wrote:
>
>> I have configured LDAP as a User Store in WSO2 (*screenshot attached*).
>> This is okay.
>>
>> Now  I plan to send an LDAP user id & password through *Postman *to WSO2
>> server to verify successful authentication.
>>
>> Could you please tell which WSO2 URL to invoke and what parameters to
>> pass through *Postman* to test successful authentication?
>>
>> Regards
>> Shib
>>
>>
>> On Mon, Jun 11, 2018 at 12:46 PM, Dinusha Dissanayake 
>> wrote:
>>
>>> Hi Shib,
>>>
>>> Yes you can. But you may need to configure LDAP as a user store first.
>>>
>>> Please follow the document[1] to configure use stores.
>>>
>>> [1] https://docs.wso2.com/display/AM210/Configuring+User+Stores
>>>
>>> Thanks,
>>> DinushaD
>>>
>>> On Mon, Jun 11, 2018 at 12:42 PM, shibsankar  wrote:
>>>
>>>> Hi,
>>>> I have an LDAP with user credentials.
>>>>
>>>> Can I  use LDAP user credentials as password grant to generating Oauth
>>>> 2 token?
>>>>
>>>>
>>>> *Please see the screenshot attached.*
>>>>
>>>> Regards
>>>> Shib
>>>>
>>>>
>>>> <https://www.avast.com/sig-email?utm_medium=email_source=link_campaign=sig-email_content=webmail>
>>>>  Virus-free.
>>>> www.avast.com
>>>> <https://www.avast.com/sig-email?utm_medium=email_source=link_campaign=sig-email_content=webmail>
>>>> <#m_5925729601328441019_m_4045808147317074170_m_3545910350936696630_m_-7733728954474898531_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>>>>
>>>
>>>
>>>
>>> --
>>> Dinusha Dissanayake
>>> Software Engineer
>>> WSO2 Inc
>>> Mobile: +94712939439
>>> <https://wso2.com/signature>
>>>
>>
>>
>
>
> --
> Dinusha Dissanayake
> Software Engineer
> WSO2 Inc
> Mobile: +94712939439
> <https://wso2.com/signature>
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] WSO2 and LDAP

2018-06-11 Thread shibsankar
I have configured LDAP as a User Store in WSO2 (*screenshot attached*).
This is okay.

Now  I plan to send an LDAP user id & password through *Postman *to WSO2
server to verify successful authentication.

Could you please tell which WSO2 URL to invoke and what parameters to pass
through *Postman* to test successful authentication?

Regards
Shib


On Mon, Jun 11, 2018 at 12:46 PM, Dinusha Dissanayake 
wrote:

> Hi Shib,
>
> Yes you can. But you may need to configure LDAP as a user store first.
>
> Please follow the document[1] to configure use stores.
>
> [1] https://docs.wso2.com/display/AM210/Configuring+User+Stores
>
> Thanks,
> DinushaD
>
> On Mon, Jun 11, 2018 at 12:42 PM, shibsankar  wrote:
>
>> Hi,
>> I have an LDAP with user credentials.
>>
>> Can I  use LDAP user credentials as password grant to generating Oauth 2
>> token?
>>
>>
>> *Please see the screenshot attached.*
>>
>> Regards
>> Shib
>>
>>
>> <https://www.avast.com/sig-email?utm_medium=email_source=link_campaign=sig-email_content=webmail>
>>  Virus-free.
>> www.avast.com
>> <https://www.avast.com/sig-email?utm_medium=email_source=link_campaign=sig-email_content=webmail>
>> <#m_3545910350936696630_m_-7733728954474898531_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>>
>
>
>
> --
> Dinusha Dissanayake
> Software Engineer
> WSO2 Inc
> Mobile: +94712939439
> <https://wso2.com/signature>
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] WSO2 and LDAP

2018-06-11 Thread shibsankar
Hi,
I have an LDAP with user credentials.

Can I  use LDAP user credentials as password grant to generating Oauth 2
token?


*Please see the screenshot attached.*

Regards
Shib


Virus-free.
www.avast.com

<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] WSO2 and OAuth 2.0

2018-06-10 Thread shibsankar
Yes. I see consumer key and consumer secret now when I click generate
key (*screenshot
key-value attached*)

However, when I call token API with these key and secrets from Postman, I
don't receive any OAuth 2 token. (*screenshot access-token attached*)

What is going wrong ?

Regards
Shib



On Sun, Jun 10, 2018 at 11:53 AM, Harsha Kumara  wrote:

>
>
> On Sun, Jun 10, 2018 at 11:16 AM shibsankar  wrote:
>
>> I checked [1] https://docs.wso2.com/display/AM210/Subscribe+to+an+API
>>  , yes, It gives a token for sure when you subscribe API.
>>
>> But is it an Oauth2 token?  Or just a normal access token?
>>
> API Manager is compliant with OAuth2 specification. Hence the tokens you
>> obtained will use OAuth2.  When you click generate keys button, you will
>> receive a consumer key and secret.
>> *Please see the screenshot attached.*
>>
>> Regards
>> Shib
>>
>>
>>
>> On Sun, Jun 10, 2018 at 9:47 AM, Pubudu Gunatilaka 
>> wrote:
>>
>>> Hi Shib,
>>>
>>> You can refer [1] for getting the token. This explains how to get the
>>> Oauth2 token.
>>>
>>> You do not need to have WSO2 Identity Server for getting an Oauth2
>>> token. It is coming with API Manager.
>>>
>>> Using the token API [2], you can get a token.
>>>
>>> [1] - https://docs.wso2.com/display/AM210/Subscribe+to+an+API
>>> [2] - https://docs.wso2.com/display/AM210/Token+API
>>>
>>> Thank you!
>>>
>>> On Sat, Jun 9, 2018 at 9:07 PM shibsankar  wrote:
>>>
>>>> Hi,
>>>> I would like to do the following :
>>>>
>>>>
>>>> *My Objective *:
>>>>
>>>> I have published my API in WSO2 API Gateway. API is working fine.
>>>>
>>>> Now I would like to secure my API with OAuth 2.0. I plan to invoke the
>>>> published API with OAuth 2.0 token from my Angular front-end application.
>>>>
>>>>
>>>> *My Query *:
>>>> How do I get the OAuth 2.0 token?
>>>>
>>>> *Q1*: Do I need to install WSO2 Identity server to get OAuth 2.0
>>>> token? *Or  *I  can get OAuth token from WSO2 API Manager itself?
>>>>
>>>> *Q2*: Is there any WSO2 OAuth 2.0 API which provides OAuth token when
>>>> invoked? whats the URL?
>>>>
>>>> Regards
>>>> Shib
>>>> ___
>>>> Dev mailing list
>>>> Dev@wso2.org
>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>>
>>>
>>>
>>> --
>>> *Pubudu Gunatilaka*
>>> Committer and PMC Member - Apache Stratos
>>> Senior Software Engineer
>>> WSO2, Inc.: http://wso2.com
>>> mobile : +94774078049
>>>
>>>
>>
>
> --
> Harsha Kumara
> Associate Technical Lead, WSO2 Inc.
> Mobile: +94775505618
> Blog:harshcreationz.blogspot.com
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] WSO2 and OAuth 2.0

2018-06-09 Thread shibsankar
I checked [1] https://docs.wso2.com/display/AM210/Subscribe+to+an+API
 , yes, It gives a token for sure when you subscribe API.

But is it an Oauth2 token?  Or just a normal access token?

*Please see the screenshot attached.*

Regards
Shib



On Sun, Jun 10, 2018 at 9:47 AM, Pubudu Gunatilaka  wrote:

> Hi Shib,
>
> You can refer [1] for getting the token. This explains how to get the
> Oauth2 token.
>
> You do not need to have WSO2 Identity Server for getting an Oauth2 token.
> It is coming with API Manager.
>
> Using the token API [2], you can get a token.
>
> [1] - https://docs.wso2.com/display/AM210/Subscribe+to+an+API
> [2] - https://docs.wso2.com/display/AM210/Token+API
>
> Thank you!
>
> On Sat, Jun 9, 2018 at 9:07 PM shibsankar  wrote:
>
>> Hi,
>> I would like to do the following :
>>
>>
>> *My Objective *:
>>
>> I have published my API in WSO2 API Gateway. API is working fine.
>>
>> Now I would like to secure my API with OAuth 2.0. I plan to invoke the
>> published API with OAuth 2.0 token from my Angular front-end application.
>>
>>
>> *My Query *:
>> How do I get the OAuth 2.0 token?
>>
>> *Q1*: Do I need to install WSO2 Identity server to get OAuth 2.0 token? *Or
>> *I  can get OAuth token from WSO2 API Manager itself?
>>
>> *Q2*: Is there any WSO2 OAuth 2.0 API which provides OAuth token when
>> invoked? whats the URL?
>>
>> Regards
>> Shib
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>
>
> --
> *Pubudu Gunatilaka*
> Committer and PMC Member - Apache Stratos
> Senior Software Engineer
> WSO2, Inc.: http://wso2.com
> mobile : +94774078049
>
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] WSO2 and OAuth 2.0

2018-06-09 Thread shibsankar
Hi,
I would like to do the following :


*My Objective *:

I have published my API in WSO2 API Gateway. API is working fine.

Now I would like to secure my API with OAuth 2.0. I plan to invoke the
published API with OAuth 2.0 token from my Angular front-end application.


*My Query *:
How do I get the OAuth 2.0 token?

*Q1*: Do I need to install WSO2 Identity server to get OAuth 2.0 token? *Or
*I  can get OAuth token from WSO2 API Manager itself?

*Q2*: Is there any WSO2 OAuth 2.0 API which provides OAuth token when
invoked? whats the URL?

Regards
Shib
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] WSO2 Server Public IP

2018-06-09 Thread shibsankar
Bingo.  Its working on 8280 and HTTP !!!

I'm getting response from public gateway URL now.

It is awesome.


*screenshot attached.*

Regards
Shib

On Sat, Jun 9, 2018 at 2:47 PM, Harsha Kumara  wrote:

> Make sure you have subscribed this API to the application that you
> generated the token.
>
> On Sat, Jun 9, 2018 at 2:45 PM shibsankar  wrote:
>
>> Okay.  Tested with 8243 port.
>>
>> I get  403 Error code response.
>>
>> Please see the screenshot attached.
>>
>> Regards
>> Shib
>>
>>
>>
>> On Sat, Jun 9, 2018 at 2:15 PM, Harsha Kumara  wrote:
>>
>>>
>>>
>>> On Sat, Jun 9, 2018 at 1:48 PM shibsankar  wrote:
>>>
>>>> Okay.  I did a testing using that in Postman.
>>>>
>>>> I got a Management console response from Gateway.
>>>>
>>>> I did not receive API response.
>>>>
>>>> Please see the screenshot attached.
>>>>
>>> You have to use port 8243 instead of 9443. Deployed APIs are exposed via
>>> 8243 - HTTPs and 8280 HTTP ports respectively.
>>>
>>>>
>>>>
>>>> Regards
>>>> Shib
>>>>
>>>>
>>>>
>>>> On Sat, Jun 9, 2018 at 1:29 PM, Harsha Kumara  wrote:
>>>>
>>>>> Key  = Authorization
>>>>> Value = Bearer 
>>>>>
>>>>>
>>>>> On Sat, Jun 9, 2018 at 1:25 PM shibsankar  wrote:
>>>>>
>>>>>> I may not be using swagger console at all to invoke API Gateway
>>>>>> service finally. Practically in real application, I'll be using Angular 
>>>>>> JS
>>>>>> front-end deployed in a http server which will do the invocation to  
>>>>>> that  *publicly exposed
>>>>>> gateway URL*.
>>>>>>
>>>>>>
>>>>>> Anyway, forget swagger console now. Let me use *Postman* to test
>>>>>> this publicly exposed gateway URL. Whats the header *key* to use for
>>>>>> Authorization token?
>>>>>>
>>>>>> Screenshot attached.
>>>>>>
>>>>>> Regards
>>>>>> Shib
>>>>>>
>>>>>>
>>>>>> On Sat, Jun 9, 2018 at 12:56 PM, Harsha Kumara 
>>>>>> wrote:
>>>>>>
>>>>>>> Hi shibshankar,
>>>>>>>
>>>>>>> The IP that used in the swagger console can be edited from
>>>>>>> api-manager.xml. Please change the URLs highlighted in red.
>>>>>>>
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> Production and Sandbox
>>>>>>> This is a hybrid gateway that handles
>>>>>>> both production and sandbox token traffic.
>>>>>>> 
>>>>>>> https://localhost:$
>>>>>>> {mgt.transport.https.port}${carbon.context}services/
>>>>>>>
>>>>>>> ${admin.username}
>>>>>>> 
>>>>>>> ${admin.password}
>>>>>>> 
>>>>>>> http://${
>>>>>>> carbon.local.ip}:${http.nio.port},https://${carbon.local.
>>>>>>> ip}:${https.nio.port}
>>>>>>> 
>>>>>>>
>>>>>>> Also if you select HTTP only, you won't be able to invoke it through
>>>>>>> the sagger console as you are browsing the web console using https. The
>>>>>>> browser won't allow you to invoke HTTP from https loaded console. You 
>>>>>>> will
>>>>>>> see this because swagger console will use your browser URL in absence of
>>>>>>> HTTPs expose endpoint.
>>>>>>>
>>>>>>> On Sat, Jun 9, 2018 at 12:49 PM shibsankar  wrote:
>>>>>>>
>>>>>>>> Hi
>>>>>>>>
>>>>>>>> When I  publish my API through   *WSO2 Publishing > New API Design
>>>>>>>> > Manage > Configuration > Transport*: *HTTPS , HTTP* (*both
>>>>>>>> selected*) and do the API Console testing from WSO2 store , I see
>>>>>>>> request goes through WSO2 server *private IP **address*  and I
>>>>>>>> get  response from backend API. (screenshot attached).  This works 
>>>>>>>> okay.
>>>>>>>>
>>>>>>>>
>>>>>>>> However,
>>>>>>>>
>>>>>>>>  When  I  publish my API  through *WSO2 Publishing > New API
>>>>>>>> Design > Manage > Configuration > Transport*: * HTTP* (only http 
>>>>>>>> selected)
>>>>>>>> and do the API Console testing from WSO2 store, I see request goes 
>>>>>>>> through
>>>>>>>> WSO2 server's *public IP **address* and in this case I  *don't* receive
>>>>>>>> valid  response from backend API. (screenshot attached)
>>>>>>>>
>>>>>>>> why is this ? What to fix so that I can get API  response also
>>>>>>>> through WSO2 server public  IP address?
>>>>>>>>
>>>>>>>> Regards
>>>>>>>> Shib
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Harsha Kumara
>>>>>>> Associate Technical Lead, WSO2 Inc.
>>>>>>> Mobile: +94775505618
>>>>>>> Blog:harshcreationz.blogspot.com
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>> --
>>>>> Harsha Kumara
>>>>> Associate Technical Lead, WSO2 Inc.
>>>>> Mobile: +94775505618
>>>>> Blog:harshcreationz.blogspot.com
>>>>>
>>>>
>>>>
>>>
>>> --
>>> Harsha Kumara
>>> Associate Technical Lead, WSO2 Inc.
>>> Mobile: +94775505618
>>> Blog:harshcreationz.blogspot.com
>>>
>>
>>
>
> --
> Harsha Kumara
> Associate Technical Lead, WSO2 Inc.
> Mobile: +94775505618
> Blog:harshcreationz.blogspot.com
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] WSO2 Server Public IP

2018-06-09 Thread shibsankar
Okay.  Tested with 8243 port.

I get  403 Error code response.

Please see the screenshot attached.

Regards
Shib



On Sat, Jun 9, 2018 at 2:15 PM, Harsha Kumara  wrote:

>
>
> On Sat, Jun 9, 2018 at 1:48 PM shibsankar  wrote:
>
>> Okay.  I did a testing using that in Postman.
>>
>> I got a Management console response from Gateway.
>>
>> I did not receive API response.
>>
>> Please see the screenshot attached.
>>
> You have to use port 8243 instead of 9443. Deployed APIs are exposed via
> 8243 - HTTPs and 8280 HTTP ports respectively.
>
>>
>>
>> Regards
>> Shib
>>
>>
>>
>> On Sat, Jun 9, 2018 at 1:29 PM, Harsha Kumara  wrote:
>>
>>> Key  = Authorization
>>> Value = Bearer 
>>>
>>>
>>> On Sat, Jun 9, 2018 at 1:25 PM shibsankar  wrote:
>>>
>>>> I may not be using swagger console at all to invoke API Gateway service
>>>> finally. Practically in real application, I'll be using Angular JS
>>>> front-end deployed in a http server which will do the invocation to  that  
>>>> *publicly exposed
>>>> gateway URL*.
>>>>
>>>>
>>>> Anyway, forget swagger console now. Let me use *Postman* to test this 
>>>> publicly exposed
>>>> gateway URL. Whats the header *key* to use for Authorization token?
>>>>
>>>> Screenshot attached.
>>>>
>>>> Regards
>>>> Shib
>>>>
>>>>
>>>> On Sat, Jun 9, 2018 at 12:56 PM, Harsha Kumara 
>>>> wrote:
>>>>
>>>>> Hi shibshankar,
>>>>>
>>>>> The IP that used in the swagger console can be edited from
>>>>> api-manager.xml. Please change the URLs highlighted in red.
>>>>>
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> Production and Sandbox
>>>>> This is a hybrid gateway that handles
>>>>> both production and sandbox token traffic.
>>>>> 
>>>>> https://localhost:$
>>>>> {mgt.transport.https.port}${carbon.context}services/
>>>>>    
>>>>> ${admin.username}
>>>>> 
>>>>> ${admin.password}
>>>>> 
>>>>> http://${carbon.local.ip}:${http.nio.
>>>>> port},https://${carbon.local.ip}:${https.nio.port}
>>>>> 
>>>>>
>>>>> Also if you select HTTP only, you won't be able to invoke it through
>>>>> the sagger console as you are browsing the web console using https. The
>>>>> browser won't allow you to invoke HTTP from https loaded console. You will
>>>>> see this because swagger console will use your browser URL in absence of
>>>>> HTTPs expose endpoint.
>>>>>
>>>>> On Sat, Jun 9, 2018 at 12:49 PM shibsankar  wrote:
>>>>>
>>>>>> Hi
>>>>>>
>>>>>> When I  publish my API through   *WSO2 Publishing > New API Design >
>>>>>> Manage > Configuration > Transport*: *HTTPS , HTTP* (*both selected*)
>>>>>> and do the API Console testing from WSO2 store , I see request goes 
>>>>>> through
>>>>>> WSO2 server *private IP **address*  and I  get  response from
>>>>>> backend API. (screenshot attached).  This works okay.
>>>>>>
>>>>>>
>>>>>> However,
>>>>>>
>>>>>>  When  I  publish my API  through *WSO2 Publishing > New API Design
>>>>>> > Manage > Configuration > Transport*: * HTTP* (only http selected)
>>>>>> and do the API Console testing from WSO2 store, I see request goes 
>>>>>> through
>>>>>> WSO2 server's *public IP **address* and in this case I  *don't* receive
>>>>>> valid  response from backend API. (screenshot attached)
>>>>>>
>>>>>> why is this ? What to fix so that I can get API  response also
>>>>>> through WSO2 server public  IP address?
>>>>>>
>>>>>> Regards
>>>>>> Shib
>>>>>>
>>>>>>
>>>>>
>>>>> --
>>>>> Harsha Kumara
>>>>> Associate Technical Lead, WSO2 Inc.
>>>>> Mobile: +94775505618
>>>>> Blog:harshcreationz.blogspot.com
>>>>>
>>>>
>>>>
>>>
>>> --
>>> Harsha Kumara
>>> Associate Technical Lead, WSO2 Inc.
>>> Mobile: +94775505618
>>> Blog:harshcreationz.blogspot.com
>>>
>>
>>
>
> --
> Harsha Kumara
> Associate Technical Lead, WSO2 Inc.
> Mobile: +94775505618
> Blog:harshcreationz.blogspot.com
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] WSO2 Server Public IP

2018-06-09 Thread shibsankar
I may not be using swagger console at all to invoke API Gateway service
finally. Practically in real application, I'll be using Angular JS
front-end deployed in a http server which will do the invocation to
that  *publicly exposed
gateway URL*.


Anyway, forget swagger console now. Let me use *Postman* to test this
publicly exposed
gateway URL. Whats the header *key* to use for Authorization token?

Screenshot attached.

Regards
Shib


On Sat, Jun 9, 2018 at 12:56 PM, Harsha Kumara  wrote:

> Hi shibshankar,
>
> The IP that used in the swagger console can be edited from
> api-manager.xml. Please change the URLs highlighted in red.
>
> 
> 
> 
> 
> Production and Sandbox
> This is a hybrid gateway that handles both
> production and sandbox token traffic.
> 
> https://localhost:${mgt.transport.https.port}${
> carbon.context}services/
>
> ${admin.username}
> 
> ${admin.password}
> 
> http://${carbon.local.ip}:${http.nio.
> port},https://${carbon.local.ip}:${https.nio.port}
> 
>
> Also if you select HTTP only, you won't be able to invoke it through the
> sagger console as you are browsing the web console using https. The browser
> won't allow you to invoke HTTP from https loaded console. You will see this
> because swagger console will use your browser URL in absence of
> HTTPs expose endpoint.
>
> On Sat, Jun 9, 2018 at 12:49 PM shibsankar  wrote:
>
>> Hi
>>
>> When I  publish my API through   *WSO2 Publishing > New API Design >
>> Manage > Configuration > Transport*: *HTTPS , HTTP* (*both selected*)
>> and do the API Console testing from WSO2 store , I see request goes through
>> WSO2 server *private IP **address*  and I  get  response from
>> backend API. (screenshot attached).  This works okay.
>>
>>
>> However,
>>
>>  When  I  publish my API  through *WSO2 Publishing > New API Design >
>> Manage > Configuration > Transport*: * HTTP* (only http selected)  and
>> do the API Console testing from WSO2 store, I see request goes through WSO2
>> server's *public IP **address* and in this case I  *don't* receive
>> valid  response from backend API. (screenshot attached)
>>
>> why is this ? What to fix so that I can get API  response also
>> through WSO2 server public  IP address?
>>
>> Regards
>> Shib
>>
>>
>
> --
> Harsha Kumara
> Associate Technical Lead, WSO2 Inc.
> Mobile: +94775505618
> Blog:harshcreationz.blogspot.com
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] WSO2 Server Public IP

2018-06-09 Thread shibsankar
Hi

When I  publish my API through   *WSO2 Publishing > New API Design > Manage
> Configuration > Transport*: *HTTPS , HTTP* (*both selected*) and do the
API Console testing from WSO2 store , I see request goes through WSO2
server *private IP **address*  and I  get  response from backend API.
(screenshot attached).  This works okay.


However,

 When  I  publish my API  through *WSO2 Publishing > New API Design >
Manage > Configuration > Transport*: * HTTP* (only http selected)  and do
the API Console testing from WSO2 store, I see request goes through WSO2
server's *public IP **address* and in this case I  *don't* receive valid
response from backend API. (screenshot attached)

why is this ? What to fix so that I can get API  response also through WSO2
server public  IP address?

Regards
Shib
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Duplicate Context Value

2018-06-08 Thread shibsankar
Its now resolved.

I did this.

DELETE FROM AM_API_LC_EVENT WHERE API_ID = 7 ;

DELETE FROM AM_API_LC_EVENT WHERE API_ID = 12 ;

SELECT * FROM AM_API_LC_EVENT  // No records now

DELETE FROM AM_API

issue resolved.

Thanks
Shib

On Fri, Jun 8, 2018 at 5:26 PM, shibsankar  wrote:

> It did not delete records.
>
> First I executed delete and then run a select query to verify if those are
> deleted properly.
>
> I see records did not delete.
>
> Please see the screenshot.
>
> Regards
> Shib
>
> On Fri, Jun 8, 2018 at 4:59 PM, Dinusha Dissanayake 
> wrote:
>
>> Hi Shib,
>>
>> Yes. If it doesn't allow you to delete just in case because this API_ID
>> is a foreign key of AM_API_LC_EVENT table, you have to first delete the
>> records in AM_API_LC_EVENT table with those API_IDs and then try deleting
>> entries from AM_API tables.
>>
>> Below are the queries.
>>
>> DELETE FROM AM_API_LC_EVENT WHERE API_ID = 7 AND API_ID = 12;
>> DELETE FROM AM_API WHERE API_ID=7 AND API_ID =12;
>>
>> Regards
>> DinushaD
>>
>> On Fri, Jun 8, 2018 at 4:50 PM, shibsankar  wrote:
>>
>>> Yup.  I  can see the AM_DB  now.
>>>
>>> Please see screenshot attached.
>>>
>>> I believe I should delete these records now.  This should  resolve
>>> duplicate context value issue . right ?
>>>
>>> DELETE FROM AM_API
>>> WHERE API_ID=7 AND API_ID=12;
>>>
>>> Is this  okay ?
>>>
>>> Regards
>>> Shib
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> On Fri, Jun 8, 2018 at 4:36 PM, Dinusha Dissanayake 
>>> wrote:
>>>
>>>> Could you please logout from h2 console and try with
>>>> *jdbc:h2:repository/database/WSO2AM_DB;DB_CLOSE_ON_EXIT=FALSE* as JDBC
>>>> URL.
>>>> Then you'd be able to see the tabls in the AM_DB.
>>>>
>>>> Regards,
>>>> DinushaD
>>>>
>>>> On Fri, Jun 8, 2018 at 4:33 PM, shibsankar  wrote:
>>>>
>>>>> Okay.  Now I have connected  H2 database through Web UI.
>>>>>
>>>>> But I  don't see   AM_DB  , AM_API table  there to verify
>>>>> CONTEXT_TEMPLATE as per earlier replies.
>>>>>
>>>>> How to find that ?
>>>>>
>>>>> Please see the screenshot attached.
>>>>>
>>>>>
>>>>> Regards
>>>>> Shib
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> On Fri, Jun 8, 2018 at 2:49 PM, Dinusha Dissanayake >>>> > wrote:
>>>>>
>>>>>> Hi Shib,
>>>>>>
>>>>>> Yes. By default it is using embedded H2 database even though it is
>>>>>> commented in carbon.xml.
>>>>>> To browse though the database, please follow the instructions given
>>>>>> in above provided document.[1]
>>>>>> [1]  https://docs.wso2.com/display/ADMIN44x/Browsing+the+H2+Database.
>>>>>>
>>>>>> Thanks,
>>>>>> DinushaD
>>>>>>
>>>>>> On Fri, Jun 8, 2018 at 2:43 PM, shibsankar  wrote:
>>>>>>
>>>>>>> I'm using default installation.  I see   is
>>>>>>> *commented* in my WSO2/repository/conf/carbon.xml.  Does it mean
>>>>>>> its using embedded H2 DB?
>>>>>>>
>>>>>>> carbon.xml attached.
>>>>>>>
>>>>>>> Regards
>>>>>>> Shib
>>>>>>>
>>>>>>> On Fri, Jun 8, 2018 at 2:13 PM, Nirothipan Mehalingam <
>>>>>>> nirothi...@wso2.com> wrote:
>>>>>>>
>>>>>>>> Hi Shib,
>>>>>>>>
>>>>>>>> If you are using embedded H2 DB you may follow
>>>>>>>> https://docs.wso2.com/display/ADMIN44x/Browsing+the+H2+Database.
>>>>>>>>
>>>>>>>> Thanks
>>>>>>>> Nirothipan
>>>>>>>>
>>>>>>>> On Fri, Jun 8, 2018 at 2:09 PM, shibsankar 
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>>> How do I connect to this DB and view the rows of the mentioned
>>>>>>>>> table?   Can it be viewed from API management web-UI?
>>>>>&g

Re: [Dev] Duplicate Context Value

2018-06-08 Thread shibsankar
I'm using default installation.  I see   is
*commented* in my WSO2/repository/conf/carbon.xml.  Does it mean its using
embedded H2 DB?

carbon.xml attached.

Regards
Shib

On Fri, Jun 8, 2018 at 2:13 PM, Nirothipan Mehalingam 
wrote:

> Hi Shib,
>
> If you are using embedded H2 DB you may follow https://docs.wso2.com/
> display/ADMIN44x/Browsing+the+H2+Database.
>
> Thanks
> Nirothipan
>
> On Fri, Jun 8, 2018 at 2:09 PM, shibsankar  wrote:
>
>> How do I connect to this DB and view the rows of the mentioned table?
>>  Can it be viewed from API management web-UI?
>>
>> Regards
>> Shib
>>
>> On Fri, Jun 8, 2018 at 1:50 PM, Dinusha Dissanayake 
>> wrote:
>>
>>> Hi Shib,
>>>
>>> Probably there should be an database entry of the same "context" you are
>>> defining here. As above replies explain, this could be due to partially
>>> deleted APIs.
>>> Could you please check AM_API table in AM_DB and see whether there is a
>>> CONTEXT_TEMPLATE with the same context you are trying to define here?
>>>
>>> Thanks,
>>> DinushaD.
>>>
>>>
>>> On Fri, Jun 8, 2018 at 12:50 PM, shibsankar  wrote:
>>>
>>>> There is no API  in publisher application.
>>>>
>>>> I'm still getting * Duplicate Context Value *when trying to add a new
>>>> API  in Design page.
>>>>
>>>> Please see the screenshot attached.
>>>>
>>>> Regards
>>>> Shib
>>>>
>>>>
>>>> On Fri, Jun 8, 2018 at 10:51 AM, Dushani Wellappili 
>>>> wrote:
>>>>
>>>>> Hi Shib,
>>>>>
>>>>> If you have deleted the API from the management console, then it is
>>>>> likely you are getting this issue since deleting api in the
>>>>> management console does not delete the whole api. It removes the data in
>>>>> the registry (meta data). To delete api use publisher application.
>>>>>
>>>>> Thank you.
>>>>>
>>>>> Regards,
>>>>>
>>>>> *Dushani Wellappili*
>>>>> Software Engineer - WSO2
>>>>>
>>>>> Email : dusha...@wso2.com
>>>>> Mobile : +94779367571
>>>>> Web : https://wso2.com/
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> On Fri, Jun 8, 2018 at 10:01 AM Krishan Wijesena 
>>>>> wrote:
>>>>>
>>>>>>
>>>>>>
>>>>>> On Thu, Jun 7, 2018 at 6:50 PM, shibsankar  wrote:
>>>>>>
>>>>>>> Hi,
>>>>>>> I have *deleted *published API, subscribed API  from WSO2. Now
>>>>>>> there is no more API  in WSO2.
>>>>>>> You cannot delete API if active subscriptions exists, which apporach
>>>>>>> did you used to delete the API?
>>>>>>>
>>>>>> because basically this error occur if previous API have same
>>>>>> context value and it's partally deleted.
>>>>>>
>>>>>>>
>>>>>>> Restarted the WSO2 server.
>>>>>>>
>>>>>>>
>>>>>>> Now when I  try to add a New API ,  I'm still getting *Duplicate
>>>>>>> context value *in API  design page.
>>>>>>>
>>>>>>> Why is this happening? How to fix this?
>>>>>>>
>>>>>>> Please see the screenshot attached.
>>>>>>>
>>>>>>> WSo2 version is 2.1
>>>>>>>
>>>>>>> Regards
>>>>>>> Shib
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> ___
>>>>>>> Dev mailing list
>>>>>>> Dev@wso2.org
>>>>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>>
>>>>>> *Krishan Wijesena*
>>>>>> Software Engineer | WSO2
>>>>>>
>>>>>> Email : krish...@wso2.com
>>>>>> Mobile : +94776219923
>>>>>> WSO2 Inc : http://wso2.com
>>>>>&g

Re: [Dev] Duplicate Context Value

2018-06-08 Thread shibsankar
How do I connect to this DB and view the rows of the mentioned table?   Can
it be viewed from API management web-UI?

Regards
Shib

On Fri, Jun 8, 2018 at 1:50 PM, Dinusha Dissanayake 
wrote:

> Hi Shib,
>
> Probably there should be an database entry of the same "context" you are
> defining here. As above replies explain, this could be due to partially
> deleted APIs.
> Could you please check AM_API table in AM_DB and see whether there is a
> CONTEXT_TEMPLATE with the same context you are trying to define here?
>
> Thanks,
> DinushaD.
>
>
> On Fri, Jun 8, 2018 at 12:50 PM, shibsankar  wrote:
>
>> There is no API  in publisher application.
>>
>> I'm still getting * Duplicate Context Value *when trying to add a new
>> API  in Design page.
>>
>> Please see the screenshot attached.
>>
>> Regards
>> Shib
>>
>>
>> On Fri, Jun 8, 2018 at 10:51 AM, Dushani Wellappili 
>> wrote:
>>
>>> Hi Shib,
>>>
>>> If you have deleted the API from the management console, then it is
>>> likely you are getting this issue since deleting api in the management
>>> console does not delete the whole api. It removes the data in the registry
>>> (meta data). To delete api use publisher application.
>>>
>>> Thank you.
>>>
>>> Regards,
>>>
>>> *Dushani Wellappili*
>>> Software Engineer - WSO2
>>>
>>> Email : dusha...@wso2.com
>>> Mobile : +94779367571
>>> Web : https://wso2.com/
>>>
>>>
>>>
>>>
>>> On Fri, Jun 8, 2018 at 10:01 AM Krishan Wijesena 
>>> wrote:
>>>
>>>>
>>>>
>>>> On Thu, Jun 7, 2018 at 6:50 PM, shibsankar  wrote:
>>>>
>>>>> Hi,
>>>>> I have *deleted *published API, subscribed API  from WSO2. Now there
>>>>> is no more API  in WSO2.
>>>>> You cannot delete API if active subscriptions exists, which apporach
>>>>> did you used to delete the API?
>>>>>
>>>> because basically this error occur if previous API have same
>>>> context value and it's partally deleted.
>>>>
>>>>>
>>>>> Restarted the WSO2 server.
>>>>>
>>>>>
>>>>> Now when I  try to add a New API ,  I'm still getting *Duplicate
>>>>> context value *in API  design page.
>>>>>
>>>>> Why is this happening? How to fix this?
>>>>>
>>>>> Please see the screenshot attached.
>>>>>
>>>>> WSo2 version is 2.1
>>>>>
>>>>> Regards
>>>>> Shib
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> ___
>>>>> Dev mailing list
>>>>> Dev@wso2.org
>>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>>
>>>> *Krishan Wijesena*
>>>> Software Engineer | WSO2
>>>>
>>>> Email : krish...@wso2.com
>>>> Mobile : +94776219923
>>>> WSO2 Inc : http://wso2.com
>>>> [image: http://wso2.com/signature] <http://wso2.com/signature>
>>>> ___
>>>> Dev mailing list
>>>> Dev@wso2.org
>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>>
>>>
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Dinusha Dissanayake
> Software Engineer
> WSO2 Inc
> Mobile: +94712939439
> <https://wso2.com/signature>
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Duplicate Context Value

2018-06-08 Thread shibsankar
There is no API  in publisher application.

I'm still getting * Duplicate Context Value *when trying to add a new API
in Design page.

Please see the screenshot attached.

Regards
Shib


On Fri, Jun 8, 2018 at 10:51 AM, Dushani Wellappili 
wrote:

> Hi Shib,
>
> If you have deleted the API from the management console, then it is likely
> you are getting this issue since deleting api in the management console
> does not delete the whole api. It removes the data in the registry (meta
> data). To delete api use publisher application.
>
> Thank you.
>
> Regards,
>
> *Dushani Wellappili*
> Software Engineer - WSO2
>
> Email : dusha...@wso2.com
> Mobile : +94779367571
> Web : https://wso2.com/
>
>
>
>
> On Fri, Jun 8, 2018 at 10:01 AM Krishan Wijesena 
> wrote:
>
>>
>>
>> On Thu, Jun 7, 2018 at 6:50 PM, shibsankar  wrote:
>>
>>> Hi,
>>> I have *deleted *published API, subscribed API  from WSO2. Now there is
>>> no more API  in WSO2.
>>> You cannot delete API if active subscriptions exists, which apporach did
>>> you used to delete the API?
>>>
>> because basically this error occur if previous API have same context
>> value and it's partally deleted.
>>
>>>
>>> Restarted the WSO2 server.
>>>
>>>
>>> Now when I  try to add a New API ,  I'm still getting *Duplicate
>>> context value *in API  design page.
>>>
>>> Why is this happening? How to fix this?
>>>
>>> Please see the screenshot attached.
>>>
>>> WSo2 version is 2.1
>>>
>>> Regards
>>> Shib
>>>
>>>
>>>
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>>
>> *Krishan Wijesena*
>> Software Engineer | WSO2
>>
>> Email : krish...@wso2.com
>> Mobile : +94776219923
>> WSO2 Inc : http://wso2.com
>> [image: http://wso2.com/signature] <http://wso2.com/signature>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Duplicate Context Value

2018-06-07 Thread shibsankar
Is there any solution to this?

Regards
Shib

On Thu, Jun 7, 2018 at 6:50 PM, shibsankar  wrote:

> Hi,
> I have *deleted *published API, subscribed API  from WSO2. Now there is
> no more API  in WSO2.
>
>
> Restarted the WSO2 server.
>
>
> Now when I  try to add a New API ,  I'm still getting *Duplicate context
> value *in API  design page.
>
> Why is this happening? How to fix this?
>
> Please see the screenshot attached.
>
> WSo2 version is 2.1
>
> Regards
> Shib
>
>
>
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Duplicate Context Value

2018-06-07 Thread shibsankar
Hi,
I have *deleted *published API, subscribed API  from WSO2. Now there is no
more API  in WSO2.


Restarted the WSO2 server.


Now when I  try to add a New API ,  I'm still getting *Duplicate context
value *in API  design page.

Why is this happening? How to fix this?

Please see the screenshot attached.

WSo2 version is 2.1

Regards
Shib
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] WSO2 Publish & Subscribe

2018-06-06 Thread shibsankar
when I  do a *Try Now *testing in API Console of WSO2 Store, I do not
receive a valid response.  Please see the *Try Now *screenshot attached.


Regarding Log:  I was looking at the *wso2carbon.log*  at the same time
when I was trying out API invocation in WSO2 store.

There is no log printed in *wso2carbon.log*  for this activity.

Why there is no valid response?

Regards
Shib



On Wed, Jun 6, 2018 at 6:07 PM, Dinusha Dissanayake 
wrote:

> Hi Shib,
>
> When you are creating the API you are using the actual backend URL of the
> service as the production endpoint of the API.
> But when you are using API Manager, you actual backend is getting proxy
> and the service is exposed via APIM gateway with  security and throttling
> facilities for the API.
> Hence now the service is exposed via the APIM gateway.
> That is why you see two different URLs in publisher and store production
> endpoints.
>
> (http://{host}:8280 and https://{host}:8243 are gateway urls.)
>
> Since you are unable to obtain a response, there seems to be an issue.
> Could you please send us the error log in the server when invoking the
> API. That would help us to narrow down the issue.
>
> Thanks,
> DinushaD.
>
>
> On Wed, Jun 6, 2018 at 5:43 PM, shibsankar  wrote:
>
>> Hi,
>>
>> *My Objective: *
>>
>> I  have published a service in WSO2 Publish.  Now I  am trying to test
>> this service from WSO2 Store API console.
>>
>> *Issue : * API console in WSO2 Store not returning result when invoking
>> service.
>>
>>
>> *Troubleshooting :*
>>
>> To my surprise, when I view the published service from WSO2 store, I  see
>> different production URL of the service than what is in Publishing.  What
>> has gone wrong ?
>>
>>
>> For your convenience,  I'm attaching a screenshot of Publish and Store.
>> Could you please help to fix this issue.
>>
>>
>> Regards
>> Shib
>>
>>
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Dinusha Dissanayake
> Software Engineer
> WSO2 Inc
> Mobile: +94712939439
> <https://wso2.com/signature>
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] WSO2 Publish & Subscribe

2018-06-06 Thread shibsankar
Hi,

*My Objective: *

I  have published a service in WSO2 Publish.  Now I  am trying to test this
service from WSO2 Store API console.

*Issue : * API console in WSO2 Store not returning result when invoking
service.


*Troubleshooting :*

To my surprise, when I view the published service from WSO2 store, I  see
different production URL of the service than what is in Publishing.  What
has gone wrong ?


For your convenience,  I'm attaching a screenshot of Publish and Store.
Could you please help to fix this issue.


Regards
Shib
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev