Re: [Dev] [IS 6.0.0][M5] Ensuring Proper Internationalization of UIs in Portal Apps

2017-03-23 Thread SajithAR Ariyarathna
@Manu, Is there a way to accomplish this through automated test?

On Fri, Mar 24, 2017 at 8:06 AM, Nuwandi Wickramasinghe 
wrote:

> AFAIK we need to manually check them. Also there are situations UI
> messages and UI itself is created in JS files (front end or back end). Need
> to validate them as well. As discussed in [1] uuf doesn't have a direct
> mechanism to do this in front end JS. Therefore better to avoid creating UI
> messages there.
>
> [1] [Dev] How can we add multi language support in javascript files
>
> On Thu, Mar 23, 2017 at 10:05 PM, Pushpalanka Jayawardhana  > wrote:
>
>> Hi All,
>>
>> Do we have any automated mechanism to check the UIs for proper
>> internationalization support ?
>> Or do we have to make sure of this manually and validate at code reviews?
>>
>> Thanks,
>> --
>> Pushpalanka Jayawardhana, B.Sc.Eng.(Hons).
>> Senior Software Engineer, WSO2 Lanka (pvt) Ltd;  wso2.com/
>> Mobile: +94779716248
>> Blog: pushpalankajaya.blogspot.com/ | LinkedIn: lk.linkedin.com/in/p
>> ushpalanka/ | Twitter: @pushpalanka
>>
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
>
> Best Regards,
>
> Nuwandi Wickramasinghe
>
> Software Engineer
>
> WSO2 Inc.
>
> Web : http://wso2.com
>
> Mobile : 0719214873
>



-- 
Sajith Janaprasad Ariyarathna
Software Engineer; WSO2, Inc.;  http://wso2.com/

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


Re: [Dev] [IS] Post Authentication Redirection

2017-03-23 Thread Danushka Fernando
Hi Nuwandi
Its not saml. I am using Oauth auth code flow grant type here.

Thanks & Regards
Danushka Fernando
Senior Software Engineer
WSO2 inc. http://wso2.com/
Mobile : +94716332729

On Fri, Mar 24, 2017 at 10:56 AM, Nuwandi Wickramasinghe 
wrote:

> Hi,
>
> Can you provide a SSO trace for the flow?
>
> Thanks
> Nuwandi
>
> On Fri, Mar 24, 2017 at 10:44 AM, Danushka Fernando 
> wrote:
>
>> Hi All
>> I wrote a postAuthenticationHandler to handle custom password expiry
>> requirement. It redirects to following endpoint when handling request. But
>> this redirect go back to authorize endpoint in the middle and getting
>> crashed. But if I redirect to the endpoint manually it will work as
>> expected. Any idea whats going wrong here.
>>
>> [1] /authenticationendpoint/password_expiry.do?passwordexpir
>> yremainingtimeinmillis=252811377=
>> true=5538f5b1-2a50-43c8-a380-b2a3a90c7d27
>>
>> Thanks & Regards
>> Danushka Fernando
>> Senior Software Engineer
>> WSO2 inc. http://wso2.com/
>> Mobile : +94716332729 <+94%2071%20633%202729>
>>
>
>
>
> --
>
> Best Regards,
>
> Nuwandi Wickramasinghe
>
> Software Engineer
>
> WSO2 Inc.
>
> Web : http://wso2.com
>
> Mobile : 0719214873
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [IS 6.0.0] Making native claim dialect configurable

2017-03-23 Thread Prabath Siriwardena
On Thu, Mar 23, 2017 at 10:21 PM, Pushpalanka Jayawardhana 
wrote:

>
>
> On Fri, Mar 24, 2017 at 10:14 AM, Prabath Siriwardena 
> wrote:
>
>> Well... I doubt we should make it configurable... Its the claim dialect
>> for the WSO2 products (or IS)... In any federation scenario - we do support
>> claim mappings for custom dialects...
>>
> One advantage Omindu highlighted in this thread, is avoiding this claim
> transformation.
> If we imagine a bank using IS 6.0.0, which wants to issue claims as '
> http://xyzbank.com/' to all it's service providers(which can be 100s in
> number), it is convenient, if the default dialect itself can be configured
> to http://xyzbank.com. This avoid configuration overhead for 100 service
> providers and the claim transformation effort.
>

This is a valid use case - but to address that you do not need to make the
default dialect configurable. You define your own custom dialect - and
define the requested claims for all the SPs in that dialect...

Thanks & regards,
-Prabath


>
> So this is a trade off between the convenience and performance of few
> cases against the design and coding complexities.
> +1 to keep the design simple, given that the advantage of supporting this
> will be only at few special cases.
>
>
>> Thanks & regards,
>> -Prabath
>>
>> On Thu, Mar 23, 2017 at 9:14 PM, Pushpalanka Jayawardhana > > wrote:
>>
>>>
>>>
>>> On Fri, Mar 24, 2017 at 9:18 AM, Sagara Gunathunga 
>>> wrote:
>>>


 On Thu, Mar 23, 2017 at 12:27 PM, Pushpalanka Jayawardhana <
 la...@wso2.com> wrote:

>
>
> On Tue, Mar 21, 2017 at 10:56 AM, Godwin Shrimal 
> wrote:
>
>> If we make native claim dialect configurable, will product work by
>> changing to different claim dialect ?
>>
> That should be the expectation if we make the native claim dialect
> configurable.
>
> As of now, we have the native dialect hard coded as at [1]. If make it
> configurable, it should come from a configuration file, most suitably
> 'domain-config.yaml' file.
> Appreciate your inputs soon to move forward, as lot of codes and
> designs will be affected by this decision.
>

 Some users may not want to use/return claims with WSO2 prefix (
 http://wso2.org/claims) instead they want to use their own prefix (
 http://mycompany.com/attributes) so better to make the prefix of
 default claim dialect configurable.

 ATM we have hard coded this value and what we should do is provide a
 ability to override this prefix value per server basis through
 deployment.yaml, I don't see any reason to related this configuration with
 domains.

>>> ATM domain-config.yaml file defines the default claims implicitly as at
>>> [1].
>>> So are we suggesting to put this prefix configuration at deployment.yaml
>>> file and configure this 'domain-config.yaml' file with same dialect prefix
>>> in claim URI?
>>>
>>> [1] - https://github.com/wso2/carbon-identity-mgt/blob/master/test
>>> s/osgi-tests/src/test/resources/carbon-home/conf/identity/
>>> domain-config.yaml
>>> 
>>>

 Thanks !

>
> [1] - https://github.com/wso2/carbon-identity-mgt/blob/master/co
> mponents/org.wso2.carbon.identity.mgt/src/main/java/org/wso2
> /carbon/identity/mgt/impl/util/IdentityMgtConstants.java#L44-L46
>
>>
>> Thanks
>> Godwin
>>
>>
>> On Mon, Mar 20, 2017 at 4:34 PM, Pushpalanka Jayawardhana <
>> la...@wso2.com> wrote:
>>
>>> +Prabath
>>>
>>> On Mon, Mar 20, 2017 at 4:33 PM, Pushpalanka Jayawardhana <
>>> la...@wso2.com> wrote:
>>>
 Hi All,

 Have we made a conclusion on this? Are we expecting to make the
 native dialect configurable?
 Given that we have claim mapping functionality this won't be a
 mandatory requirement. But this has the advantage Omindu mentioned 
 against
 the complexities introduced by letting this configurable for username,
 groupname etc.

 Thanks,

 On Thu, Feb 23, 2017 at 2:13 PM, Omindu Rathnaweera <
 omi...@wso2.com> wrote:

> One of the advantages would be that we can avoid the overhead of
> claim transformation.
>
> Regards,
> Omindu.
>
> On Thu, Feb 23, 2017 at 1:53 PM, Omindu Rathnaweera <
> omi...@wso2.com> wrote:
>
>> Do we need to make the native claim dialect configurable ? AFAIK
>> it is not configurable and we are using a hardcoded constant for the
>> dialect URI (http://wso2.org/claims).
>>
>>
>> Regards,
>> Omindu
>>
>> --
>> Omindu 

Re: [Dev] [carbondump] Updating carbondump.sh for Java 8

2017-03-23 Thread Isuru Perera
Hi Nira,

I also thought that. I think may be we can do the version check also. I'm
hoping to do a review on the script. Since we rarely use that script to
debug issues.

Thanks!

On Fri, Mar 24, 2017 at 10:51 AM, Niranjan Karunanandham 
wrote:

> Hi isuru,
>
> On Fri, Mar 24, 2017 at 10:38 AM, Isuru Perera  wrote:
>
>> Hi,
>>
>> It'll be useful to have those details. I think we can just update the
>> command to work in Java 8 for now. Connecting to the JVM to get these kinds
>> of stats will have an impact on the server, but it should be okay as we run
>> carbondump to debug the server.
>>
>> I think we must go through all commands in the carbondump and make sure
>> that all of those are still relevant for today. I can do that later.
>>
> Shouldn't we check if the server is running in Java 7 or Java 8 and then
> check accordingly?
>
>
>>
>> Thanks!
>>
>> Best Regards,
>>
>> On Thu, Mar 23, 2017 at 10:43 PM, Milinda Perera 
>> wrote:
>>
>>> Hi,
>>>
>>> In carbondump.sh [1] we retrieve  permgen stats in Java Heap (jmap
>>> -permstat $PID) . Since Java 8 onwards, it is replaced by Metaspace and
>>> permstat option is no longer exists in jmap tool.
>>>
>>> Metaspace can be retrieved by: jmap -clstats 
>>>
>>> Shall we remove permstat and replace with clstats or just remove
>>> retrieving permgen stats? Is  Is it useful retrieving permstat or clstats
>>> to figure out errors?
>>> Whether it may effect on the running server?
>>>
>>> [1] https://docs.wso2.com/display/ADMIN44x/Capturing+System+Data
>>> +in+Error+Situations
>>>
>>> Thanks,
>>> Milinda
>>>
>>> --
>>> Milinda Perera
>>> Senior Software Engineer;
>>> WSO2 Inc. http://wso2.com ,
>>> Mobile: (+94) 714 115 032 <071%20411%205032>
>>>
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> Isuru Perera
>> Associate Technical Lead | WSO2, Inc. | http://wso2.com/
>> Lean . Enterprise . Middleware
>>
>> about.me/chrishantha
>> Contact: +IsuruPereraWSO2 
>>
>
> Regards,
> Nira
>
> --
>
>
> *Niranjan Karunanandham*
> Associate Technical Lead - WSO2 Inc.
> WSO2 Inc.: http://www.wso2.com
>
>


-- 
Isuru Perera
Associate Technical Lead | WSO2, Inc. | http://wso2.com/
Lean . Enterprise . Middleware

about.me/chrishantha
Contact: +IsuruPereraWSO2 
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [IS] Post Authentication Redirection

2017-03-23 Thread Nuwandi Wickramasinghe
Hi,

Can you provide a SSO trace for the flow?

Thanks
Nuwandi

On Fri, Mar 24, 2017 at 10:44 AM, Danushka Fernando 
wrote:

> Hi All
> I wrote a postAuthenticationHandler to handle custom password expiry
> requirement. It redirects to following endpoint when handling request. But
> this redirect go back to authorize endpoint in the middle and getting
> crashed. But if I redirect to the endpoint manually it will work as
> expected. Any idea whats going wrong here.
>
> [1] /authenticationendpoint/password_expiry.do?
> passwordexpiryremainingtimeinmillis=252811377=true&
> sessionDataKey=5538f5b1-2a50-43c8-a380-b2a3a90c7d27
>
> Thanks & Regards
> Danushka Fernando
> Senior Software Engineer
> WSO2 inc. http://wso2.com/
> Mobile : +94716332729 <+94%2071%20633%202729>
>



-- 

Best Regards,

Nuwandi Wickramasinghe

Software Engineer

WSO2 Inc.

Web : http://wso2.com

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


Re: [Dev] [IS 6.0.0] Making native claim dialect configurable

2017-03-23 Thread Pushpalanka Jayawardhana
On Fri, Mar 24, 2017 at 10:14 AM, Prabath Siriwardena 
wrote:

> Well... I doubt we should make it configurable... Its the claim dialect
> for the WSO2 products (or IS)... In any federation scenario - we do support
> claim mappings for custom dialects...
>
One advantage Omindu highlighted in this thread, is avoiding this claim
transformation.
If we imagine a bank using IS 6.0.0, which wants to issue claims as '
http://xyzbank.com/' to all it's service providers(which can be 100s in
number), it is convenient, if the default dialect itself can be configured
to http://xyzbank.com. This avoid configuration overhead for 100 service
providers and the claim transformation effort.

So this is a trade off between the convenience and performance of few cases
against the design and coding complexities.
+1 to keep the design simple, given that the advantage of supporting this
will be only at few special cases.


> Thanks & regards,
> -Prabath
>
> On Thu, Mar 23, 2017 at 9:14 PM, Pushpalanka Jayawardhana 
> wrote:
>
>>
>>
>> On Fri, Mar 24, 2017 at 9:18 AM, Sagara Gunathunga 
>> wrote:
>>
>>>
>>>
>>> On Thu, Mar 23, 2017 at 12:27 PM, Pushpalanka Jayawardhana <
>>> la...@wso2.com> wrote:
>>>


 On Tue, Mar 21, 2017 at 10:56 AM, Godwin Shrimal 
 wrote:

> If we make native claim dialect configurable, will product work by
> changing to different claim dialect ?
>
 That should be the expectation if we make the native claim dialect
 configurable.

 As of now, we have the native dialect hard coded as at [1]. If make it
 configurable, it should come from a configuration file, most suitably
 'domain-config.yaml' file.
 Appreciate your inputs soon to move forward, as lot of codes and
 designs will be affected by this decision.

>>>
>>> Some users may not want to use/return claims with WSO2 prefix (
>>> http://wso2.org/claims) instead they want to use their own prefix (
>>> http://mycompany.com/attributes) so better to make the prefix of
>>> default claim dialect configurable.
>>>
>>> ATM we have hard coded this value and what we should do is provide a
>>> ability to override this prefix value per server basis through
>>> deployment.yaml, I don't see any reason to related this configuration with
>>> domains.
>>>
>> ATM domain-config.yaml file defines the default claims implicitly as at
>> [1].
>> So are we suggesting to put this prefix configuration at deployment.yaml
>> file and configure this 'domain-config.yaml' file with same dialect prefix
>> in claim URI?
>>
>> [1] - https://github.com/wso2/carbon-identity-mgt/blob/master/
>> tests/osgi-tests/src/test/resources/carbon-home/conf/
>> identity/domain-config.yaml
>> 
>>
>>>
>>> Thanks !
>>>

 [1] - https://github.com/wso2/carbon-identity-mgt/blob/master/co
 mponents/org.wso2.carbon.identity.mgt/src/main/java/org/wso2
 /carbon/identity/mgt/impl/util/IdentityMgtConstants.java#L44-L46

>
> Thanks
> Godwin
>
>
> On Mon, Mar 20, 2017 at 4:34 PM, Pushpalanka Jayawardhana <
> la...@wso2.com> wrote:
>
>> +Prabath
>>
>> On Mon, Mar 20, 2017 at 4:33 PM, Pushpalanka Jayawardhana <
>> la...@wso2.com> wrote:
>>
>>> Hi All,
>>>
>>> Have we made a conclusion on this? Are we expecting to make the
>>> native dialect configurable?
>>> Given that we have claim mapping functionality this won't be a
>>> mandatory requirement. But this has the advantage Omindu mentioned 
>>> against
>>> the complexities introduced by letting this configurable for username,
>>> groupname etc.
>>>
>>> Thanks,
>>>
>>> On Thu, Feb 23, 2017 at 2:13 PM, Omindu Rathnaweera >> > wrote:
>>>
 One of the advantages would be that we can avoid the overhead of
 claim transformation.

 Regards,
 Omindu.

 On Thu, Feb 23, 2017 at 1:53 PM, Omindu Rathnaweera <
 omi...@wso2.com> wrote:

> Do we need to make the native claim dialect configurable ? AFAIK
> it is not configurable and we are using a hardcoded constant for the
> dialect URI (http://wso2.org/claims).
>
>
> Regards,
> Omindu
>
> --
> Omindu Rathnaweera
> Software Engineer, WSO2 Inc.
> Mobile: +94 771 197 211 <+94%2077%20119%207211>
>



 --
 Omindu Rathnaweera
 Software Engineer, WSO2 Inc.
 Mobile: +94 771 197 211 <077%20119%207211>

>>>
>>>
>>>
>>> --
>>> Pushpalanka.
>>> --
>>> Pushpalanka Jayawardhana, B.Sc.Eng.(Hons).
>>> Senior Software Engineer, WSO2 Lanka (pvt) Ltd;  wso2.com/

Re: [Dev] [carbondump] Updating carbondump.sh for Java 8

2017-03-23 Thread Niranjan Karunanandham
Hi isuru,

On Fri, Mar 24, 2017 at 10:38 AM, Isuru Perera  wrote:

> Hi,
>
> It'll be useful to have those details. I think we can just update the
> command to work in Java 8 for now. Connecting to the JVM to get these kinds
> of stats will have an impact on the server, but it should be okay as we run
> carbondump to debug the server.
>
> I think we must go through all commands in the carbondump and make sure
> that all of those are still relevant for today. I can do that later.
>
Shouldn't we check if the server is running in Java 7 or Java 8 and then
check accordingly?


>
> Thanks!
>
> Best Regards,
>
> On Thu, Mar 23, 2017 at 10:43 PM, Milinda Perera 
> wrote:
>
>> Hi,
>>
>> In carbondump.sh [1] we retrieve  permgen stats in Java Heap (jmap
>> -permstat $PID) . Since Java 8 onwards, it is replaced by Metaspace and
>> permstat option is no longer exists in jmap tool.
>>
>> Metaspace can be retrieved by: jmap -clstats 
>>
>> Shall we remove permstat and replace with clstats or just remove
>> retrieving permgen stats? Is  Is it useful retrieving permstat or clstats
>> to figure out errors?
>> Whether it may effect on the running server?
>>
>> [1] https://docs.wso2.com/display/ADMIN44x/Capturing+System+Data
>> +in+Error+Situations
>>
>> Thanks,
>> Milinda
>>
>> --
>> Milinda Perera
>> Senior Software Engineer;
>> WSO2 Inc. http://wso2.com ,
>> Mobile: (+94) 714 115 032 <071%20411%205032>
>>
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Isuru Perera
> Associate Technical Lead | WSO2, Inc. | http://wso2.com/
> Lean . Enterprise . Middleware
>
> about.me/chrishantha
> Contact: +IsuruPereraWSO2 
>

Regards,
Nira

-- 


*Niranjan Karunanandham*
Associate Technical Lead - WSO2 Inc.
WSO2 Inc.: http://www.wso2.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [IS] Post Authentication Redirection

2017-03-23 Thread Danushka Fernando
Hi All
I wrote a postAuthenticationHandler to handle custom password expiry
requirement. It redirects to following endpoint when handling request. But
this redirect go back to authorize endpoint in the middle and getting
crashed. But if I redirect to the endpoint manually it will work as
expected. Any idea whats going wrong here.

[1] 
/authenticationendpoint/password_expiry.do?passwordexpiryremainingtimeinmillis=252811377=true=5538f5b1-2a50-43c8-a380-b2a3a90c7d27

Thanks & Regards
Danushka Fernando
Senior Software Engineer
WSO2 inc. http://wso2.com/
Mobile : +94716332729
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [carbondump] Updating carbondump.sh for Java 8

2017-03-23 Thread Isuru Perera
Hi,

It'll be useful to have those details. I think we can just update the
command to work in Java 8 for now. Connecting to the JVM to get these kinds
of stats will have an impact on the server, but it should be okay as we run
carbondump to debug the server.

I think we must go through all commands in the carbondump and make sure
that all of those are still relevant for today. I can do that later.

Thanks!

Best Regards,

On Thu, Mar 23, 2017 at 10:43 PM, Milinda Perera  wrote:

> Hi,
>
> In carbondump.sh [1] we retrieve  permgen stats in Java Heap (jmap
> -permstat $PID) . Since Java 8 onwards, it is replaced by Metaspace and
> permstat option is no longer exists in jmap tool.
>
> Metaspace can be retrieved by: jmap -clstats 
>
> Shall we remove permstat and replace with clstats or just remove
> retrieving permgen stats? Is  Is it useful retrieving permstat or clstats
> to figure out errors?
> Whether it may effect on the running server?
>
> [1] https://docs.wso2.com/display/ADMIN44x/Capturing+System+Data
> +in+Error+Situations
>
> Thanks,
> Milinda
>
> --
> Milinda Perera
> Senior Software Engineer;
> WSO2 Inc. http://wso2.com ,
> Mobile: (+94) 714 115 032 <071%20411%205032>
>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Isuru Perera
Associate Technical Lead | WSO2, Inc. | http://wso2.com/
Lean . Enterprise . Middleware

about.me/chrishantha
Contact: +IsuruPereraWSO2 
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [IS 6.0.0] Making native claim dialect configurable

2017-03-23 Thread Prabath Siriwardena
Well... I doubt we should make it configurable... Its the claim dialect for
the WSO2 products (or IS)... In any federation scenario - we do support
claim mappings for custom dialects...

Thanks & regards,
-Prabath

On Thu, Mar 23, 2017 at 9:14 PM, Pushpalanka Jayawardhana 
wrote:

>
>
> On Fri, Mar 24, 2017 at 9:18 AM, Sagara Gunathunga 
> wrote:
>
>>
>>
>> On Thu, Mar 23, 2017 at 12:27 PM, Pushpalanka Jayawardhana <
>> la...@wso2.com> wrote:
>>
>>>
>>>
>>> On Tue, Mar 21, 2017 at 10:56 AM, Godwin Shrimal 
>>> wrote:
>>>
 If we make native claim dialect configurable, will product work by
 changing to different claim dialect ?

>>> That should be the expectation if we make the native claim dialect
>>> configurable.
>>>
>>> As of now, we have the native dialect hard coded as at [1]. If make it
>>> configurable, it should come from a configuration file, most suitably
>>> 'domain-config.yaml' file.
>>> Appreciate your inputs soon to move forward, as lot of codes and designs
>>> will be affected by this decision.
>>>
>>
>> Some users may not want to use/return claims with WSO2 prefix (
>> http://wso2.org/claims) instead they want to use their own prefix (
>> http://mycompany.com/attributes) so better to make the prefix of default
>> claim dialect configurable.
>>
>> ATM we have hard coded this value and what we should do is provide a
>> ability to override this prefix value per server basis through
>> deployment.yaml, I don't see any reason to related this configuration with
>> domains.
>>
> ATM domain-config.yaml file defines the default claims implicitly as at
> [1].
> So are we suggesting to put this prefix configuration at deployment.yaml
> file and configure this 'domain-config.yaml' file with same dialect prefix
> in claim URI?
>
> [1] - https://github.com/wso2/carbon-identity-mgt/blob/
> master/tests/osgi-tests/src/test/resources/carbon-home/
> conf/identity/domain-config.yaml
> 
>
>>
>> Thanks !
>>
>>>
>>> [1] - https://github.com/wso2/carbon-identity-mgt/blob/master/co
>>> mponents/org.wso2.carbon.identity.mgt/src/main/java/org/
>>> wso2/carbon/identity/mgt/impl/util/IdentityMgtConstants.java#L44-L46
>>>

 Thanks
 Godwin


 On Mon, Mar 20, 2017 at 4:34 PM, Pushpalanka Jayawardhana <
 la...@wso2.com> wrote:

> +Prabath
>
> On Mon, Mar 20, 2017 at 4:33 PM, Pushpalanka Jayawardhana <
> la...@wso2.com> wrote:
>
>> Hi All,
>>
>> Have we made a conclusion on this? Are we expecting to make the
>> native dialect configurable?
>> Given that we have claim mapping functionality this won't be a
>> mandatory requirement. But this has the advantage Omindu mentioned 
>> against
>> the complexities introduced by letting this configurable for username,
>> groupname etc.
>>
>> Thanks,
>>
>> On Thu, Feb 23, 2017 at 2:13 PM, Omindu Rathnaweera 
>> wrote:
>>
>>> One of the advantages would be that we can avoid the overhead of
>>> claim transformation.
>>>
>>> Regards,
>>> Omindu.
>>>
>>> On Thu, Feb 23, 2017 at 1:53 PM, Omindu Rathnaweera >> > wrote:
>>>
 Do we need to make the native claim dialect configurable ? AFAIK it
 is not configurable and we are using a hardcoded constant for the 
 dialect
 URI (http://wso2.org/claims).


 Regards,
 Omindu

 --
 Omindu Rathnaweera
 Software Engineer, WSO2 Inc.
 Mobile: +94 771 197 211 <+94%2077%20119%207211>

>>>
>>>
>>>
>>> --
>>> Omindu Rathnaweera
>>> Software Engineer, WSO2 Inc.
>>> Mobile: +94 771 197 211 <077%20119%207211>
>>>
>>
>>
>>
>> --
>> Pushpalanka.
>> --
>> Pushpalanka Jayawardhana, B.Sc.Eng.(Hons).
>> Senior Software Engineer, WSO2 Lanka (pvt) Ltd;  wso2.com/
>> Mobile: +94779716248
>> Blog: pushpalankajaya.blogspot.com/ | LinkedIn: lk.linkedin.com/in/p
>> ushpalanka/ | Twitter: @pushpalanka
>>
>>
>
>
> --
> Pushpalanka.
> --
> Pushpalanka Jayawardhana, B.Sc.Eng.(Hons).
> Senior Software Engineer, WSO2 Lanka (pvt) Ltd;  wso2.com/
> Mobile: +94779716248
> Blog: pushpalankajaya.blogspot.com/ | LinkedIn: lk.linkedin.com/in/p
> ushpalanka/ | Twitter: @pushpalanka
>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


 --
 *Godwin Amila Shrimal*
 WSO2 Inc.; http://wso2.com
 lean.enterprise.middleware

 mobile: *+94772264165*
 linkedin: *http://lnkd.in/KUum6D *
 twitter: 

Re: [Dev] How can we add multi language support in javascript files

2017-03-23 Thread Prasanna Dangalla
On Fri, Mar 24, 2017 at 12:53 AM, Nipuna Chandradasa 
wrote:

> I don't think there is a feasible solution rather than loading i18n config
> file as a json object to the client side in the beginning of the app... i
> think from uuf side we can provide a api for that... WDYT?
>
API in the sense, what kind of an API ? Does this loads all the data into
front end or are you thinking about a filtering mechanism for the language
data by page before you send them to front end ?

On Thu, Mar 23, 2017 at 5:29 PM, SajithAR Ariyarathna 
wrote:

> Currently UUF doesn't support i18n in client-side.
>
> @UUF Team,
> We need to come up with a solution for client-side i18n. Shall we start a
> discussion on this?
>
> Thanks.
>
>
> On Thu, Mar 23, 2017 at 4:36 PM, Prasanna Dangalla 
> wrote:
>
>> Hi Sajith,
>>
>> This is for Client-side JS
>>
>> *Prasanna Dangalla*
>> Senior Software Engineer, WSO2, Inc.; http://wso2.com/
>> lean.enterprise.middleware
>>
>>
>> *cell: +94 718 11 27 51*
>> *twitter: @prasa77*
>>
>> On Thu, Mar 23, 2017 at 2:54 PM, SajithAR Ariyarathna 
>> wrote:
>>
>>> Hi Prasanna,
>>>
>>> Is there a mechanism defined to use something like i18n in javascript ?
>>>
>>> Server-side JS or Client-side JS?
>>>
>>> On Thu, Mar 23, 2017 at 11:02 AM, Ayesha Dissanayaka 
>>> wrote:
>>>
 Hi Prasanna,

 Similar discussion was started sometime back in [1].
 Issues in [2], [3] have some suggestions.

 [1] [Dev][UUF][IS-6] Enable i18n support in javascript
 [2] https://github.com/wso2/carbon-uuf/issues/160
 [3] https://github.com/wso2/carbon-uuf/issues/166

 @Ayesha: As I understood all these are done for server side JS, I'm
>> wondering about client side JS.
>>
>>
>>>
 On Thu, Mar 23, 2017 at 10:46 AM, Pubudu Gunatilaka 
 wrote:

> Adding Manu and Sajith.
>
> On Thu, Mar 23, 2017 at 10:44 AM, Prasanna Dangalla  > wrote:
>
>> Hi Nisala,
>>
>> I was wondering how to include this in javascript files, not in hbs
>> files. Is there a way to include in javascrip fiels ?
>>
>> Thanks
>>
>> *Prasanna Dangalla*
>> Senior Software Engineer, WSO2, Inc.; http://wso2.com/
>> lean.enterprise.middleware
>>
>>
>> *cell: +94 718 11 27 51*
>> *twitter: @prasa77*
>>
>> On Thu, Mar 23, 2017 at 10:33 AM, Nisala Nanayakkara > > wrote:
>>
>>> Hi Prasanna,
>>>
>>> UUF has the capability of facilitating above mentioned scenario. You
>>> can define your language property file under the ‘lang’ directory as
>>> follows.
>>>
>>> |src
>>> | |main
>>> |   | pages/
>>> |   | fragments/
>>> |   | layouts/
>>> |   | modules/
>>> |   | lang/
>>> |en_US.properties
>>> |   | public/
>>>
>>> After that you can use following code segment to achieve your
>>> requirement in your hbs file.
>>>
>>> {{i18n "my.sample.key"}}
>>>
>>> Please go through sample app available here[1] if you need more
>>> clarification. Moreover you can find actual usage above code segment
>>> here[2] and corresponding language file here[3].
>>>
>>> [1] - https://github.com/wso2/carbon-uuf/tree/master/samples/apps/
>>> org.wso2.carbon.uuf.sample.pets-store.app
>>> [2] - https://github.com/wso2/carbon-uuf/blob/master/samples/apps/
>>> org.wso2.carbon.uuf.sample.pets-store.app/src/main/pages/ind
>>> ex.hbs#L16
>>> [3] - https://github.com/wso2/carbon-uuf/blob/master/samples/apps/
>>> org.wso2.carbon.uuf.sample.pets-store.app/src/main/lang/en_U
>>> S.properties
>>>
>>> Thanks,
>>> Nisala
>>>
>>> On Thu, Mar 23, 2017 at 9:01 AM, Prasanna Dangalla <
>>> prasa...@wso2.com> wrote:
>>>
 Hi Devs,

 Is there a mechanism defined to use something like i18n in
 javascript ? Does the UUF has the capability of facilitating this ? You
 inputs are highly appreciated.

 Thanks

 *Prasanna Dangalla*
 Senior Software Engineer, WSO2, Inc.; http://wso2.com/
 lean.enterprise.middleware


 *cell: +94 718 11 27 51*
 *twitter: @prasa77*

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


>>>
>>>
>>> --
>>> *Nisala Niroshana Nanayakkara,*
>>> Software Engineer
>>> Mobile:(+94)717600022
>>> WSO2 Inc., http://wso2.com/
>>>
>>
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> 

Re: [Dev] [IS 6.0.0] Making native claim dialect configurable

2017-03-23 Thread Pushpalanka Jayawardhana
On Fri, Mar 24, 2017 at 9:18 AM, Sagara Gunathunga  wrote:

>
>
> On Thu, Mar 23, 2017 at 12:27 PM, Pushpalanka Jayawardhana  > wrote:
>
>>
>>
>> On Tue, Mar 21, 2017 at 10:56 AM, Godwin Shrimal  wrote:
>>
>>> If we make native claim dialect configurable, will product work by
>>> changing to different claim dialect ?
>>>
>> That should be the expectation if we make the native claim dialect
>> configurable.
>>
>> As of now, we have the native dialect hard coded as at [1]. If make it
>> configurable, it should come from a configuration file, most suitably
>> 'domain-config.yaml' file.
>> Appreciate your inputs soon to move forward, as lot of codes and designs
>> will be affected by this decision.
>>
>
> Some users may not want to use/return claims with WSO2 prefix (
> http://wso2.org/claims) instead they want to use their own prefix (
> http://mycompany.com/attributes) so better to make the prefix of default
> claim dialect configurable.
>
> ATM we have hard coded this value and what we should do is provide a
> ability to override this prefix value per server basis through
> deployment.yaml, I don't see any reason to related this configuration with
> domains.
>
ATM domain-config.yaml file defines the default claims implicitly as at
[1].
So are we suggesting to put this prefix configuration at deployment.yaml
file and configure this 'domain-config.yaml' file with same dialect prefix
in claim URI?

[1] -
https://github.com/wso2/carbon-identity-mgt/blob/master/tests/osgi-tests/src/test/resources/carbon-home/conf/identity/domain-config.yaml


>
> Thanks !
>
>>
>> [1] - https://github.com/wso2/carbon-identity-mgt/blob/master/
>> components/org.wso2.carbon.identity.mgt/src/main/java/
>> org/wso2/carbon/identity/mgt/impl/util/IdentityMgtConstants.java#L44-L46
>>
>>>
>>> Thanks
>>> Godwin
>>>
>>>
>>> On Mon, Mar 20, 2017 at 4:34 PM, Pushpalanka Jayawardhana <
>>> la...@wso2.com> wrote:
>>>
 +Prabath

 On Mon, Mar 20, 2017 at 4:33 PM, Pushpalanka Jayawardhana <
 la...@wso2.com> wrote:

> Hi All,
>
> Have we made a conclusion on this? Are we expecting to make the native
> dialect configurable?
> Given that we have claim mapping functionality this won't be a
> mandatory requirement. But this has the advantage Omindu mentioned against
> the complexities introduced by letting this configurable for username,
> groupname etc.
>
> Thanks,
>
> On Thu, Feb 23, 2017 at 2:13 PM, Omindu Rathnaweera 
> wrote:
>
>> One of the advantages would be that we can avoid the overhead of
>> claim transformation.
>>
>> Regards,
>> Omindu.
>>
>> On Thu, Feb 23, 2017 at 1:53 PM, Omindu Rathnaweera 
>> wrote:
>>
>>> Do we need to make the native claim dialect configurable ? AFAIK it
>>> is not configurable and we are using a hardcoded constant for the 
>>> dialect
>>> URI (http://wso2.org/claims).
>>>
>>>
>>> Regards,
>>> Omindu
>>>
>>> --
>>> Omindu Rathnaweera
>>> Software Engineer, WSO2 Inc.
>>> Mobile: +94 771 197 211 <+94%2077%20119%207211>
>>>
>>
>>
>>
>> --
>> Omindu Rathnaweera
>> Software Engineer, WSO2 Inc.
>> Mobile: +94 771 197 211 <077%20119%207211>
>>
>
>
>
> --
> Pushpalanka.
> --
> Pushpalanka Jayawardhana, B.Sc.Eng.(Hons).
> Senior Software Engineer, WSO2 Lanka (pvt) Ltd;  wso2.com/
> Mobile: +94779716248
> Blog: pushpalankajaya.blogspot.com/ | LinkedIn: lk.linkedin.com/in/p
> ushpalanka/ | Twitter: @pushpalanka
>
>


 --
 Pushpalanka.
 --
 Pushpalanka Jayawardhana, B.Sc.Eng.(Hons).
 Senior Software Engineer, WSO2 Lanka (pvt) Ltd;  wso2.com/
 Mobile: +94779716248
 Blog: pushpalankajaya.blogspot.com/ | LinkedIn: lk.linkedin.com/in/p
 ushpalanka/ | Twitter: @pushpalanka


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


>>>
>>>
>>> --
>>> *Godwin Amila Shrimal*
>>> WSO2 Inc.; http://wso2.com
>>> lean.enterprise.middleware
>>>
>>> mobile: *+94772264165*
>>> linkedin: *http://lnkd.in/KUum6D *
>>> twitter: https://twitter.com/godwinamila
>>> 
>>>
>>
>>
>>
>> --
>> Pushpalanka.
>> --
>> Pushpalanka Jayawardhana, B.Sc.Eng.(Hons).
>> Senior Software Engineer, WSO2 Lanka (pvt) Ltd;  wso2.com/
>> Mobile: +94779716248
>> Blog: pushpalankajaya.blogspot.com/ | LinkedIn: lk.linkedin.com/in/p
>> ushpalanka/ | Twitter: @pushpalanka
>>
>>
>
>
> --
> Sagara Gunathunga
>
> Associate Director / Architect; WSO2, Inc.;  http://wso2.com
> V.P Apache Web Services;

Re: [Dev] [IS 6.0.0] Making native claim dialect configurable

2017-03-23 Thread Sagara Gunathunga
On Thu, Mar 23, 2017 at 12:27 PM, Pushpalanka Jayawardhana 
wrote:

>
>
> On Tue, Mar 21, 2017 at 10:56 AM, Godwin Shrimal  wrote:
>
>> If we make native claim dialect configurable, will product work by
>> changing to different claim dialect ?
>>
> That should be the expectation if we make the native claim dialect
> configurable.
>
> As of now, we have the native dialect hard coded as at [1]. If make it
> configurable, it should come from a configuration file, most suitably
> 'domain-config.yaml' file.
> Appreciate your inputs soon to move forward, as lot of codes and designs
> will be affected by this decision.
>

Some users may not want to use/return claims with WSO2 prefix (
http://wso2.org/claims) instead they want to use their own prefix (
http://mycompany.com/attributes) so better to make the prefix of default
claim dialect configurable.

ATM we have hard coded this value and what we should do is provide a
ability to override this prefix value per server basis through
deployment.yaml, I don't see any reason to related this configuration with
domains.

Thanks !

>
> [1] - https://github.com/wso2/carbon-identity-mgt/blob/
> master/components/org.wso2.carbon.identity.mgt/src/main/
> java/org/wso2/carbon/identity/mgt/impl/util/IdentityMgtConstants.java#L44-
> L46
>
>>
>> Thanks
>> Godwin
>>
>>
>> On Mon, Mar 20, 2017 at 4:34 PM, Pushpalanka Jayawardhana > > wrote:
>>
>>> +Prabath
>>>
>>> On Mon, Mar 20, 2017 at 4:33 PM, Pushpalanka Jayawardhana <
>>> la...@wso2.com> wrote:
>>>
 Hi All,

 Have we made a conclusion on this? Are we expecting to make the native
 dialect configurable?
 Given that we have claim mapping functionality this won't be a
 mandatory requirement. But this has the advantage Omindu mentioned against
 the complexities introduced by letting this configurable for username,
 groupname etc.

 Thanks,

 On Thu, Feb 23, 2017 at 2:13 PM, Omindu Rathnaweera 
 wrote:

> One of the advantages would be that we can avoid the overhead of claim
> transformation.
>
> Regards,
> Omindu.
>
> On Thu, Feb 23, 2017 at 1:53 PM, Omindu Rathnaweera 
> wrote:
>
>> Do we need to make the native claim dialect configurable ? AFAIK it
>> is not configurable and we are using a hardcoded constant for the dialect
>> URI (http://wso2.org/claims).
>>
>>
>> Regards,
>> Omindu
>>
>> --
>> Omindu Rathnaweera
>> Software Engineer, WSO2 Inc.
>> Mobile: +94 771 197 211 <+94%2077%20119%207211>
>>
>
>
>
> --
> Omindu Rathnaweera
> Software Engineer, WSO2 Inc.
> Mobile: +94 771 197 211 <077%20119%207211>
>



 --
 Pushpalanka.
 --
 Pushpalanka Jayawardhana, B.Sc.Eng.(Hons).
 Senior Software Engineer, WSO2 Lanka (pvt) Ltd;  wso2.com/
 Mobile: +94779716248
 Blog: pushpalankajaya.blogspot.com/ | LinkedIn: lk.linkedin.com/in/p
 ushpalanka/ | Twitter: @pushpalanka


>>>
>>>
>>> --
>>> Pushpalanka.
>>> --
>>> Pushpalanka Jayawardhana, B.Sc.Eng.(Hons).
>>> Senior Software Engineer, WSO2 Lanka (pvt) Ltd;  wso2.com/
>>> Mobile: +94779716248
>>> Blog: pushpalankajaya.blogspot.com/ | LinkedIn: lk.linkedin.com/in/p
>>> ushpalanka/ | Twitter: @pushpalanka
>>>
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> *Godwin Amila Shrimal*
>> WSO2 Inc.; http://wso2.com
>> lean.enterprise.middleware
>>
>> mobile: *+94772264165*
>> linkedin: *http://lnkd.in/KUum6D *
>> twitter: https://twitter.com/godwinamila
>> 
>>
>
>
>
> --
> Pushpalanka.
> --
> Pushpalanka Jayawardhana, B.Sc.Eng.(Hons).
> Senior Software Engineer, WSO2 Lanka (pvt) Ltd;  wso2.com/
> Mobile: +94779716248
> Blog: pushpalankajaya.blogspot.com/ | LinkedIn: lk.linkedin.com/in/
> pushpalanka/ | Twitter: @pushpalanka
>
>


-- 
Sagara Gunathunga

Associate Director / Architect; WSO2, Inc.;  http://wso2.com
V.P Apache Web Services;http://ws.apache.org/
Linkedin; http://www.linkedin.com/in/ssagara
Blog ;  http://ssagara.blogspot.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [IS 6.0.0][M5] Ensuring Proper Internationalization of UIs in Portal Apps

2017-03-23 Thread Nuwandi Wickramasinghe
AFAIK we need to manually check them. Also there are situations UI messages
and UI itself is created in JS files (front end or back end). Need to
validate them as well. As discussed in [1] uuf doesn't have a direct
mechanism to do this in front end JS. Therefore better to avoid creating UI
messages there.

[1] [Dev] How can we add multi language support in javascript files

On Thu, Mar 23, 2017 at 10:05 PM, Pushpalanka Jayawardhana 
wrote:

> Hi All,
>
> Do we have any automated mechanism to check the UIs for proper
> internationalization support ?
> Or do we have to make sure of this manually and validate at code reviews?
>
> Thanks,
> --
> Pushpalanka Jayawardhana, B.Sc.Eng.(Hons).
> Senior Software Engineer, WSO2 Lanka (pvt) Ltd;  wso2.com/
> Mobile: +94779716248
> Blog: pushpalankajaya.blogspot.com/ | LinkedIn: lk.linkedin.com/in/
> pushpalanka/ | Twitter: @pushpalanka
>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 

Best Regards,

Nuwandi Wickramasinghe

Software Engineer

WSO2 Inc.

Web : http://wso2.com

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


[Dev] [GSoC 2017][IoTS]User Managed Access based Device Sharing

2017-03-23 Thread Jude Niroshan
Hi,

My name is Jude Niroshan. I'm an undergraduate from Sri Lanka Institute of
Information Technology. I have worked with Java and build systems for quite
few years. I eagerly wanted to participate on GSoC 2017. I have went
through the WSO2 IoT Server framework and understood the basics of how it
works. I have some experience with OAuth2 and token based API management.

In order to get some more information on this particular project I have
went through the following links(in addition to the links given on project
description page):

https://www.youtube.com/watch?v=F4Ss5SU_VGM
https://docs.wso2.com/display/IoTS300/About+WSO2+IoT+Server

Currently I'm testing out with the IoT Server by enrolling an Android
Device to check how the IoTS works and where the OAuth comes into play and
when. On the other hand, i'm learning about UMA.

Please feel free to give some guidance over where to start off with.
Specially what modules would engage on this project(Out of many modules
which resides inside IoTS).

It seems like I'm bit late for the party, but it's never too late to
getting to know all of you and to be part of the GSoC community. ☺

Thanks & Regards,
Jude
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] How can we add multi language support in javascript files

2017-03-23 Thread Nipuna Chandradasa
I don't think there is a feasible solution rather than loading i18n config
file as a json object to the client side in the beginning of the app... i
think from uuf side we can provide a api for that... WDYT?

On Thu, Mar 23, 2017 at 5:29 PM, SajithAR Ariyarathna 
wrote:

> Currently UUF doesn't support i18n in client-side.
>
> @UUF Team,
> We need to come up with a solution for client-side i18n. Shall we start a
> discussion on this?
>
> Thanks.
>
>
> On Thu, Mar 23, 2017 at 4:36 PM, Prasanna Dangalla 
> wrote:
>
>> Hi Sajith,
>>
>> This is for Client-side JS
>>
>> *Prasanna Dangalla*
>> Senior Software Engineer, WSO2, Inc.; http://wso2.com/
>> lean.enterprise.middleware
>>
>>
>> *cell: +94 718 11 27 51*
>> *twitter: @prasa77*
>>
>> On Thu, Mar 23, 2017 at 2:54 PM, SajithAR Ariyarathna 
>> wrote:
>>
>>> Hi Prasanna,
>>>
>>> Is there a mechanism defined to use something like i18n in javascript ?
>>>
>>> Server-side JS or Client-side JS?
>>>
>>> On Thu, Mar 23, 2017 at 11:02 AM, Ayesha Dissanayaka 
>>> wrote:
>>>
 Hi Prasanna,

 Similar discussion was started sometime back in [1].
 Issues in [2], [3] have some suggestions.

 [1] [Dev][UUF][IS-6] Enable i18n support in javascript
 [2] https://github.com/wso2/carbon-uuf/issues/160
 [3] https://github.com/wso2/carbon-uuf/issues/166

 @Ayesha: As I understood all these are done for server side JS, I'm
>> wondering about client side JS.
>>
>>
>>>
 On Thu, Mar 23, 2017 at 10:46 AM, Pubudu Gunatilaka 
 wrote:

> Adding Manu and Sajith.
>
> On Thu, Mar 23, 2017 at 10:44 AM, Prasanna Dangalla  > wrote:
>
>> Hi Nisala,
>>
>> I was wondering how to include this in javascript files, not in hbs
>> files. Is there a way to include in javascrip fiels ?
>>
>> Thanks
>>
>> *Prasanna Dangalla*
>> Senior Software Engineer, WSO2, Inc.; http://wso2.com/
>> lean.enterprise.middleware
>>
>>
>> *cell: +94 718 11 27 51*
>> *twitter: @prasa77*
>>
>> On Thu, Mar 23, 2017 at 10:33 AM, Nisala Nanayakkara > > wrote:
>>
>>> Hi Prasanna,
>>>
>>> UUF has the capability of facilitating above mentioned scenario. You
>>> can define your language property file under the ‘lang’ directory as
>>> follows.
>>>
>>> |src
>>> | |main
>>> |   | pages/
>>> |   | fragments/
>>> |   | layouts/
>>> |   | modules/
>>> |   | lang/
>>> |en_US.properties
>>> |   | public/
>>>
>>> After that you can use following code segment to achieve your
>>> requirement in your hbs file.
>>>
>>> {{i18n "my.sample.key"}}
>>>
>>> Please go through sample app available here[1] if you need more
>>> clarification. Moreover you can find actual usage above code segment
>>> here[2] and corresponding language file here[3].
>>>
>>> [1] - https://github.com/wso2/carbon-uuf/tree/master/samples/apps/
>>> org.wso2.carbon.uuf.sample.pets-store.app
>>> [2] - https://github.com/wso2/carbon-uuf/blob/master/samples/apps/
>>> org.wso2.carbon.uuf.sample.pets-store.app/src/main/pages/ind
>>> ex.hbs#L16
>>> [3] - https://github.com/wso2/carbon-uuf/blob/master/samples/apps/
>>> org.wso2.carbon.uuf.sample.pets-store.app/src/main/lang/en_U
>>> S.properties
>>>
>>> Thanks,
>>> Nisala
>>>
>>> On Thu, Mar 23, 2017 at 9:01 AM, Prasanna Dangalla <
>>> prasa...@wso2.com> wrote:
>>>
 Hi Devs,

 Is there a mechanism defined to use something like i18n in
 javascript ? Does the UUF has the capability of facilitating this ? You
 inputs are highly appreciated.

 Thanks

 *Prasanna Dangalla*
 Senior Software Engineer, WSO2, Inc.; http://wso2.com/
 lean.enterprise.middleware


 *cell: +94 718 11 27 51*
 *twitter: @prasa77*

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


>>>
>>>
>>> --
>>> *Nisala Niroshana Nanayakkara,*
>>> Software Engineer
>>> Mobile:(+94)717600022
>>> WSO2 Inc., http://wso2.com/
>>>
>>
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> *Pubudu Gunatilaka*
> Committer and PMC Member - Apache Stratos
> Software Engineer
> WSO2, Inc.: http://wso2.com
> mobile : +94774078049 <%2B94772207163>
>
>
> 

Re: [Dev] [GSoC 2017][IoTS]User Managed Access based Device Sharing

2017-03-23 Thread Jude Niroshan
Hi All,

Few more additional information about my background would be able to find
on LinkedIn and
StackOverflow
. I have
completed OCA and OCP for Java-8 and I'm confident with language. I will
try my best to grasp the core concepts about the project and get into it
asap. Of course, this project is my first priority in GSoC-2017 out of all
other projects and other organizations.  I would appreciate if you can
guide me for getting started and throughout this journey.

blog : http://gsoc2017journey.blogspot.com/

Kind Regards,
Jude

On Fri, Mar 24, 2017 at 1:11 AM, Jude Niroshan 
wrote:

> Hi,
>
> My name is Jude Niroshan. I'm an undergraduate from Sri Lanka Institute of
> Information Technology. I have worked with Java and build systems for quite
> few years. I eagerly wanted to participate on GSoC 2017. I have went
> through the WSO2 IoT Server framework and understood the basics of how it
> works. I have some experience with OAuth2 and token based API management.
>
> In order to get some more information on this particular project I have
> went through the following links(in addition to the links given on project
> description page):
>
> https://www.youtube.com/watch?v=F4Ss5SU_VGM
> https://docs.wso2.com/display/IoTS300/About+WSO2+IoT+Server
>
> Currently I'm testing out with the IoT Server by enrolling an Android
> Device to check how the IoTS works and where the OAuth comes into play and
> when. On the other hand, i'm learning about UMA.
>
> Please feel free to give some guidance over where to start off with.
> Specially what modules would engage on this project(Out of many modules
> which resides inside IoTS).
>
> It seems like I'm bit late for the party, but it's never too late to
> getting to know all of you and to be part of the GSoC community. ☺
>
> Thanks & Regards,
> Jude
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Custom password grant type

2017-03-23 Thread Gottfried Szing

Hi Farasath,

Thanks for the response. I was further playing around and it looks that there is a tight coupling between the 
OAuth2TokenEndpoint, PasswordGrantHandler and the definition in the identity.xml as grant type = "password". 
although I have just tried the PasswordGrantHandler, not the others.


1. OAuth2TokenEndpoint don't copy the parameters if it is one of the 5 known grant types. This is something I 
dont understand because if I want to disable the requester to provide additional parameters, I could use a 
custom validator.


2. If I want to the use the PasswordGrantHandler as a basis for an own implementation as below with a custom 
grant (e.h. granttype "mypassword"), this wont work because the resourceOwnerUsername and 
resourceOwnerPassword is not set ==> leads to an NullPointerException in the own implemenation.


[2] can be solved in setting the parameters manually, but [1] is not easy to solve. This would involve a 
change in the OAuth2TokenEndpoint. Could this be solved to make future development of custom grants easier?


Br,
  Gottfried


I think your observation is correct. It is happening due to the following 
check[1] which sets the username and
password params coming in grant request only to the OAuth2AccessTokenReqDTO 
object.

For the custom grant types, all the request parameters are set to the 
OAuth2AccessTokenReqDTO as seen in [2].


[1] 
https://github.com/wso2-extensions/identity-inbound-auth-oauth/blob/e9813da4110b819cfe563cdbd88d6a70064f45e0/components/org.wso2.carbon.identity.oauth.endpoint/src/main/java/org/wso2/carbon/identity/oauth/endpoint/token/OAuth2TokenEndpoint.java#L273-L273

[2] 
https://github.com/wso2-extensions/identity-inbound-auth-oauth/blob/e9813da4110b819cfe563cdbd88d6a70064f45e0/components/org.wso2.carbon.identity.oauth.endpoint/src/main/java/org/wso2/carbon/identity/oauth/endpoint/token/OAuth2TokenEndpoint.java#L284


Thanks,
Farasath

Farasath Ahamed
Software Engineer, WSO2 Inc.; http://wso2.com 
Mobile: +94777603866 
Blog: blog.farazath.com 
Twitter: @farazath619 




On Thu, Mar 23, 2017 at 1:46 AM, Gottfried Szing > wrote:

Hi

Target WSO2 product is the WSO2 IS 5.3 and/or API manager 2.1

I am currently implementing a set of custom grant types and one grant type 
is based on the the existing
PasswordGrantHandler. The goal is to check in addition to the username, 
password and scope an additional,
optional request parameter. If this parameter exists, a special response 
header should be added. So far,
so good.

But it does not work. I have extended the PasswordGrantHandler and check 
the requestParamers in the DTO
like here:

public class MyPasswordGrantHandler extends PasswordGrantHandler {

@Override
public boolean validateGrant(OAuthTokenReqMessageContext 
oAuthTokenReqMessageContext)
throws IdentityOAuth2Exception {
// this returns null

oAuthTokenReqMessageContext.getOauth2AccessTokenReqDTO().getRequestParameters()

final boolean authStatus = 
super.validateGrant(oAuthTokenReqMessageContext);

if (authStatus) {
// 
}

return authStatus;
}
}

This works perfectly for other, self-implemented grant handlers, but not 
for this one as long as it is
registered it in the identity.xml under the GrantTypeName = password. If I 
choose a different name, the
same implementation works as expected.

Any ideas, whats going on under the hood? In the sources I havent found any 
hints.

Br & Thanks
___
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] [APIM_REST_API] What are the properties to include in DTO

2017-03-23 Thread Rajith Roshan
Hi

On Thu, Mar 23, 2017 at 11:33 AM, Anuruddha Liyanarachchi <
anurudd...@wso2.com> wrote:

> Hi,
>
> As per the current publisher REST API [1], there is a resource to get the
> subscription for a given API.
>
> This returns the following subscriptionDTO with subscription details and
> IDs of other objects associated with it (applicationId, apiId).
>
> @JsonProperty("subscriptionId")
> private String subscriptionId = null;
>
> @JsonProperty("applicationId")
> private String applicationId = null;
>
> @JsonProperty("apiId")
> private String apiId = null;
>
> @JsonProperty("subscriptionTier")
> private String subscriptionTier = null;
>
> @JsonProperty("subscriptionStatus")
> private SubscriptionStatusEnum subscriptionStatus = null;
>
> For the UI we need the application name and API name to be displayed along
> with the subscription status.
>
> In order to do get APP_NAME and API_NAME, we need to do two additional
> network calls with apiID and applicationID to two different resources.
>
> Therefore if we are to display 10 subscriptions in the UI we need to do 21
> network calls.
>
>  1. One network call to get list of subscriptions which return List with
> 10 subscription DTO objects (1 network call)
> *publisher/v1/subscriptions?api_id=fe855359-b3fd-4bbf-8f5c-6fb3f020011e*
>
>  2. For each subscriptionDTO, we need to do 2 network calls to get API
> name and Application Name. (2 * 10 = 20 network calls)
> *publisher/v1/apis?api_id=fe855359-b3fd-4bbf-8f5c-6fb3f020011e*
> *publisher/v1/applications?**application_id*
> *=fe855359-b3fd-4bbf-8f5c-6fb3f020011e*
>
> There are two ways to handle this.
>
> 1. Include the API_NAME and APPLICATION_NAME in the same DTO.
> @JsonProperty("applicationName")
> private String applicationName = null;
>
> @JsonProperty("apiName")
> private String apiName = null;
>
>
> 2. Include the *API* *object* and *Application* *object* in the
> subscription DAO with required fields populated.
> @JsonProperty("applicationObj")
> private Application applicationObj = null;
>
> @JsonProperty("apiObj")
> private API apiObj = null;
>
> IMO 2nd approach is more suitable. Please share your thoughts.
>

Are we going to filter out API object from subscription dto if the
particular user only have "apim:subscription_view" scope .(not
apim:api_view scope)

>
> [1] https://github.com/wso2/carbon-apimgt/blob/master/
> components/apimgt/org.wso2.carbon.apimgt.rest.api.
> publisher/src/main/resources/publisher-api.yaml
> 
> --
> Thanks and Regards,
> Anuruddha Lanka Liyanarachchi
> Software Engineer - WSO2
> Mobile : +94 (0) 712762611 <+94%2071%20276%202611>
> Tel  : +94 112 145 345 <+94%2011%202%20145345>
> anurudd...@wso2.com
>
> --
> *Thanks and Regards,*
> Anuruddha Lanka Liyanarachchi
> Software Engineer - WSO2
> Mobile : +94 (0) 712762611
> Tel  : +94 112 145 345
> a nurudd...@wso2.com
>



-- 
Rajith Roshan
Software Engineer, WSO2 Inc.
Mobile: +94-72-642-8350 <%2B94-71-554-8430>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] WSO2 EI: Message sample processor throwing NPE when reading messages

2017-03-23 Thread Sharath Bhaskara
Hi Team,

When doing a POC using the message store message forward pattern I have 
observed the message store throwing an NPE when over a 100 messages are stored 
in a few seconds. Although this issue is not consistently reproducible, I have 
observed it a couple of time yesterday.

I was just wondering if this is something wrong with the message or if there is 
an issue in the platform.

[2017-03-21 12:05:49,942] [] ERROR - SamplingService Error occurred while 
executing the message
org.apache.synapse.SynapseException: Runtime error occurred while mediating the 
message
at 
org.apache.synapse.mediators.AbstractMediator.handleException(AbstractMediator.java:367)
at 
org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:127)
at 
org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:59)
at 
org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:158)
at 
org.apache.synapse.message.processor.impl.sampler.SamplingService$1.run(SamplingService.java:211)
at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException
at 
org.apache.synapse.mediators.store.MessageStoreMediator.getAxis2ParameterValue(MessageStoreMediator.java:226)
at 
org.apache.synapse.mediators.store.MessageStoreMediator.mediate(MessageStoreMediator.java:108)
at 
org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:97)



Regards,
Sharath Bhaskara

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


Re: [Dev] [APIM_REST_API] What are the properties to include in DTO

2017-03-23 Thread Harsha Kumara
Yes I too think we shouldn't return the full representation of the resource
in the list mode. Partial representation would be enough. Document in[1]
explain this.

[1]
http://51elliot.blogspot.com/2014/06/rest-api-best-practices-4-collections.html

On Fri, Mar 24, 2017 at 12:03 AM, Rajith Roshan  wrote:

>
>
> On Thu, Mar 23, 2017 at 11:50 PM, Malintha Amarasinghe  > wrote:
>
>> Hi Rajith,
>>
>> I think what we need to include here is not the full API object, but an
>> object that has minimal information of an API or an Application such as
>> name and version (E.g like the list of minimal API info objects we are
>> returning from GET /apis ). So I guess it will not do harm although we do
>> not filter that out since it does not contain any sensitive information.
>>
> +1
>
>>
>> IMO 2nd approach is cleaner than the first approach. May be we can rename
>> them as apiInfo and applicationInfo, just a thought.
>>
>> Thanks!
>>
>> On Thu, Mar 23, 2017 at 11:19 PM, Rajith Roshan  wrote:
>>
>>> Hi
>>>
>>> On Thu, Mar 23, 2017 at 11:33 AM, Anuruddha Liyanarachchi <
>>> anurudd...@wso2.com> wrote:
>>>
 Hi,

 As per the current publisher REST API [1], there is a resource to get
 the subscription for a given API.

 This returns the following subscriptionDTO with subscription details
 and IDs of other objects associated with it (applicationId, apiId).

 @JsonProperty("subscriptionId")
 private String subscriptionId = null;

 @JsonProperty("applicationId")
 private String applicationId = null;

 @JsonProperty("apiId")
 private String apiId = null;

 @JsonProperty("subscriptionTier")
 private String subscriptionTier = null;

 @JsonProperty("subscriptionStatus")
 private SubscriptionStatusEnum subscriptionStatus = null;

 For the UI we need the application name and API name to be displayed
 along with the subscription status.

 In order to do get APP_NAME and API_NAME, we need to do two additional
 network calls with apiID and applicationID to two different resources.

 Therefore if we are to display 10 subscriptions in the UI we need to do
 21 network calls.

  1. One network call to get list of subscriptions which return List
 with 10 subscription DTO objects (1 network call)
 *publisher/v1/subscriptions?api_id=fe855359-b3fd-4bbf-8f5c-6fb3f020011e*

  2. For each subscriptionDTO, we need to do 2 network calls to get API
 name and Application Name. (2 * 10 = 20 network calls)
 *publisher/v1/apis?api_id=fe855359-b3fd-4bbf-8f5c-6fb3f020011e*
 *publisher/v1/applications?**application_id*
 *=fe855359-b3fd-4bbf-8f5c-6fb3f020011e*

 There are two ways to handle this.

 1. Include the API_NAME and APPLICATION_NAME in the same DTO.
 @JsonProperty("applicationName")
 private String applicationName = null;

 @JsonProperty("apiName")
 private String apiName = null;


 2. Include the *API* *object* and *Application* *object* in the
 subscription DAO with required fields populated.
 @JsonProperty("applicationObj")
 private Application applicationObj = null;

 @JsonProperty("apiObj")
 private API apiObj = null;

 IMO 2nd approach is more suitable. Please share your thoughts.

>>>
>>> Are we going to filter out API object from subscription dto if the
>>> particular user only have "apim:subscription_view" scope .(not
>>> apim:api_view scope)
>>>

 [1] https://github.com/wso2/carbon-apimgt/blob/master/compon
 ents/apimgt/org.wso2.carbon.apimgt.rest.api.publisher/src/ma
 in/resources/publisher-api.yaml
 
 --
 Thanks and Regards,
 Anuruddha Lanka Liyanarachchi
 Software Engineer - WSO2
 Mobile : +94 (0) 712762611 <+94%2071%20276%202611>
 Tel  : +94 112 145 345 <+94%2011%202%20145345>
 anurudd...@wso2.com

 --
 *Thanks and Regards,*
 Anuruddha Lanka Liyanarachchi
 Software Engineer - WSO2
 Mobile : +94 (0) 712762611
 Tel  : +94 112 145 345
 a nurudd...@wso2.com

>>>
>>>
>>>
>>> --
>>> Rajith Roshan
>>> Software Engineer, WSO2 Inc.
>>> Mobile: +94-72-642-8350 <%2B94-71-554-8430>
>>>
>>
>>
>>
>> --
>> Malintha Amarasinghe
>> Software Engineer
>> *WSO2, Inc. - lean | enterprise | middleware*
>> http://wso2.com/
>>
>> Mobile : +94 712383306 <+94%2071%20238%203306>
>>
>
>
>
> --
> Rajith Roshan
> Software Engineer, WSO2 Inc.
> Mobile: +94-72-642-8350 <%2B94-71-554-8430>
>



-- 
Harsha Kumara
Software Engineer, WSO2 Inc.
Mobile: +94775505618
Blog:harshcreationz.blogspot.com
___
Dev mailing list
Dev@wso2.org

Re: [Dev] [APIM_REST_API] What are the properties to include in DTO

2017-03-23 Thread Rajith Roshan
On Thu, Mar 23, 2017 at 11:50 PM, Malintha Amarasinghe 
wrote:

> Hi Rajith,
>
> I think what we need to include here is not the full API object, but an
> object that has minimal information of an API or an Application such as
> name and version (E.g like the list of minimal API info objects we are
> returning from GET /apis ). So I guess it will not do harm although we do
> not filter that out since it does not contain any sensitive information.
>
+1

>
> IMO 2nd approach is cleaner than the first approach. May be we can rename
> them as apiInfo and applicationInfo, just a thought.
>
> Thanks!
>
> On Thu, Mar 23, 2017 at 11:19 PM, Rajith Roshan  wrote:
>
>> Hi
>>
>> On Thu, Mar 23, 2017 at 11:33 AM, Anuruddha Liyanarachchi <
>> anurudd...@wso2.com> wrote:
>>
>>> Hi,
>>>
>>> As per the current publisher REST API [1], there is a resource to get
>>> the subscription for a given API.
>>>
>>> This returns the following subscriptionDTO with subscription details and
>>> IDs of other objects associated with it (applicationId, apiId).
>>>
>>> @JsonProperty("subscriptionId")
>>> private String subscriptionId = null;
>>>
>>> @JsonProperty("applicationId")
>>> private String applicationId = null;
>>>
>>> @JsonProperty("apiId")
>>> private String apiId = null;
>>>
>>> @JsonProperty("subscriptionTier")
>>> private String subscriptionTier = null;
>>>
>>> @JsonProperty("subscriptionStatus")
>>> private SubscriptionStatusEnum subscriptionStatus = null;
>>>
>>> For the UI we need the application name and API name to be displayed
>>> along with the subscription status.
>>>
>>> In order to do get APP_NAME and API_NAME, we need to do two additional
>>> network calls with apiID and applicationID to two different resources.
>>>
>>> Therefore if we are to display 10 subscriptions in the UI we need to do
>>> 21 network calls.
>>>
>>>  1. One network call to get list of subscriptions which return List with
>>> 10 subscription DTO objects (1 network call)
>>> *publisher/v1/subscriptions?api_id=fe855359-b3fd-4bbf-8f5c-6fb3f020011e*
>>>
>>>  2. For each subscriptionDTO, we need to do 2 network calls to get API
>>> name and Application Name. (2 * 10 = 20 network calls)
>>> *publisher/v1/apis?api_id=fe855359-b3fd-4bbf-8f5c-6fb3f020011e*
>>> *publisher/v1/applications?**application_id*
>>> *=fe855359-b3fd-4bbf-8f5c-6fb3f020011e*
>>>
>>> There are two ways to handle this.
>>>
>>> 1. Include the API_NAME and APPLICATION_NAME in the same DTO.
>>> @JsonProperty("applicationName")
>>> private String applicationName = null;
>>>
>>> @JsonProperty("apiName")
>>> private String apiName = null;
>>>
>>>
>>> 2. Include the *API* *object* and *Application* *object* in the
>>> subscription DAO with required fields populated.
>>> @JsonProperty("applicationObj")
>>> private Application applicationObj = null;
>>>
>>> @JsonProperty("apiObj")
>>> private API apiObj = null;
>>>
>>> IMO 2nd approach is more suitable. Please share your thoughts.
>>>
>>
>> Are we going to filter out API object from subscription dto if the
>> particular user only have "apim:subscription_view" scope .(not
>> apim:api_view scope)
>>
>>>
>>> [1] https://github.com/wso2/carbon-apimgt/blob/master/compon
>>> ents/apimgt/org.wso2.carbon.apimgt.rest.api.publisher/src/ma
>>> in/resources/publisher-api.yaml
>>> 
>>> --
>>> Thanks and Regards,
>>> Anuruddha Lanka Liyanarachchi
>>> Software Engineer - WSO2
>>> Mobile : +94 (0) 712762611 <+94%2071%20276%202611>
>>> Tel  : +94 112 145 345 <+94%2011%202%20145345>
>>> anurudd...@wso2.com
>>>
>>> --
>>> *Thanks and Regards,*
>>> Anuruddha Lanka Liyanarachchi
>>> Software Engineer - WSO2
>>> Mobile : +94 (0) 712762611
>>> Tel  : +94 112 145 345
>>> a nurudd...@wso2.com
>>>
>>
>>
>>
>> --
>> Rajith Roshan
>> Software Engineer, WSO2 Inc.
>> Mobile: +94-72-642-8350 <%2B94-71-554-8430>
>>
>
>
>
> --
> Malintha Amarasinghe
> Software Engineer
> *WSO2, Inc. - lean | enterprise | middleware*
> http://wso2.com/
>
> Mobile : +94 712383306 <+94%2071%20238%203306>
>



-- 
Rajith Roshan
Software Engineer, WSO2 Inc.
Mobile: +94-72-642-8350 <%2B94-71-554-8430>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [APIM_REST_API] What are the properties to include in DTO

2017-03-23 Thread Malintha Amarasinghe
Hi Rajith,

I think what we need to include here is not the full API object, but an
object that has minimal information of an API or an Application such as
name and version (E.g like the list of minimal API info objects we are
returning from GET /apis ). So I guess it will not do harm although we do
not filter that out since it does not contain any sensitive information.

IMO 2nd approach is cleaner than the first approach. May be we can rename
them as apiInfo and applicationInfo, just a thought.

Thanks!

On Thu, Mar 23, 2017 at 11:19 PM, Rajith Roshan  wrote:

> Hi
>
> On Thu, Mar 23, 2017 at 11:33 AM, Anuruddha Liyanarachchi <
> anurudd...@wso2.com> wrote:
>
>> Hi,
>>
>> As per the current publisher REST API [1], there is a resource to get the
>> subscription for a given API.
>>
>> This returns the following subscriptionDTO with subscription details and
>> IDs of other objects associated with it (applicationId, apiId).
>>
>> @JsonProperty("subscriptionId")
>> private String subscriptionId = null;
>>
>> @JsonProperty("applicationId")
>> private String applicationId = null;
>>
>> @JsonProperty("apiId")
>> private String apiId = null;
>>
>> @JsonProperty("subscriptionTier")
>> private String subscriptionTier = null;
>>
>> @JsonProperty("subscriptionStatus")
>> private SubscriptionStatusEnum subscriptionStatus = null;
>>
>> For the UI we need the application name and API name to be displayed
>> along with the subscription status.
>>
>> In order to do get APP_NAME and API_NAME, we need to do two additional
>> network calls with apiID and applicationID to two different resources.
>>
>> Therefore if we are to display 10 subscriptions in the UI we need to do
>> 21 network calls.
>>
>>  1. One network call to get list of subscriptions which return List with
>> 10 subscription DTO objects (1 network call)
>> *publisher/v1/subscriptions?api_id=fe855359-b3fd-4bbf-8f5c-6fb3f020011e*
>>
>>  2. For each subscriptionDTO, we need to do 2 network calls to get API
>> name and Application Name. (2 * 10 = 20 network calls)
>> *publisher/v1/apis?api_id=fe855359-b3fd-4bbf-8f5c-6fb3f020011e*
>> *publisher/v1/applications?**application_id*
>> *=fe855359-b3fd-4bbf-8f5c-6fb3f020011e*
>>
>> There are two ways to handle this.
>>
>> 1. Include the API_NAME and APPLICATION_NAME in the same DTO.
>> @JsonProperty("applicationName")
>> private String applicationName = null;
>>
>> @JsonProperty("apiName")
>> private String apiName = null;
>>
>>
>> 2. Include the *API* *object* and *Application* *object* in the
>> subscription DAO with required fields populated.
>> @JsonProperty("applicationObj")
>> private Application applicationObj = null;
>>
>> @JsonProperty("apiObj")
>> private API apiObj = null;
>>
>> IMO 2nd approach is more suitable. Please share your thoughts.
>>
>
> Are we going to filter out API object from subscription dto if the
> particular user only have "apim:subscription_view" scope .(not
> apim:api_view scope)
>
>>
>> [1] https://github.com/wso2/carbon-apimgt/blob/master/compon
>> ents/apimgt/org.wso2.carbon.apimgt.rest.api.publisher/src/
>> main/resources/publisher-api.yaml
>> 
>> --
>> Thanks and Regards,
>> Anuruddha Lanka Liyanarachchi
>> Software Engineer - WSO2
>> Mobile : +94 (0) 712762611 <+94%2071%20276%202611>
>> Tel  : +94 112 145 345 <+94%2011%202%20145345>
>> anurudd...@wso2.com
>>
>> --
>> *Thanks and Regards,*
>> Anuruddha Lanka Liyanarachchi
>> Software Engineer - WSO2
>> Mobile : +94 (0) 712762611
>> Tel  : +94 112 145 345
>> a nurudd...@wso2.com
>>
>
>
>
> --
> Rajith Roshan
> Software Engineer, WSO2 Inc.
> Mobile: +94-72-642-8350 <%2B94-71-554-8430>
>



-- 
Malintha Amarasinghe
Software Engineer
*WSO2, Inc. - lean | enterprise | middleware*
http://wso2.com/

Mobile : +94 712383306
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [carbondump] Updating carbondump.sh for Java 8

2017-03-23 Thread Milinda Perera
Hi,

In carbondump.sh [1] we retrieve  permgen stats in Java Heap (jmap
-permstat $PID) . Since Java 8 onwards, it is replaced by Metaspace and
permstat option is no longer exists in jmap tool.

Metaspace can be retrieved by: jmap -clstats 

Shall we remove permstat and replace with clstats or just remove retrieving
permgen stats? Is  Is it useful retrieving permstat or clstats to figure
out errors?
Whether it may effect on the running server?

[1]
https://docs.wso2.com/display/ADMIN44x/Capturing+System+Data+in+Error+Situations

Thanks,
Milinda

-- 
Milinda Perera
Senior Software Engineer;
WSO2 Inc. http://wso2.com ,
Mobile: (+94) 714 115 032
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Environments Support for WSO2 API Manager

2017-03-23 Thread Ravindu Perera
Hi
This was about the the problem which was mentioned about the authentication
should be done after switching from one environment to another as i did a
small research and found out a solution , For example if we need to move
from Dev environment to production environment an authentication should be
done because the same auth token cannot be used. instead of logging again
when the user logs in to one environment initially in the authentication
stage we can have a built-in method which will generate token to other
environments as well so , then by using the tokens generated without
redirecting a login can directly access the other environments.

This is one solution that i found after doing a small research , so the
solution will help to overcome the problem , but i just gave an idea but
there may be better solutions .

Thank you
Regards
Ravindu


On Wed, Mar 22, 2017 at 1:08 AM, Ravindu Perera 
wrote:

> Hi
> I wrote a blog post on how to build WSO2 API Manager from code base step
> by step , and more blog post coming up about UUF-Framework and working with
> it . I also went through Swagger js as well , and i forked the code from
> GitHub and working on coding part in-order to get familiarized with coding
> and coding standards as well.
>
> blog post link :-http://ravinduperer.blogspot.com/2017/03/wso2-
> building-api-manager-from-codebase.html.
>
> Thank you.
>
> On Mon, Mar 20, 2017 at 9:21 PM, Ravindu Perera  > wrote:
>
>> Thanks a lot Mr Nuwan Dias
>>
>> The information provide was really helpful to understand the overall
>> requirement and the architecture of the project , and with these
>> information that was provide i am focusing on frameworks for creating the
>> user-interface which UUF-Framework and also the Swagger-JS client library
>> to call REST APIs.
>>
>> And Once again thank you.
>>
>> On Mon, Mar 20, 2017 at 2:00 PM, Nuwan Dias  wrote:
>>
>>> Hi Ravindu,
>>>
>>> The below diagram might help you to understand this better.
>>>
>>> [image: Inline image 2]
>>>
>>> The API Manager UI is built following a Single Page Application
>>> architecture. Which means the UI rendering code runs mostly on the client
>>> (web browser). The data is fetched to the client using Rest APIs which
>>> reside on the "Core". This single page application is hosted on server. In
>>> this particular project, what we're trying to do is to make the UI app
>>> (SPA) aware of "Cores" residing in different environments. So that when
>>> someone switches environments, the client (browser) connects to the Rest
>>> API in the respective environment to fetch data.
>>>
>>> So what really changes when you switch environments is the data. For
>>> example, in you dev environment if you have 5 APIs and your prod
>>> environment you just have two APIs. When you switch from dev to prod, the 5
>>> dev APIs should vanish and the 2 prod APIs should appear on your page. The
>>> surrounding layout, style, colors and stuff would remain the same since
>>> they're being served from a single app (SPA), its just the data that
>>> changes since those are being served by Rest APIs in respective
>>> environments.
>>>
>>> Thanks,
>>> NuwanD.
>>>
>>> On Sat, Mar 18, 2017 at 5:47 AM, Ravindu Perera <
>>> ravindu.2014...@iit.ac.lk> wrote:
>>>
 Hi

 I have an question regarding the UI about what are the changes that
 should be made when the API Manager changes its Environment.

 Eg:- lets say i have Dev server and then it switches to a production
 server what are the UI changes that should actually occur when the
 switching between Environments and where should it change can you all
 provide a bit more information because this will help me to understand the
 project more deeply

 Thank you
 Ravindu.


 On Fri, Mar 17, 2017 at 12:00 AM, Ravindu Perera <
 ravindu.2014...@iit.ac.lk> wrote:

> Thanks alot Kasun
>
> I have started writing the proposal for the project , if i have more
> problems i will ask for help , and is it possible to request and KT 
> session
> Knowledge transfer session on this particular project if it is possible to
> get more and additional knowledge , It would be really helpful session via
> hangouts or any form of communication  .
>
> Ravindu
>
> On Thu, Mar 16, 2017 at 8:03 AM, Kasun Thennakoon 
> wrote:
>
>> Hi Ravindi,
>>
>> Sorry for the delay in reply, great to see your progress on the
>> project.
>> let me give answers for above 2 questions:
>>
>> Question 1.
>>
>> Currently, we don't have such an API to get the environment details,
>> But what we are planning to do is, keep that environment information 
>> within
>> in the web app(UUF App) as a configuration parameter, and then by using
>> that configuration, we can give an option to switch between those

[Dev] [IS 6.0.0][M5] Ensuring Proper Internationalization of UIs in Portal Apps

2017-03-23 Thread Pushpalanka Jayawardhana
Hi All,

Do we have any automated mechanism to check the UIs for proper
internationalization support ?
Or do we have to make sure of this manually and validate at code reviews?

Thanks,
-- 
Pushpalanka Jayawardhana, B.Sc.Eng.(Hons).
Senior Software Engineer, WSO2 Lanka (pvt) Ltd;  wso2.com/
Mobile: +94779716248
Blog: pushpalankajaya.blogspot.com/ | LinkedIn:
lk.linkedin.com/in/pushpalanka/ | Twitter: @pushpalanka
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Use char array as micro service parameter

2017-03-23 Thread Ayoma Wijethunga
Hi Jude,

I think you got me wrong. StringBuilder internally uses char[] to store
values (mutable sequence of characters [1] [2]). Therefore, we will not be
creating (and leaving behind) immutable String objects as long as we use
the StringBuilder properly.

However, if you accidentally call a method such as stringBuilder.toString()
or stringBuilder.append(String str) you will end up creating a immutable
String in the memory. This is what I was trying to imply with my sentence.

We should not really depend on garbage collection for any data structure
storing passwords. If we are going to depend on GC for Arrays, there is no
point of *not* using String. Instead, since "char" is a mutable primitive,
it's possible to change the value to as desired (where as Strings are
immutable). Therefore, after storing password in a char[] or a
StringBuilder (which internally uses a char[]) you should clear the data,
before leaving the reference for GC to pickup, to make sure memory is
clean.

However there is one issue associated with using StringBuilder for password
storage. StringBuilder has a mechanism used to grow the char[] used
internal, when such expansion is required
(AbstractStringBuilder.expandCapacity). This can leave behind arrays that
are not properly cleared in memory. This too can be addressed by setting
proper initialCapacity when creating StringBuilder.

Anyhow, during offline discussion we identified that why Thusitha
suggested StringBuilder here was because, MSF4J by default
supports StringBuilder as a parameter type. However, with further checking
we identified that this StringBuilder is creating using Strings in MSF4J
level. Therefore, instead of going through the StringBuilder approach, we
will be directly using Byte stream of the request to ready passwords out
into char[] which is much clearer and does not introduce any immutable
Strings.

[1] https://docs.oracle.com/javase/7/docs/api/java/lang/StringBuilder.html
[2] http://developer.classpath.org/doc/java/lang/StringBuilder-source.html

Best Regards,
Ayoma.


On Thu, Mar 23, 2017 at 9:19 PM, Jude Niroshan 
wrote:

> We just need to avoid using any method that accepts or returns a String in 
> StringBuilder,
>> to avoid intermediate level Strings.
>
>
> ​I believe you are well aware about why the Strings and other sort of
> objects being discouraged to be used for passwords and other valuable
> information. It simply not to retain any information anywhere in heap or
> other intermediate volatile memory. Arrays can be quickly garbage collected
> and that valuable information can not be extracted again. ​
>
> http://stackoverflow.com/q/8881291/4506140
>
> Hope it helps :)
>
> Regards,
> Jude
>
>
> On Thu, Mar 23, 2017 at 3:42 PM, Ayoma Wijethunga  wrote:
>
>> Yes. That seems to address the requirement.
>>
>> We can accept InputStream as a parameter and then use the input stream to
>> read characters into a StringBuilder. I hope this was what you were
>> suggesting and this is supported with MSF4J.
>>
>> We just need to avoid using any method that accepts or returns a String
>> in StringBuilder, to avoid intermediate level Strings.
>>
>> Best Regards,
>> Ayoma.
>>
>> On Thu, Mar 23, 2017 at 3:17 PM, Thusitha Thilina Dayaratne <
>> thusit...@wso2.com> wrote:
>>
>>> Hi All,
>>>
>>> AFAIU char[] is not compliant with neither QueryParam nor FormParam
>>> according to [1]. Therefore from MSF4J (as a JAXRS engine) IMHO we couldn't
>>> support char[].
>>> What if we use StringBuilder instead of String. Then we can delete the
>>> StringBuilder as we want. WDYT?
>>>
>>> [1] - http://docs.oracle.com/javaee/7/api/javax/ws/rs/FormParam.html
>>>
>>> Thanks
>>>
>>> On Thu, Mar 23, 2017 at 3:10 PM, Denuwanthi De Silva <
>>> denuwan...@wso2.com> wrote:
>>>
 Hi,

 I have  a micro service which calls a password validation back end.
 For that, it passes the password as microservice parameter.

 Due to security concerns we need to pass password as a char array
 instead of a String[1].

 The password value is retrieved using jquery input field call and
 passed as a char array.
 Then it is passed to the microservice via an ajax call. But the
 micorservice method Params does not support char[] type[1].

 Is there a way we can handle this without involving String type in the
 intermediate level?



 [1]https://nvisium.com/blog/2016/03/31/secure-password-strings/
 [2]https://jersey.java.net/apidocs/2.7/jersey/javax/ws/rs/Qu
 eryParam.html


 Thanks,
 --
 Denuwanthi De Silva
 Senior Software Engineer;
 WSO2 Inc.; http://wso2.com,
 Email: denuwan...@wso2.com
 Blog: https://denuwanthi.wordpress.com/

>>>
>>>
>>>
>>> --
>>> Thusitha Dayaratne
>>> WSO2 Inc. - lean . enterprise . middleware |  wso2.com
>>>
>>> Mobile  +94712756809 <+94%2071%20275%206809>
>>> Blog  alokayasoya.blogspot.com
>>> About

Re: [Dev] [GSoC 2017][ESB]Native inbound and connector for IBM MQ 8.0

2017-03-23 Thread Chanaka Balasooriya
Hi Dushan,

Thank you for your question because it made me to study more about the
project.

Using native IBM classes to communicate with IBM MQ, increases the
performance and gives more ibm mq specific features such as

SSL authentication, connection caching and more message handling options.
 [1] that you provided uses ibm jars written for jms transport and

we can write inbound that uses only ibm mq java classes by avoiding jms.jar
dependencies as  I have tried in [2].

[1]
https://github.com/Kirishanthy/IBM-MQ-J/tree/master/ibmmq-inbound-endpoint-1.0.0/src/main/java/org/wso2/carbon/inbound/ibmmq/poll

[2] https://github.com/chanakadinesh/MQ-Client


Thanks,

On Tue, Mar 21, 2017 at 9:39 AM, Dushan Abeyruwan  wrote:

> Hi All,
>  Can you explain or distinguish the effort from [1]? what sort of
> additional features can we expect from Inbound EP for 8.0?
>
> [1] https://github.com/Kirishanthy/IBM-MQ-J/tree/master/
> ibmmq-inbound-endpoint-1.0.0/src/main/java/org/wso2/carbon/
> inbound/ibmmq/poll
>
> Cheers,
> Dushan
>
> On Mon, Mar 20, 2017 at 3:41 AM, Chanaka Balasooriya  > wrote:
>
>> Hi Malaka,
>>
>> Need some clarifications,
>>
>>
>> As you can see in the sample that I implemented [1] I have used
>> asynchronous message listener which is provided by JMS, for the consumer
>>
>> to retrieve messages from the server. Is it ok to use that JMS listener
>>
>> when implementing inbound or do I need to look for a pattern like pooling
>> for message retrieving in consumer?
>>
>> [1] https://github.com/chanakadinesh/MQ-Client/blob/master/s
>> rc/main/java/esb/wso2/org/client/MQConsumer.java
>>
>> Thanks,
>>
>>
>> On Mon, Mar 20, 2017 at 10:14 AM, Malaka Silva  wrote:
>>
>>> Looks good
>>>
>>> On Sun, Mar 19, 2017 at 1:29 PM, Chanaka Balasooriya <
>>> chanaka...@gmail.com> wrote:
>>>
 Hi Malaka,

 As you suggested, I implemented a simple method for generating
 SSLContext by reading trustStore and keyStore files [1].

 So those System properties were removed. For now this was checked only
 for self-signed certificates and I will try to use WSO2 ESB default
 trustStore and KeyStore files

 to generate this SSL Contex later.

 [1] https://github.com/chanakadinesh/MQ-Client/blob/master/src/m
 ain/java/esb/wso2/org/client/MQConnectionBuilder.java

 Thanks,

 On Sun, Mar 19, 2017 at 5:41 AM, Malaka Silva  wrote:

> Hi Chanaka,
>
> This looks good so far.
>
> Can we check if it is possible to have an alternative way to set SSL
> details other than system properties with IBM MQ client libraries.
>
> The reason for that is we are limiting our self to one set of
> properties per JVM.
>
> eg: System.setProperty(
>
> On Sat, Mar 18, 2017 at 11:41 PM, Chanaka Balasooriya <
> chanaka...@gmail.com> wrote:
>
>> Hi Malaka,
>>
>> After some effort I could upgrade MQ-Client [1] that I created
>> earlier, to establish SSL connections with IBM WebSphere MQ.
>> Please have a look.
>>
>> Here I used SSL_RSA_WITH_3DES_EDE_CBC_SHA Cipher Suit and IBM MQ
>> self signed certificate.
>> During that implementation I could realized that even though IBM MQ
>> supports a long list of cipher suits only few cipher suits are supported 
>> for
>> Oracal Java JVM. So I will list down all possible ciper-suits in near
>> future.
>>
>> Now I believe that I have a solid background of the project idea and
>> am looking forward to do this in GSoC.
>>
>> [1]https://github.com/chanakadinesh/MQ-Client
>>
>> Thanks,
>>
>> On Mon, Mar 13, 2017 at 6:15 PM, Malaka Silva 
>> wrote:
>>
>>> Hi Chanaka,
>>>
>>> Also better to think about how to secure the connections with
>>> credentials and SSL.
>>>
>>> On Mon, Mar 13, 2017 at 11:04 AM, Chanaka Balasooriya <
>>> chanaka...@gmail.com> wrote:
>>>
 Hi Malaka,

 I've been studying specifications of using native IBM MQ jars with
 the help of resources you sent and I could understand that It gives 
 more
 flexibility on configuring
 connections and some binding options.

 I tried to implement sample MQ-Client [1] that can connect to IBM
 MQ without .binding file and we can improve that to implement inbound
 endpoint and the connector. please have a look.
 I am going to improve that MQ-Client to support more ibm specific
 options such as SSL connections within next few days.

 [1]https://github.com/chanakadinesh/MQ-Client

 Thanks,

 On Thu, Mar 2, 2017 at 4:51 PM, Malaka Silva 
 wrote:

> Hi Chanaka,
>
> Following will help.
>
> [1] 

Re: [Dev] Use char array as micro service parameter

2017-03-23 Thread Jude Niroshan
>
> We just need to avoid using any method that accepts or returns a String in 
> StringBuilder,
> to avoid intermediate level Strings.


​I believe you are well aware about why the Strings and other sort of
objects being discouraged to be used for passwords and other valuable
information. It simply not to retain any information anywhere in heap or
other intermediate volatile memory. Arrays can be quickly garbage collected
and that valuable information can not be extracted again. ​

http://stackoverflow.com/q/8881291/4506140

Hope it helps :)

Regards,
Jude


On Thu, Mar 23, 2017 at 3:42 PM, Ayoma Wijethunga  wrote:

> Yes. That seems to address the requirement.
>
> We can accept InputStream as a parameter and then use the input stream to
> read characters into a StringBuilder. I hope this was what you were
> suggesting and this is supported with MSF4J.
>
> We just need to avoid using any method that accepts or returns a String in 
> StringBuilder,
> to avoid intermediate level Strings.
>
> Best Regards,
> Ayoma.
>
> On Thu, Mar 23, 2017 at 3:17 PM, Thusitha Thilina Dayaratne <
> thusit...@wso2.com> wrote:
>
>> Hi All,
>>
>> AFAIU char[] is not compliant with neither QueryParam nor FormParam
>> according to [1]. Therefore from MSF4J (as a JAXRS engine) IMHO we couldn't
>> support char[].
>> What if we use StringBuilder instead of String. Then we can delete the
>> StringBuilder as we want. WDYT?
>>
>> [1] - http://docs.oracle.com/javaee/7/api/javax/ws/rs/FormParam.html
>>
>> Thanks
>>
>> On Thu, Mar 23, 2017 at 3:10 PM, Denuwanthi De Silva > > wrote:
>>
>>> Hi,
>>>
>>> I have  a micro service which calls a password validation back end.
>>> For that, it passes the password as microservice parameter.
>>>
>>> Due to security concerns we need to pass password as a char array
>>> instead of a String[1].
>>>
>>> The password value is retrieved using jquery input field call and passed
>>> as a char array.
>>> Then it is passed to the microservice via an ajax call. But the
>>> micorservice method Params does not support char[] type[1].
>>>
>>> Is there a way we can handle this without involving String type in the
>>> intermediate level?
>>>
>>>
>>>
>>> [1]https://nvisium.com/blog/2016/03/31/secure-password-strings/
>>> [2]https://jersey.java.net/apidocs/2.7/jersey/javax/ws/rs/Qu
>>> eryParam.html
>>>
>>>
>>> Thanks,
>>> --
>>> Denuwanthi De Silva
>>> Senior Software Engineer;
>>> WSO2 Inc.; http://wso2.com,
>>> Email: denuwan...@wso2.com
>>> Blog: https://denuwanthi.wordpress.com/
>>>
>>
>>
>>
>> --
>> Thusitha Dayaratne
>> WSO2 Inc. - lean . enterprise . middleware |  wso2.com
>>
>> Mobile  +94712756809 <+94%2071%20275%206809>
>> Blog  alokayasoya.blogspot.com
>> Abouthttp://about.me/thusithathilina
>> 
>>
>>
>
>
> --
> Ayoma Wijethunga
> Software Engineer
> Platform Security Team
> WSO2, Inc.; http://wso2.com
> lean.enterprise.middleware
>
> Mobile : +94 (0) 719428123 <+94+(0)+719428123>
> Blog : http://www.ayomaonline.com
> LinkedIn: https://www.linkedin.com/in/ayoma
>
> ___
> 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] Use char array as micro service parameter

2017-03-23 Thread Ayoma Wijethunga
Yes. That seems to address the requirement.

We can accept InputStream as a parameter and then use the input stream to
read characters into a StringBuilder. I hope this was what you were
suggesting and this is supported with MSF4J.

We just need to avoid using any method that accepts or returns a
String in StringBuilder,
to avoid intermediate level Strings.

Best Regards,
Ayoma.

On Thu, Mar 23, 2017 at 3:17 PM, Thusitha Thilina Dayaratne <
thusit...@wso2.com> wrote:

> Hi All,
>
> AFAIU char[] is not compliant with neither QueryParam nor FormParam
> according to [1]. Therefore from MSF4J (as a JAXRS engine) IMHO we couldn't
> support char[].
> What if we use StringBuilder instead of String. Then we can delete the
> StringBuilder as we want. WDYT?
>
> [1] - http://docs.oracle.com/javaee/7/api/javax/ws/rs/FormParam.html
>
> Thanks
>
> On Thu, Mar 23, 2017 at 3:10 PM, Denuwanthi De Silva 
> wrote:
>
>> Hi,
>>
>> I have  a micro service which calls a password validation back end.
>> For that, it passes the password as microservice parameter.
>>
>> Due to security concerns we need to pass password as a char array instead
>> of a String[1].
>>
>> The password value is retrieved using jquery input field call and passed
>> as a char array.
>> Then it is passed to the microservice via an ajax call. But the
>> micorservice method Params does not support char[] type[1].
>>
>> Is there a way we can handle this without involving String type in the
>> intermediate level?
>>
>>
>>
>> [1]https://nvisium.com/blog/2016/03/31/secure-password-strings/
>> [2]https://jersey.java.net/apidocs/2.7/jersey/javax/ws/rs/QueryParam.html
>>
>>
>> Thanks,
>> --
>> Denuwanthi De Silva
>> Senior Software Engineer;
>> WSO2 Inc.; http://wso2.com,
>> Email: denuwan...@wso2.com
>> Blog: https://denuwanthi.wordpress.com/
>>
>
>
>
> --
> Thusitha Dayaratne
> WSO2 Inc. - lean . enterprise . middleware |  wso2.com
>
> Mobile  +94712756809 <+94%2071%20275%206809>
> Blog  alokayasoya.blogspot.com
> Abouthttp://about.me/thusithathilina
> 
>
>


-- 
Ayoma Wijethunga
Software Engineer
Platform Security Team
WSO2, Inc.; http://wso2.com
lean.enterprise.middleware

Mobile : +94 (0) 719428123 <+94+(0)+719428123>
Blog : http://www.ayomaonline.com
LinkedIn: https://www.linkedin.com/in/ayoma
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] How can we add multi language support in javascript files

2017-03-23 Thread SajithAR Ariyarathna
Currently UUF doesn't support i18n in client-side.

@UUF Team,
We need to come up with a solution for client-side i18n. Shall we start a
discussion on this?

Thanks.

On Thu, Mar 23, 2017 at 4:36 PM, Prasanna Dangalla 
wrote:

> Hi Sajith,
>
> This is for Client-side JS
>
> *Prasanna Dangalla*
> Senior Software Engineer, WSO2, Inc.; http://wso2.com/
> lean.enterprise.middleware
>
>
> *cell: +94 718 11 27 51*
> *twitter: @prasa77*
>
> On Thu, Mar 23, 2017 at 2:54 PM, SajithAR Ariyarathna 
> wrote:
>
>> Hi Prasanna,
>>
>> Is there a mechanism defined to use something like i18n in javascript ?
>>
>> Server-side JS or Client-side JS?
>>
>> On Thu, Mar 23, 2017 at 11:02 AM, Ayesha Dissanayaka 
>> wrote:
>>
>>> Hi Prasanna,
>>>
>>> Similar discussion was started sometime back in [1].
>>> Issues in [2], [3] have some suggestions.
>>>
>>> [1] [Dev][UUF][IS-6] Enable i18n support in javascript
>>> [2] https://github.com/wso2/carbon-uuf/issues/160
>>> [3] https://github.com/wso2/carbon-uuf/issues/166
>>>
>>> @Ayesha: As I understood all these are done for server side JS, I'm
> wondering about client side JS.
>
>
>>
>>> On Thu, Mar 23, 2017 at 10:46 AM, Pubudu Gunatilaka 
>>> wrote:
>>>
 Adding Manu and Sajith.

 On Thu, Mar 23, 2017 at 10:44 AM, Prasanna Dangalla 
 wrote:

> Hi Nisala,
>
> I was wondering how to include this in javascript files, not in hbs
> files. Is there a way to include in javascrip fiels ?
>
> Thanks
>
> *Prasanna Dangalla*
> Senior Software Engineer, WSO2, Inc.; http://wso2.com/
> lean.enterprise.middleware
>
>
> *cell: +94 718 11 27 51*
> *twitter: @prasa77*
>
> On Thu, Mar 23, 2017 at 10:33 AM, Nisala Nanayakkara 
> wrote:
>
>> Hi Prasanna,
>>
>> UUF has the capability of facilitating above mentioned scenario. You
>> can define your language property file under the ‘lang’ directory as
>> follows.
>>
>> |src
>> | |main
>> |   | pages/
>> |   | fragments/
>> |   | layouts/
>> |   | modules/
>> |   | lang/
>> |en_US.properties
>> |   | public/
>>
>> After that you can use following code segment to achieve your
>> requirement in your hbs file.
>>
>> {{i18n "my.sample.key"}}
>>
>> Please go through sample app available here[1] if you need more
>> clarification. Moreover you can find actual usage above code segment
>> here[2] and corresponding language file here[3].
>>
>> [1] - https://github.com/wso2/carbon-uuf/tree/master/samples/apps/
>> org.wso2.carbon.uuf.sample.pets-store.app
>> [2] - https://github.com/wso2/carbon-uuf/blob/master/samples/apps/
>> org.wso2.carbon.uuf.sample.pets-store.app/src/main/pages/ind
>> ex.hbs#L16
>> [3] - https://github.com/wso2/carbon-uuf/blob/master/samples/apps/
>> org.wso2.carbon.uuf.sample.pets-store.app/src/main/lang/en_U
>> S.properties
>>
>> Thanks,
>> Nisala
>>
>> On Thu, Mar 23, 2017 at 9:01 AM, Prasanna Dangalla > > wrote:
>>
>>> Hi Devs,
>>>
>>> Is there a mechanism defined to use something like i18n in
>>> javascript ? Does the UUF has the capability of facilitating this ? You
>>> inputs are highly appreciated.
>>>
>>> Thanks
>>>
>>> *Prasanna Dangalla*
>>> Senior Software Engineer, WSO2, Inc.; http://wso2.com/
>>> lean.enterprise.middleware
>>>
>>>
>>> *cell: +94 718 11 27 51*
>>> *twitter: @prasa77*
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> *Nisala Niroshana Nanayakkara,*
>> Software Engineer
>> Mobile:(+94)717600022
>> WSO2 Inc., http://wso2.com/
>>
>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


 --
 *Pubudu Gunatilaka*
 Committer and PMC Member - Apache Stratos
 Software Engineer
 WSO2, Inc.: http://wso2.com
 mobile : +94774078049 <%2B94772207163>


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


>>>
>>>
>>> --
>>> *Ayesha Dissanayaka*
>>> Senior Software Engineer,
>>> WSO2, Inc : http://wso2.com
>>> 
>>> 20, Palm grove Avenue, Colombo 3
>>> E-Mail: aye...@wso2.com 
>>>
>>
>>
>>
>> --
>> Sajith Janaprasad Ariyarathna
>> 

[Dev] PR of Client Connector for WebSocket

2017-03-23 Thread Irunika Weeraratne
Hi all,
Please review and comment on the $subject.
https://github.com/wso2/carbon-transports/pull/260

Thanks and best regards,
Irunika
*Irunika Weeraratne*
*Software Engineer | WSO2, Inc. *
*Email : irun...@wso2.com *
*LinkedIn : https://lk.linkedin.com/in/irunika
*
*Mobile : +94712403314 <+94%2071%20240%203314>*
*Lean . Enterprise . Middleware*
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [Carbon] Error in retrieving thread and heap dumps using carbondump.sh

2017-03-23 Thread Milinda Perera
FTR: This is caused due to new security policy in Ubuntu. Refer [1] for
solution

[1] http://bugs.java.com/bugdatabase/view_bug.do?bug_id=7050524

Thanks,
Milinda

On Tue, Oct 25, 2016 at 11:08 AM, Thilini Cooray  wrote:

> Hi,
>
> I am trying to retrieve thread and heap dumps using carbondump.sh in OS X.
> I tried with both APIM 1.7.0 and 2.0.0 and got following error [1].
> Even though all config and log files gets copied, heap dump and thread
> dump are missing in the output folder.
>
> I observed several command missing issues which are caused due OS X.
> Can't this script is used to get server dumps on OS X?
>
> Any help is highly appreciated.
>
> Command which I used to execute the script
>
> /bin/carbondump.sh -carbonHome  -pid  running server process>
>
> Thanks.
>
> [1]
>
> \ncarbondump.sh##Generating the java memory dump...
>
> Attaching to process ID 1234, please wait...
>
> attach: task_for_pid(1234) failed (5)
>
> Error attaching to process: sun.jvm.hotspot.debugger.DebuggerException:
> Can't attach to the process
>
> 1234: Unable to open socket file: target process not responding or HotSpot
> VM not loaded
>
> The -F option can be used when the target process is not responding
>
> 1234: Unable to open socket file: target process not responding or HotSpot
> VM not loaded
>
> The -F option can be used when the target process is not responding
>
> Attaching to process ID 1234, please wait...
>
> attach: task_for_pid(1234) failed (5)
>
> Error attaching to process: sun.jvm.hotspot.debugger.DebuggerException:
> Can't attach to the process
>
> Attaching to process ID 12391, please wait...
>
> attach: task_for_pid(1234) failed (5)
>
> Error attaching to process: sun.jvm.hotspot.debugger.DebuggerException:
> Can't attach to the process
>
> Attaching to process ID 1234, please wait...
>
> attach: task_for_pid(1234) failed (5)
>
> Error attaching to process: sun.jvm.hotspot.debugger.DebuggerException:
> Can't attach to the process
>
> \ncarbondump.sh##Generating the thread dump...
>
> ^C\ncarbondump.sh##Capturing OS information...
>
> ./wso2am-1.7.0/bin/carbondump.sh: line 187: lsmod: command not found
>
> cat: /proc/meminfo: No such file or directory
>
> cat: /proc/cpuinfo: No such file or directory
>
> netstat: n: unknown or uninstrumented protocol
>
> ./wso2am-1.7.0/bin/carbondump.sh: line 194: dpkg: command not found
>
> ./wso2am-1.7.0/bin/carbondump.sh: line 195: rpm: command not found
>
> ./wso2am-1.7.0/bin/carbondump.sh: line 198: lsmod: command not found
>
> ../wso2am-1.7.0/bin/carbondump.sh: line 198: mawk: command not found
>
> \ncarbondump.sh##Capturing the list of running task in the system...
>
> invalid option or syntax: -b
>
> top usage: top
>
> [-a | -d | -e | -c ]
>
> [-F | -f]
>
> [-h]
>
> [-i ]
>
> [-l ]
>
> [-ncols ]
>
> [-o ] [-O ]
>
> [-R | -r]
>
> [-S]
>
> [-s ]
>
> [-n ]
>
> [-stats ]
>
> [-pid ]
>
> [-user ]
>
> [-U ]
>
> [-u]
>
>
> \ncarbondump.sh##Capturing OS Environment Variables...
>
> \ncarbondump.sh##Generating the checksums of all the files in the
> CARBON_HOME directory...
>
> xargs: md5sum: No such file or directory
>
> //wso2am-1.7.0/bin/carbondump.sh: line 216: mawk: command not found
>
> \ncarbondump.sh##Copying log files...
>
> --
> Best Regards,
>
> *Thilini Cooray*
> Software Engineer
> Mobile : +94 (0) 774 570 112 <%2B94%20%280%29%20774%20570112>
> E-mail : thili...@wso2.com
>
> WSO2 Inc. www.wso2.com
> lean.enterprise.middleware
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Milinda Perera
Senior Software Engineer;
WSO2 Inc. http://wso2.com ,
Mobile: (+94) 714 115 032
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Use char array as micro service parameter

2017-03-23 Thread Thusitha Thilina Dayaratne
Hi All,

AFAIU char[] is not compliant with neither QueryParam nor FormParam
according to [1]. Therefore from MSF4J (as a JAXRS engine) IMHO we couldn't
support char[].
What if we use StringBuilder instead of String. Then we can delete the
StringBuilder as we want. WDYT?

[1] - http://docs.oracle.com/javaee/7/api/javax/ws/rs/FormParam.html

Thanks

On Thu, Mar 23, 2017 at 3:10 PM, Denuwanthi De Silva 
wrote:

> Hi,
>
> I have  a micro service which calls a password validation back end.
> For that, it passes the password as microservice parameter.
>
> Due to security concerns we need to pass password as a char array instead
> of a String[1].
>
> The password value is retrieved using jquery input field call and passed
> as a char array.
> Then it is passed to the microservice via an ajax call. But the
> micorservice method Params does not support char[] type[1].
>
> Is there a way we can handle this without involving String type in the
> intermediate level?
>
>
>
> [1]https://nvisium.com/blog/2016/03/31/secure-password-strings/
> [2]https://jersey.java.net/apidocs/2.7/jersey/javax/ws/rs/QueryParam.html
>
>
> Thanks,
> --
> Denuwanthi De Silva
> Senior Software Engineer;
> WSO2 Inc.; http://wso2.com,
> Email: denuwan...@wso2.com
> Blog: https://denuwanthi.wordpress.com/
>



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

Mobile  +94712756809
Blog  alokayasoya.blogspot.com
Abouthttp://about.me/thusithathilina

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


Re: [Dev] How can we add multi language support in javascript files

2017-03-23 Thread Prasanna Dangalla
Hi Sajith,

This is for Client-side JS

*Prasanna Dangalla*
Senior Software Engineer, WSO2, Inc.; http://wso2.com/
lean.enterprise.middleware


*cell: +94 718 11 27 51*
*twitter: @prasa77*

On Thu, Mar 23, 2017 at 2:54 PM, SajithAR Ariyarathna 
wrote:

> Hi Prasanna,
>
> Is there a mechanism defined to use something like i18n in javascript ?
>
> Server-side JS or Client-side JS?
>
> On Thu, Mar 23, 2017 at 11:02 AM, Ayesha Dissanayaka 
> wrote:
>
>> Hi Prasanna,
>>
>> Similar discussion was started sometime back in [1].
>> Issues in [2], [3] have some suggestions.
>>
>> [1] [Dev][UUF][IS-6] Enable i18n support in javascript
>> [2] https://github.com/wso2/carbon-uuf/issues/160
>> [3] https://github.com/wso2/carbon-uuf/issues/166
>>
>> @Ayesha: As I understood all these are done for server side JS, I'm
wondering about client side JS.


>
>> On Thu, Mar 23, 2017 at 10:46 AM, Pubudu Gunatilaka 
>> wrote:
>>
>>> Adding Manu and Sajith.
>>>
>>> On Thu, Mar 23, 2017 at 10:44 AM, Prasanna Dangalla 
>>> wrote:
>>>
 Hi Nisala,

 I was wondering how to include this in javascript files, not in hbs
 files. Is there a way to include in javascrip fiels ?

 Thanks

 *Prasanna Dangalla*
 Senior Software Engineer, WSO2, Inc.; http://wso2.com/
 lean.enterprise.middleware


 *cell: +94 718 11 27 51*
 *twitter: @prasa77*

 On Thu, Mar 23, 2017 at 10:33 AM, Nisala Nanayakkara 
 wrote:

> Hi Prasanna,
>
> UUF has the capability of facilitating above mentioned scenario. You
> can define your language property file under the ‘lang’ directory as
> follows.
>
> |src
> | |main
> |   | pages/
> |   | fragments/
> |   | layouts/
> |   | modules/
> |   | lang/
> |en_US.properties
> |   | public/
>
> After that you can use following code segment to achieve your
> requirement in your hbs file.
>
> {{i18n "my.sample.key"}}
>
> Please go through sample app available here[1] if you need more
> clarification. Moreover you can find actual usage above code segment
> here[2] and corresponding language file here[3].
>
> [1] - https://github.com/wso2/carbon-uuf/tree/master/samples/apps/
> org.wso2.carbon.uuf.sample.pets-store.app
> [2] - https://github.com/wso2/carbon-uuf/blob/master/samples/apps/
> org.wso2.carbon.uuf.sample.pets-store.app/src/main/pages/index.hbs#L16
> [3] - https://github.com/wso2/carbon-uuf/blob/master/samples/apps/
> org.wso2.carbon.uuf.sample.pets-store.app/src/main/lang/en_U
> S.properties
>
> Thanks,
> Nisala
>
> On Thu, Mar 23, 2017 at 9:01 AM, Prasanna Dangalla 
> wrote:
>
>> Hi Devs,
>>
>> Is there a mechanism defined to use something like i18n in
>> javascript ? Does the UUF has the capability of facilitating this ? You
>> inputs are highly appreciated.
>>
>> Thanks
>>
>> *Prasanna Dangalla*
>> Senior Software Engineer, WSO2, Inc.; http://wso2.com/
>> lean.enterprise.middleware
>>
>>
>> *cell: +94 718 11 27 51*
>> *twitter: @prasa77*
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> *Nisala Niroshana Nanayakkara,*
> Software Engineer
> Mobile:(+94)717600022
> WSO2 Inc., http://wso2.com/
>


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


>>>
>>>
>>> --
>>> *Pubudu Gunatilaka*
>>> Committer and PMC Member - Apache Stratos
>>> Software Engineer
>>> WSO2, Inc.: http://wso2.com
>>> mobile : +94774078049 <%2B94772207163>
>>>
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> *Ayesha Dissanayaka*
>> Senior Software Engineer,
>> WSO2, Inc : http://wso2.com
>> 
>> 20, Palm grove Avenue, Colombo 3
>> E-Mail: aye...@wso2.com 
>>
>
>
>
> --
> Sajith Janaprasad Ariyarathna
> Software Engineer; WSO2, Inc.;  http://wso2.com/
> 
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Use char array as micro service parameter

2017-03-23 Thread Denuwanthi De Silva
Hi,

I have  a micro service which calls a password validation back end.
For that, it passes the password as microservice parameter.

Due to security concerns we need to pass password as a char array instead
of a String[1].

The password value is retrieved using jquery input field call and passed as
a char array.
Then it is passed to the microservice via an ajax call. But the
micorservice method Params does not support char[] type[1].

Is there a way we can handle this without involving String type in the
intermediate level?



[1]https://nvisium.com/blog/2016/03/31/secure-password-strings/
[2]https://jersey.java.net/apidocs/2.7/jersey/javax/ws/rs/QueryParam.html


Thanks,
-- 
Denuwanthi De Silva
Senior Software Engineer;
WSO2 Inc.; http://wso2.com,
Email: denuwan...@wso2.com
Blog: https://denuwanthi.wordpress.com/
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] How can we add multi language support in javascript files

2017-03-23 Thread SajithAR Ariyarathna
Hi Prasanna,

Is there a mechanism defined to use something like i18n in javascript ?

Server-side JS or Client-side JS?

On Thu, Mar 23, 2017 at 11:02 AM, Ayesha Dissanayaka 
wrote:

> Hi Prasanna,
>
> Similar discussion was started sometime back in [1].
> Issues in [2], [3] have some suggestions.
>
> [1] [Dev][UUF][IS-6] Enable i18n support in javascript
> [2] https://github.com/wso2/carbon-uuf/issues/160
> [3] https://github.com/wso2/carbon-uuf/issues/166
>
>
> On Thu, Mar 23, 2017 at 10:46 AM, Pubudu Gunatilaka 
> wrote:
>
>> Adding Manu and Sajith.
>>
>> On Thu, Mar 23, 2017 at 10:44 AM, Prasanna Dangalla 
>> wrote:
>>
>>> Hi Nisala,
>>>
>>> I was wondering how to include this in javascript files, not in hbs
>>> files. Is there a way to include in javascrip fiels ?
>>>
>>> Thanks
>>>
>>> *Prasanna Dangalla*
>>> Senior Software Engineer, WSO2, Inc.; http://wso2.com/
>>> lean.enterprise.middleware
>>>
>>>
>>> *cell: +94 718 11 27 51*
>>> *twitter: @prasa77*
>>>
>>> On Thu, Mar 23, 2017 at 10:33 AM, Nisala Nanayakkara 
>>> wrote:
>>>
 Hi Prasanna,

 UUF has the capability of facilitating above mentioned scenario. You
 can define your language property file under the ‘lang’ directory as
 follows.

 |src
 | |main
 |   | pages/
 |   | fragments/
 |   | layouts/
 |   | modules/
 |   | lang/
 |en_US.properties
 |   | public/

 After that you can use following code segment to achieve your
 requirement in your hbs file.

 {{i18n "my.sample.key"}}

 Please go through sample app available here[1] if you need more
 clarification. Moreover you can find actual usage above code segment
 here[2] and corresponding language file here[3].

 [1] - https://github.com/wso2/carbon-uuf/tree/master/samples/apps/
 org.wso2.carbon.uuf.sample.pets-store.app
 [2] - https://github.com/wso2/carbon-uuf/blob/master/samples/apps/
 org.wso2.carbon.uuf.sample.pets-store.app/src/main/pages/index.hbs#L16
 [3] - https://github.com/wso2/carbon-uuf/blob/master/samples/apps/
 org.wso2.carbon.uuf.sample.pets-store.app/src/main/lang/en_U
 S.properties

 Thanks,
 Nisala

 On Thu, Mar 23, 2017 at 9:01 AM, Prasanna Dangalla 
 wrote:

> Hi Devs,
>
> Is there a mechanism defined to use something like i18n in javascript
> ? Does the UUF has the capability of facilitating this ? You inputs are
> highly appreciated.
>
> Thanks
>
> *Prasanna Dangalla*
> Senior Software Engineer, WSO2, Inc.; http://wso2.com/
> lean.enterprise.middleware
>
>
> *cell: +94 718 11 27 51*
> *twitter: @prasa77*
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


 --
 *Nisala Niroshana Nanayakkara,*
 Software Engineer
 Mobile:(+94)717600022
 WSO2 Inc., http://wso2.com/

>>>
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> *Pubudu Gunatilaka*
>> Committer and PMC Member - Apache Stratos
>> Software Engineer
>> WSO2, Inc.: http://wso2.com
>> mobile : +94774078049 <%2B94772207163>
>>
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> *Ayesha Dissanayaka*
> Senior Software Engineer,
> WSO2, Inc : http://wso2.com
> 
> 20, Palm grove Avenue, Colombo 3
> E-Mail: aye...@wso2.com 
>



-- 
Sajith Janaprasad Ariyarathna
Software Engineer; WSO2, Inc.;  http://wso2.com/

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


[Dev] GSoC Proposal 4

2017-03-23 Thread Thuvarakan Tharmarajasingam
Sir,


I am interested in in the project "
Idea
Plugin for Siddhi
".
I am an undergraduate of Computer Science and Engineering department at
university of Moratuwa, Srilanka. I have good knowledge in Java and more
familiar with IntelliJ IDEA IDE. I have already finished setting up the
development environment. Now I am getting familiar with ANTLR. I Hoping to
work with WSO2 in this year GSoC. Do you have any warm-up/evaluation tasks
for the project?

Thank you

T.Thuvarakan
Undergraduate Student,
Department of Computer Science and Engineering,
University of Moratuwa.
Mobile: +94779304643

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


Re: [Dev] [GSoC 2017][ESB]Native inbound and connector for FTP/SFTP operations

2017-03-23 Thread Hasitha Jayasundara
Hi Malaka,

Jsch is actually a SSH client and there are some tutorials available for
use it with commons net in order to perform FTP and FTPS operations.I've
checked those implementations and all of them are erroneous and not very
reliable.In that case we can use commons net for FTP/FTPS and Jsch for SFTP
and implement two inbounds for ESB while resolving vfs limitations.Based on
these points shall I start writing the proposal?Any comments?

On Thu, Mar 23, 2017 at 7:17 AM, Malaka Silva  wrote:

> +Dev
>
> On Thu, Mar 23, 2017 at 7:16 AM, Malaka Silva  wrote:
>
>>
>>
>> On Wed, Mar 22, 2017 at 10:22 PM, Hasitha Jayasundara <
>> hasithajayasunda...@gmail.com> wrote:
>>
>>> Hi Malaka,
>>>
>>> These are the libraries I came across which I think suitable for this
>>> project.
>>>
>>> 1. ftp4j [1]
>>> 2. Apache commons net [2]
>>> 3. Jsch [3]
>>>
>>> - All the libraries support FTP and FTPS
>>> - Jsch supports SFTP directly while ftp4j can adapt to support SFTP
>>> after some code implementation
>>>
>> ​You mean forking and changing their implementation? If so we usually
>> don't recommend it.​
>>
>>> - commons net doesn't support SFTP
>>> - Connecting over a proxy enabled in all the libraries
>>> - ftp4j is simple and can convert to NIO if needed
>>>
>>> According to these points I think
>>> ​​
>>> Jsch is the most suitable library for the project. If not we can use
>>> ftp4j with some additional code implementations.As Commons net is not
>>> supporting SFTP I think we have some problems in adapting this to the
>>> project. Any suggestions on how to proceed?
>>>
>> ​Does
>> ​
>> Jsch support FTP and FTPS?
>> AFAIK
>> ​i​
>> f you want to use JSch to download/upload files, you need to install and
>> activate an SSH/SFTP server on the computer you want to access
>> ​.​
>> I guess you can combine both commons-net and
>> ​
>> Jsch?​
>>
>>>
>>> [1] http://www.sauronsoftware.it/projects/ftp4j/
>>> [2] https://commons.apache.org/proper/commons-net/
>>> [3] http://www.jcraft.com/jsch/
>>>
>>>
>>> On Wed, Mar 22, 2017 at 3:07 AM, Hasitha Jayasundara <
>>> hasithajayasunda...@gmail.com> wrote:
>>>
 Hi Malaka,

 Thank you for the information.On my research I found this library [1]
 with following features.

- Connecting through a proxy
- FTPS/FTPES secured connection
- Browsing the remote site
- Renaming files and directories
- Moving files and directories
- Deleting files
- Creating and deleting directories
- Listing files, directories and links
- Getting the modification date of files and directories
- Downloading and uploading files
- Active and passive data transfer modes
- Binary and textual data transfer types
- Data transfer compression
- NOOPing the server
- Site specific and custom commands
- Exceptions handling

 I think the library is addressing some limitations in apache vfs , But
 the library is stream oriented (Java - IO) that I think we can convert to
 buffer oriented (Java-NIO) after studying the source [2] which is very
 clear and simple.Any ideas on this?

 [1] http://www.sauronsoftware.it/projects/ftp4j/
 

 [2] https://github.com/asbachb/ftp4j



 On Tue, Mar 21, 2017 at 4:22 PM, Malaka Silva  wrote:

> Hi Hasitha,
>
> Sorry for the late reply. Bit busy this week.
>
> Find my comments.
>
> On Mon, Mar 20, 2017 at 4:04 PM, Hasitha Jayasundara <
> hasithajayasunda...@gmail.com> wrote:
>
>> Hi all,
>>
>> Found that apache mina project [1] is not in an active stage right
>> now and its continuing as the major product netty [2].So I think that 
>> mina
>> is not a solution to the problem. As netty is based on Java nio I'll 
>> have a
>> look and inform you about the possibilty of adapting netty for FTP and 
>> SFTP
>> operations.Any comments on this? It'd be great if you can also recommend
>> additional libraries to look into.
>>
> ​+1 for checking netty ​
>
>>
>> Thanks
>>
>> [1] https://mina.apache.org/sshd-project/
>> [2] https://netty.io/
>>
>> On Mon, Mar 20, 2017 at 1:42 AM, Hasitha Jayasundara <
>> hasithajayasunda...@gmail.com> wrote:
>>
>>> Hi all,
>>>
>>> One objective of this project [1] is to find limitations in commons
>>> vfs.I found some limitations on the following points.
>>>
>>>- client authentication over password / public key
>>>- server authentication
>>>- upload /download files from local host over SFTP
>>>- download files to local host over SFTP
>>>- file operations on the remote host like move, delete, list all
>>>children of a given folder 

Re: [Dev] Creating a widget web-component using existing charting libraries

2017-03-23 Thread Udara Rathnayake
Thanks Tharik!

Updated my wso2-widget WC to use VizGrammer, but it seems we have a bunch
of document.getElementById()s which is not going to search inside shadow
roots. So this is not going to work :( . Let me look into other
alternatives.

On Thu, Mar 23, 2017 at 12:11 PM, Tharik Kanaka  wrote:

> Hi Udara,
>
> Igviz library is no longer used and we have replaced that with VizGrammar.
> In VizGrammar you can use draw() function to draw the chart in a div. If
> you want to insert records to update the chart you can use insert(). You
> can try samples [1] and all the library content along with samples are
> available in  github repository [2].
>
> *var data = {*
> *  "metadata" : {*
> *  "names" : ["rpm","torque","horsepower", "EngineType"],*
> *  "types" : ["linear","linear", "ordinal","ordinal"]*
> *  },*
> *  "data": [*
> *[1, 10, 1, "Piston"],  [2, 12, 5, "Piston"]]*
> *};*
>
> *var config = {*
> *charts : [{type: "area",  x : "rpm", y : "torque"}],*
> *maxLength: 10,*
> *width: 400,*
> *height: 200*
> *}*
>
> *var chart = new vizg(data, **config**);*
>
> *chart.draw("#chartDiv");*
>
> *chart.insert([[8000, 74, 120, "Rotary"]]);*
>
> [1] http://wso2.github.io/VizGrammar/samples/
>
> [2] https://github.com/wso2/VizGrammar/
>
> Thanks,
>
>
> On Thu, Mar 23, 2017 at 11:42 AM, Udara Rathnayake 
> wrote:
>
>> Hi all,
>>
>> I'm trying to create a web component (wso2-widget) to try-out
>> capabilities which we can incorporate in to our widget rendering framework.
>>
>> ​Within my renderWidget function[1] I'm using the usual igviz.plot but
>> unable to draw the chart inside container element which exists inside a
>> shadow-root.​ Did some debugging but unable to find the place which
>> breaks(No errors too).
>>
>> ​Appreciate any feedback on this.​
>>
>> PS:- If you need to try out this, host the source within "wc" branch
>> inside apache2 and use Google chrome.
>>
>> ​[1] https://github.com/udarakr/uuf-sample-gadget/blob/wc/wso2-
>> widget/wso2-widget.comp.html#L121
>>
>> --
>> Regards,
>> UdaraR
>>
>
>
>
> --
>
> *Tharik Kanaka*
>
> WSO2, Inc | lean . enterprise . middleware
>
> Email: tha...@wso2.com | Web: www.wso2.com
>



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


Re: [Dev] [IS 6.0.0] Making native claim dialect configurable

2017-03-23 Thread Pushpalanka Jayawardhana
On Tue, Mar 21, 2017 at 10:56 AM, Godwin Shrimal  wrote:

> If we make native claim dialect configurable, will product work by
> changing to different claim dialect ?
>
That should be the expectation if we make the native claim dialect
configurable.

As of now, we have the native dialect hard coded as at [1]. If make it
configurable, it should come from a configuration file, most suitably
'domain-config.yaml' file.
Appreciate your inputs soon to move forward, as lot of codes and designs
will be affected by this decision.

[1] -
https://github.com/wso2/carbon-identity-mgt/blob/master/components/org.wso2.carbon.identity.mgt/src/main/java/org/wso2/carbon/identity/mgt/impl/util/IdentityMgtConstants.java#L44-L46

>
> Thanks
> Godwin
>
>
> On Mon, Mar 20, 2017 at 4:34 PM, Pushpalanka Jayawardhana 
> wrote:
>
>> +Prabath
>>
>> On Mon, Mar 20, 2017 at 4:33 PM, Pushpalanka Jayawardhana > > wrote:
>>
>>> Hi All,
>>>
>>> Have we made a conclusion on this? Are we expecting to make the native
>>> dialect configurable?
>>> Given that we have claim mapping functionality this won't be a mandatory
>>> requirement. But this has the advantage Omindu mentioned against the
>>> complexities introduced by letting this configurable for username,
>>> groupname etc.
>>>
>>> Thanks,
>>>
>>> On Thu, Feb 23, 2017 at 2:13 PM, Omindu Rathnaweera 
>>> wrote:
>>>
 One of the advantages would be that we can avoid the overhead of claim
 transformation.

 Regards,
 Omindu.

 On Thu, Feb 23, 2017 at 1:53 PM, Omindu Rathnaweera 
 wrote:

> Do we need to make the native claim dialect configurable ? AFAIK it is
> not configurable and we are using a hardcoded constant for the dialect 
> URI (
> http://wso2.org/claims).
>
>
> Regards,
> Omindu
>
> --
> Omindu Rathnaweera
> Software Engineer, WSO2 Inc.
> Mobile: +94 771 197 211 <+94%2077%20119%207211>
>



 --
 Omindu Rathnaweera
 Software Engineer, WSO2 Inc.
 Mobile: +94 771 197 211 <077%20119%207211>

>>>
>>>
>>>
>>> --
>>> Pushpalanka.
>>> --
>>> Pushpalanka Jayawardhana, B.Sc.Eng.(Hons).
>>> Senior Software Engineer, WSO2 Lanka (pvt) Ltd;  wso2.com/
>>> Mobile: +94779716248
>>> Blog: pushpalankajaya.blogspot.com/ | LinkedIn: lk.linkedin.com/in/p
>>> ushpalanka/ | Twitter: @pushpalanka
>>>
>>>
>>
>>
>> --
>> Pushpalanka.
>> --
>> Pushpalanka Jayawardhana, B.Sc.Eng.(Hons).
>> Senior Software Engineer, WSO2 Lanka (pvt) Ltd;  wso2.com/
>> Mobile: +94779716248
>> Blog: pushpalankajaya.blogspot.com/ | LinkedIn: lk.linkedin.com/in/p
>> ushpalanka/ | Twitter: @pushpalanka
>>
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> *Godwin Amila Shrimal*
> WSO2 Inc.; http://wso2.com
> lean.enterprise.middleware
>
> mobile: *+94772264165*
> linkedin: *http://lnkd.in/KUum6D *
> twitter: https://twitter.com/godwinamila
> 
>



-- 
Pushpalanka.
-- 
Pushpalanka Jayawardhana, B.Sc.Eng.(Hons).
Senior Software Engineer, WSO2 Lanka (pvt) Ltd;  wso2.com/
Mobile: +94779716248
Blog: pushpalankajaya.blogspot.com/ | LinkedIn:
lk.linkedin.com/in/pushpalanka/ | Twitter: @pushpalanka
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Creating a widget web-component using existing charting libraries

2017-03-23 Thread Tharik Kanaka
Hi Udara,

Igviz library is no longer used and we have replaced that with VizGrammar.
In VizGrammar you can use draw() function to draw the chart in a div. If
you want to insert records to update the chart you can use insert(). You
can try samples [1] and all the library content along with samples are
available in  github repository [2].

*var data = {*
*  "metadata" : {*
*  "names" : ["rpm","torque","horsepower", "EngineType"],*
*  "types" : ["linear","linear", "ordinal","ordinal"]*
*  },*
*  "data": [*
*[1, 10, 1, "Piston"],  [2, 12, 5, "Piston"]]*
*};*

*var config = {*
*charts : [{type: "area",  x : "rpm", y : "torque"}],*
*maxLength: 10,*
*width: 400,*
*height: 200*
*}*

*var chart = new vizg(data, **config**);*

*chart.draw("#chartDiv");*

*chart.insert([[8000, 74, 120, "Rotary"]]);*

[1] http://wso2.github.io/VizGrammar/samples/

[2] https://github.com/wso2/VizGrammar/

Thanks,


On Thu, Mar 23, 2017 at 11:42 AM, Udara Rathnayake  wrote:

> Hi all,
>
> I'm trying to create a web component (wso2-widget) to try-out capabilities
> which we can incorporate in to our widget rendering framework.
>
> ​Within my renderWidget function[1] I'm using the usual igviz.plot but
> unable to draw the chart inside container element which exists inside a
> shadow-root.​ Did some debugging but unable to find the place which
> breaks(No errors too).
>
> ​Appreciate any feedback on this.​
>
> PS:- If you need to try out this, host the source within "wc" branch
> inside apache2 and use Google chrome.
>
> ​[1] https://github.com/udarakr/uuf-sample-gadget/blob/wc/
> wso2-widget/wso2-widget.comp.html#L121
>
> --
> Regards,
> UdaraR
>



-- 

*Tharik Kanaka*

WSO2, Inc | lean . enterprise . middleware

Email: tha...@wso2.com | Web: www.wso2.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Creating a widget web-component using existing charting libraries

2017-03-23 Thread Udara Rathnayake
Hi all,

I'm trying to create a web component (wso2-widget) to try-out capabilities
which we can incorporate in to our widget rendering framework.

​Within my renderWidget function[1] I'm using the usual igviz.plot but
unable to draw the chart inside container element which exists inside a
shadow-root.​ Did some debugging but unable to find the place which
breaks(No errors too).

​Appreciate any feedback on this.​

PS:- If you need to try out this, host the source within "wc" branch inside
apache2 and use Google chrome.

​[1]
https://github.com/udarakr/uuf-sample-gadget/blob/wc/wso2-widget/wso2-widget.comp.html#L121

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


[Dev] [APIM_REST_API] What are the properties to include in DTO

2017-03-23 Thread Anuruddha Liyanarachchi
Hi,

As per the current publisher REST API [1], there is a resource to get the
subscription for a given API.

This returns the following subscriptionDTO with subscription details and
IDs of other objects associated with it (applicationId, apiId).

@JsonProperty("subscriptionId")
private String subscriptionId = null;

@JsonProperty("applicationId")
private String applicationId = null;

@JsonProperty("apiId")
private String apiId = null;

@JsonProperty("subscriptionTier")
private String subscriptionTier = null;

@JsonProperty("subscriptionStatus")
private SubscriptionStatusEnum subscriptionStatus = null;

For the UI we need the application name and API name to be displayed along
with the subscription status.

In order to do get APP_NAME and API_NAME, we need to do two additional
network calls with apiID and applicationID to two different resources.

Therefore if we are to display 10 subscriptions in the UI we need to do 21
network calls.

 1. One network call to get list of subscriptions which return List with 10
subscription DTO objects (1 network call)
*publisher/v1/subscriptions?api_id=fe855359-b3fd-4bbf-8f5c-6fb3f020011e*

 2. For each subscriptionDTO, we need to do 2 network calls to get API name
and Application Name. (2 * 10 = 20 network calls)
*publisher/v1/apis?api_id=fe855359-b3fd-4bbf-8f5c-6fb3f020011e*
*publisher/v1/applications?**application_id*
*=fe855359-b3fd-4bbf-8f5c-6fb3f020011e*

There are two ways to handle this.

1. Include the API_NAME and APPLICATION_NAME in the same DTO.
@JsonProperty("applicationName")
private String applicationName = null;

@JsonProperty("apiName")
private String apiName = null;


2. Include the *API* *object* and *Application* *object* in the
subscription DAO with required fields populated.
@JsonProperty("applicationObj")
private Application applicationObj = null;

@JsonProperty("apiObj")
private API apiObj = null;

IMO 2nd approach is more suitable. Please share your thoughts.

[1]
https://github.com/wso2/carbon-apimgt/blob/master/components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher/src/main/resources/publisher-api.yaml

-- 
Thanks and Regards,
Anuruddha Lanka Liyanarachchi
Software Engineer - WSO2
Mobile : +94 (0) 712762611
Tel  : +94 112 145 345
anurudd...@wso2.com

-- 
*Thanks and Regards,*
Anuruddha Lanka Liyanarachchi
Software Engineer - WSO2
Mobile : +94 (0) 712762611
Tel  : +94 112 145 345
a nurudd...@wso2.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev