Re: [Dev] Change token url in WSO2 API Manager

2017-09-06 Thread Abimaran Kugathasan
Hi Shiva,

This token endpoint URL is independent of tenants, also, tenants are
added/removed at runtime, so token API can't depend on tenants. Why do you
need such requirement?

On Tue, Sep 5, 2017 at 11:19 AM,  wrote:

> Hi Wso2 team,
>
>
>
> Please can you suggest any ways to change default token generation url,
> http://:8280/token  to http://:8280/t/<
> tenant-domain>/token.
>
> For eg.
>
> Default token generation is http://wso2.com:8280/token
>
> I want – http://wso2.com:8280/t/securelyshare.com/token
>
>
>
> How can I achieve this, thanks in advance.
>
>
>
> Thank You,
>
> Shiva Kumar KR
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Thanks
Abimaran Kugathasan
Senior Software Engineer - API Technologies

Email : abima...@wso2.com
Mobile : +94 773922820


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


[Dev] [IS] EmailOTP as the Second Step Authenticator for Federated Users Not Functioning as Expected

2017-09-06 Thread Thilina Madumal
Hi Devs,

I have configured an SP with 2 step authentication.
setp1: Facebook federated authenticator.
step2: EmailOTP authenticator.

When I try to log in to the SP it only gives the Facebook login page. Does
not give the EmailOTP.

Then I enabled JIT in Facebook IDP and tried. Still the same behavior.

As I further investigate into the EmailOTPAuthenticator, found out that the
reason for this behavior is it not being able to find the email of the
authenticated user.

I believe the case is the same with TOTP as well, not sure though.

Apparently, this is a valid use-case, isn't it so?

Thanks & Regards,
Thilina.

-- 
*Thilina Madumal*
*Software Engineer | **WSO2*
Email: thilina...@wso2.com
Mobile: *+ <+94%2077%20767%201807>94 774553167*
Web:  http://wso2.com


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


Re: [Dev] Where can I find /token endpoint source code.

2017-09-06 Thread Farasath Ahamed
On Tue, Sep 5, 2017 at 10:39 PM, Farasath Ahamed  wrote:

> Hi Shiva,
>
> Please use reply all including the dev list :) So that others will be able
> to chip in with their ideas as well...
>
> There is a small catch there. Even if you managed to pass the
> tenantDomain as a query param to the token endpoint it will not reach your
> extended password grant handler. The reason is this line of code in our
> current implementation[1], which limits the password grant type to pass
> username, password parameters only to the grant handler. We have fixed this
> in master where we pass all the parameters sent in the token.
>
> There is a small trick to get this working. You can write a grant handler
> extending the password grant handler but register it as a custom grant
> instead of grant_type=password, let's say you register it as
> grant_type=custom1, then in the token request you can send the
> tenantDomain as a parameter like below,
>
> "grant_type=custom1&username=ddd&password&tenantDomain=abc.com",
>
> within the grant handler, you can access any parameter sent using,
>
>  // extract request parameters
>  RequestParameter[] parameters = oAuthTokenReqMessageContext.
> getOauth2AccessTokenReqDTO().getRequestParameters();
>
> All the details you need to implement a custom grant type are in [2] with
> examples. Give it a try! :)
>
>
> [1] https://github.com/wso2-support/identity-inbound-auth-oa
> uth/blob/support-5.3.3/components/org.wso2.carbon.identity.
> oauth.endpoint/src/main/java/org/wso2/carbon/identity/
> oauth/endpoint/token/OAuth2TokenEndpoint.java#L273-L275
>

Correct link

https://github.com/wso2-extensions/identity-inbound-auth-oauth/blob/v5.3.3/components/org.wso2.carbon.identity.oauth.endpoint/src/main/java/org/wso2/carbon/identity/oauth/endpoint/token/OAuth2TokenEndpoint.java#L257-L287







> [2] https://docs.wso2.com/display/IS530/Writing+a+
> Custom+OAuth+2.0+Grant+Type
>
>
> Thanks,
> Farasath Ahamed
> Software Engineer, WSO2 Inc.; http://wso2.com
> Mobile: +94777603866
> Blog: blog.farazath.com
> Twitter: @farazath619 
> 
>
>
>
> On Tue, Sep 5, 2017 at 10:16 PM,  wrote:
>
>> Yes absolutely 😊 is there any way or alternate way?
>>
>>
>>
>> *From:* Farasath Ahamed [mailto:farasa...@wso2.com]
>> *Sent:* 05 September 2017 22:14
>> *To:* shiv...@securelyshare.com; WSO2 Developers' List 
>> *Subject:* Re: [Dev] Where can I find /token endpoint source code.
>>
>>
>>
>>
>>
>>
>>
>> On Tue, Sep 5, 2017 at 10:06 PM,  wrote:
>>
>> Hi Ahamed,
>>
>>
>>
>> Thank you for your response I found the configuration files. Is it
>> possible to change the /token context attribute to take a path variable in
>> /token and pass that to /oauth2/token. Eg.
>>
>>
>>
>> http://ws.apache.org/ns/synapse"; name="_WSO2AMTokenAPI_"
>> context="/{domain}/token">
>>
>>
>>
>> And your ultimate target is to pass this particular parameter to the
>> password grant handler is it?
>>
>>
>>
>>
>>
>> Thank You,
>>
>> Shiva Kumar KR
>>
>>
>>
>> *From:* Farasath Ahamed [mailto:farasa...@wso2.com]
>> *Sent:* 05 September 2017 21:26
>> *To:* shiv...@securelyshare.com
>> *Cc:* WSO2 Developers' List 
>> *Subject:* Re: [Dev] Where can I find /token endpoint source code.
>>
>>
>>
>> Hi Shiva,
>>
>>
>>
>> /token exposed is actually a proxy to /oauth2/token which is the actual
>> endpoint that handles your token request. Souce code for OAuth2 Token
>> Endpoint can be found in [1].
>>
>> You can find the proxy configuration for /token in
>> APIM_HOME/repository/deployment/server/synapse-configs/defau
>> lt/api/_TokenAPI_.xml
>>
>>
>>
>>
>>
>> [1] https://github.com/wso2-extensions/identity-inbound-auth
>> -oauth/blob/v5.3.4/components/org.wso2.carbon.identity.oauth
>> .endpoint/src/main/java/org/wso2/carbon/identity/oauth/
>> endpoint/token/OAuth2TokenEndpoint.java
>>
>>
>>
>>
>>
>> Thanks,
>>
>> Farasath
>>
>>
>> Farasath Ahamed
>>
>> Software Engineer, WSO2 Inc.; http://wso2.com
>>
>> Mobile: +94777603866
>>
>> Blog: blog.farazath.com
>>
>> Twitter: @farazath619 
>>
>> 
>>
>>   
>>
>>   
>>
>>   
>>
>> On Tue, Sep 5, 2017 at 9:13 PM, <*shiv...@securelyshare.com*> wrote:
>> 
>>
>> Hi WSO2 team, 
>>
>>   
>>
>> I want to know in which class /token url request is handled. It will be
>> very helpful for me if any one suggest which class name and project.
>> 
>>
>>   
>>
>> Thank You, 
>>
>> Shiva Kumar KR 
>>
>>
>> ___
>> Dev mailing list
>> *Dev@wso2.org*
>> *http://wso2.org/cgi-bin/mailman/listinfo/dev*
>> 
>>
>>   
>>
>>   
>>
>
>
___

[Dev] how can i customize basic authentication of wso2 api manager for authorization code grant type.

2017-09-06 Thread shiva.k
How can I customize basic authentication of Authorization code grant type
page. Any handlers I can override.

I tried to extend ExtendedAuthorizationCodeGrantHandler and overriding
validateGrant method, but when i click sign in the validateGrant method is
not invoking. Please see the configuration below.

 

In WSO2_HOME/repository/conf/identity/identity.xml I have changed handler to
my implementation please suggest any way to override authentication when I
click sign in.

 



authorization_code

 


 
org.wso2.carbon.test.SSAuthorizationCodeGrantHanl
der



 



 

Thank You,

Shiva Kumar KR

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


Re: [Dev] [IS] EmailOTP as the Second Step Authenticator for Federated Users Not Functioning as Expected

2017-09-06 Thread Malaka Silva
Hi Thilina,

If you don't get the email of the user do you want to fail the login or
skip the EmailOTP? You can control this behavior with EMAILOTPMandatory
parameter.

[1] https://docs.wso2.com/display/ISCONNECTORS/Configuring+EmailOTP+
Authenticator

On Wed, Sep 6, 2017 at 5:32 PM, Thilina Madumal  wrote:

> Hi Devs,
>
> I have configured an SP with 2 step authentication.
> setp1: Facebook federated authenticator.
> step2: EmailOTP authenticator.
>
> When I try to log in to the SP it only gives the Facebook login page. Does
> not give the EmailOTP.
>
> Then I enabled JIT in Facebook IDP and tried. Still the same behavior.
>
> As I further investigate into the EmailOTPAuthenticator, found out that
> the reason for this behavior is it not being able to find the email of the
> authenticated user.
>
> I believe the case is the same with TOTP as well, not sure though.
>
> Apparently, this is a valid use-case, isn't it so?
>
> Thanks & Regards,
> Thilina.
>
> --
> *Thilina Madumal*
> *Software Engineer | **WSO2*
> Email: thilina...@wso2.com
> Mobile: *+ <+94%2077%20767%201807>94 774553167 <077%20455%203167>*
> Web:  http://wso2.com
>
> 
>
>


-- 

Best Regards,

Malaka Silva
Associate Director / Architect
M: +94 777 219 791
Tel : 94 11 214 5345
Fax :94 11 2145300
Skype : malaka.sampath.silva
LinkedIn : http://www.linkedin.com/pub/malaka-silva/6/33/77
Blog : http://mrmalakasilva.blogspot.com/

WSO2, Inc.
lean . enterprise . middleware
https://wso2.com/signature
http://www.wso2.com/about/team/malaka-silva/

https://store.wso2.com/store/

Don't make Trees rare, we should keep them with care
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Is it possible to obtain subscriber information from clientId, client secret

2017-09-06 Thread shiva.k
Hi All,

 

I am extending Password grant handler for customizing the authentication
mechanism, within that I have a requirement to know subscriber username from
clientId or client secret, is this possible programmatically?

 

Thank You,

Shiva Kumar KR

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


[Dev] [WSO2-EI] doubt about analytics identity.xml and integration with WSO2-IS

2017-09-06 Thread Clovis Wichoski
Hi,

Reviewing the puppet modules for pattern 6 of EI, I see that both
analytics1 and 2 points to wso2_carbon_db, that is for local registry space
for each instance, is that correct? or better is to have a central wso2idn
database, for future shared use with WOS2IS?

best regards.

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


Re: [Dev] [IS] EmailOTP as the Second Step Authenticator for Federated Users Not Functioning as Expected

2017-09-06 Thread Thilina Madumal
Hi Malaka,

Even I get the email address from the *federated user*, still, EmailOTP is
not functioning.

I have done the claim mapping as well. Facebook email calim to
http://wso2.org/claims/emailaddress claim.


Regards,
Thilina


On Wed, Sep 6, 2017 at 7:51 PM, Malaka Silva  wrote:

> Hi Thilina,
>
> If you don't get the email of the user do you want to fail the login or
> skip the EmailOTP? You can control this behavior with EMAILOTPMandatory
> parameter.
>
> [1] https://docs.wso2.com/display/ISCONNECTORS/Configuring+
> EmailOTP+Authenticator
>
> On Wed, Sep 6, 2017 at 5:32 PM, Thilina Madumal 
> wrote:
>
>> Hi Devs,
>>
>> I have configured an SP with 2 step authentication.
>> setp1: Facebook federated authenticator.
>> step2: EmailOTP authenticator.
>>
>> When I try to log in to the SP it only gives the Facebook login page.
>> Does not give the EmailOTP.
>>
>> Then I enabled JIT in Facebook IDP and tried. Still the same behavior.
>>
>> As I further investigate into the EmailOTPAuthenticator, found out that
>> the reason for this behavior is it not being able to find the email of the
>> authenticated user.
>>
>> I believe the case is the same with TOTP as well, not sure though.
>>
>> Apparently, this is a valid use-case, isn't it so?
>>
>> Thanks & Regards,
>> Thilina.
>>
>> --
>> *Thilina Madumal*
>> *Software Engineer | **WSO2*
>> Email: thilina...@wso2.com
>> Mobile: *+ <+94%2077%20767%201807>94 774553167 <077%20455%203167>*
>> Web:  http://wso2.com
>>
>> 
>>
>>
>
>
> --
>
> Best Regards,
>
> Malaka Silva
> Associate Director / Architect
> M: +94 777 219 791 <+94%2077%20721%209791>
> Tel : 94 11 214 5345
> Fax :94 11 2145300
> Skype : malaka.sampath.silva
> LinkedIn : http://www.linkedin.com/pub/malaka-silva/6/33/77
> Blog : http://mrmalakasilva.blogspot.com/
>
> WSO2, Inc.
> lean . enterprise . middleware
> https://wso2.com/signature
> http://www.wso2.com/about/team/malaka-silva/
> 
> https://store.wso2.com/store/
>
> Don't make Trees rare, we should keep them with care
>



-- 
*Thilina Madumal*
*Software Engineer | **WSO2*
Email: thilina...@wso2.com
Mobile: *+ <+94%2077%20767%201807>94 774553167*
Web:  http://wso2.com


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


Re: [Dev] Where can I find /token endpoint source code.

2017-09-06 Thread shiva.k
Hi Ahamed,

 

Thank you for your support and suggestions, I was able to successfully obtain 
the tenant domain name using from clientId as you suggested. And also in 
AccessTokenIssuer class in issue method itself a proper tenant domain based on 
clientId is set in oauth token request object.

 

Thank You,

Shiva Kumar KR

 

From: Farasath Ahamed [mailto:farasa...@wso2.com] 
Sent: 06 September 2017 17:40
To: shiv...@securelyshare.com; WSO2 Developers' List 
Subject: Re: [Dev] Where can I find /token endpoint source code.

 

 

On Tue, Sep 5, 2017 at 10:39 PM, Farasath Ahamed mailto:farasa...@wso2.com> > wrote:

Hi Shiva,

 

Please use reply all including the dev list :) So that others will be able to 
chip in with their ideas as well...

 

There is a small catch there. Even if you managed to pass the tenantDomain as a 
query param to the token endpoint it will not reach your extended password 
grant handler. The reason is this line of code in our current 
implementation[1], which limits the password grant type to pass username, 
password parameters only to the grant handler. We have fixed this in master 
where we pass all the parameters sent in the token.

 

There is a small trick to get this working. You can write a grant handler 
extending the password grant handler but register it as a custom grant instead 
of grant_type=password, let's say you register it as grant_type=custom1, then 
in the token request you can send the tenantDomain as a parameter like below,

 

"grant_type=custom1&username=ddd&password&tenantDomain=abc.com  
",

 

within the grant handler, you can access any parameter sent using,

 

 // extract request parameters

 RequestParameter[] parameters = 
oAuthTokenReqMessageContext.getOauth2AccessTokenReqDTO().getRequestParameters();

 

All the details you need to implement a custom grant type are in [2] with 
examples. Give it a try! :)

 

 

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

 

Correct link

https://github.com/wso2-extensions/identity-inbound-auth-oauth/blob/v5.3.3/components/org.wso2.carbon.identity.oauth.endpoint/src/main/java/org/wso2/carbon/identity/oauth/endpoint/token/OAuth2TokenEndpoint.java#L257-L287
 

 

 

 

[2] https://docs.wso2.com/display/IS530/Writing+a+Custom+OAuth+2.0+Grant+Type

 

 

Thanks,


Farasath Ahamed

Software Engineer, WSO2 Inc.;   http://wso2.com

Mobile:   +94777603866

Blog: blog.farazath.com  

Twitter: @farazath619  

  

 

 

 

On Tue, Sep 5, 2017 at 10:16 PM, mailto:shiv...@securelyshare.com> > wrote:

Yes absolutely 😊 is there any way or alternate way?

 

From: Farasath Ahamed [mailto:farasa...@wso2.com  ] 
Sent: 05 September 2017 22:14
To: shiv...@securelyshare.com  ; WSO2 
Developers' List mailto:dev@wso2.org> >
Subject: Re: [Dev] Where can I find /token endpoint source code.

 

 

 

On Tue, Sep 5, 2017 at 10:06 PM, mailto:shiv...@securelyshare.com> > wrote:

Hi Ahamed,

 

Thank you for your response I found the configuration files. Is it possible to 
change the /token context attribute to take a path variable in /token and pass 
that to /oauth2/token. Eg.

 

http://ws.apache.org/ns/synapse"; name="_WSO2AMTokenAPI_" 
context="/{domain}/token">

 

And your ultimate target is to pass this particular parameter to the password 
grant handler is it?

 

 

Thank You,

Shiva Kumar KR

 

From: Farasath Ahamed [mailto:farasa...@wso2.com  ] 
Sent: 05 September 2017 21:26
To: shiv...@securelyshare.com  
Cc: WSO2 Developers' List mailto:dev@wso2.org> >
Subject: Re: [Dev] Where can I find /token endpoint source code.

 

Hi Shiva,

 

/token exposed is actually a proxy to /oauth2/token which is the actual 
endpoint that handles your token request. Souce code for OAuth2 Token Endpoint 
can be found in [1].

You can find the proxy configuration for /token in 
APIM_HOME/repository/deployment/server/synapse-configs/default/api/_TokenAPI_.xml

 

 

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

 

 

Thanks,

Farasath




Farasath Ahamed

Software Engineer, WSO2 Inc.;   http://wso2.com

Mobile:   +94777603866

Blog: blog.farazath.com  

Twitter: @farazath619  

   

   

   

  On Tue, Sep 5, 2017 at 9:13 PM, 
 wrote:

  Hi WSO2 team,

 

Re: [Dev] [IS] EmailOTP as the Second Step Authenticator for Federated Users Not Functioning as Expected

2017-09-06 Thread Thilina Madumal
Hi Malaka,

On Wed, Sep 6, 2017 at 7:51 PM, Malaka Silva  wrote:

> Hi Thilina,
>
> If you don't get the email of the user do you want to fail the login or
> skip the EmailOTP? You can control this behavior with EMAILOTPMandatory
> parameter.
>

That means for federated user scenarios, we must enable "EMAILOTPMandatory"
to get EmailOTPAuthentication step work, right?


>
> [1] https://docs.wso2.com/display/ISCONNECTORS/Configuring+
> EmailOTP+Authenticator
>
> On Wed, Sep 6, 2017 at 5:32 PM, Thilina Madumal 
> wrote:
>
>> Hi Devs,
>>
>> I have configured an SP with 2 step authentication.
>> setp1: Facebook federated authenticator.
>> step2: EmailOTP authenticator.
>>
>> When I try to log in to the SP it only gives the Facebook login page.
>> Does not give the EmailOTP.
>>
>> Then I enabled JIT in Facebook IDP and tried. Still the same behavior.
>>
>> As I further investigate into the EmailOTPAuthenticator, found out that
>> the reason for this behavior is it not being able to find the email of the
>> authenticated user.
>>
>> I believe the case is the same with TOTP as well, not sure though.
>>
>> Apparently, this is a valid use-case, isn't it so?
>>
>> Thanks & Regards,
>> Thilina.
>>
>> --
>> *Thilina Madumal*
>> *Software Engineer | **WSO2*
>> Email: thilina...@wso2.com
>> Mobile: *+ <+94%2077%20767%201807>94 774553167 <077%20455%203167>*
>> Web:  http://wso2.com
>>
>> 
>>
>>
>
>
> --
>
> Best Regards,
>
> Malaka Silva
> Associate Director / Architect
> M: +94 777 219 791 <+94%2077%20721%209791>
> Tel : 94 11 214 5345
> Fax :94 11 2145300
> Skype : malaka.sampath.silva
> LinkedIn : http://www.linkedin.com/pub/malaka-silva/6/33/77
> Blog : http://mrmalakasilva.blogspot.com/
>
> WSO2, Inc.
> lean . enterprise . middleware
> https://wso2.com/signature
> http://www.wso2.com/about/team/malaka-silva/
> 
> https://store.wso2.com/store/
>
> Don't make Trees rare, we should keep them with care
>

Regards,
Thilina

-- 
*Thilina Madumal*
*Software Engineer | **WSO2*
Email: thilina...@wso2.com
Mobile: *+ <+94%2077%20767%201807>94 774553167*
Web:  http://wso2.com


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


[Dev] [GSOC][Siddhi][PySiddhi] Sincere Thanks and Future Contributions

2017-09-06 Thread Madhawa Vidanapathirana
Dear All,

This mail is to thank everyone who helped me to successfully complete *Google
Summer of Code 2017* with project *PySiddhi*. I was able to learn a lot via
the project, specially on areas such as *JNI*, *Python Native Programming*
and *developing Python Wrappers to Java.* In overall, it has been a great
experience and I am grateful for everyone who helped me.

Special thanks must go to *Grainier,* *Suho *and *Anjana*, whom helped me
throughout as mentors of the project. Also I must thank *Mohan* and
*Ramindu* for the help given.

I would like to continue my contribution to the project in the future and
would like to discuss on how it can be taken forward.

GitHub Link: https://github.com/wso2/PySiddhi
GSoC Work Summary:
https://gist.github.com/madhawav/195b7dc601d94c40958d88be1d56e705

Kind Regards,

-- 
*Madhawa Vidanapathirana*
Student
Department of Computer Science and Engineering
University of Moratuwa
Sri Lanka

Mobile: (+94) 716874425
Email: madhawavidanapathir...@gmail.com
Linked-In: https://lk.linkedin.com/in/madhawa-vidanapathirana-3430b94
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [GSOC][Siddhi][PySiddhi] Sincere Thanks and Future Contributions

2017-09-06 Thread Sriskandarajah Suhothayan
Great work, looking forward to work with you.

Thanks
Suho

On Wed, Sep 6, 2017 at 11:58 PM Madhawa Vidanapathirana <
madhawavidanapathir...@gmail.com> wrote:

> Dear All,
>
> This mail is to thank everyone who helped me to successfully complete *Google
> Summer of Code 2017* with project *PySiddhi*. I was able to learn a lot
> via the project, specially on areas such as *JNI*, *Python Native
> Programming* and *developing Python Wrappers to Java.* In overall, it has
> been a great experience and I am grateful for everyone who helped me.
>
> Special thanks must go to *Grainier,* *Suho *and *Anjana*, whom helped me
> throughout as mentors of the project. Also I must thank *Mohan* and
> *Ramindu* for the help given.
>
> I would like to continue my contribution to the project in the future and
> would like to discuss on how it can be taken forward.
>
> GitHub Link: https://github.com/wso2/PySiddhi
> GSoC Work Summary:
> https://gist.github.com/madhawav/195b7dc601d94c40958d88be1d56e705
>
> Kind Regards,
>
> --
> *Madhawa Vidanapathirana*
> Student
> Department of Computer Science and Engineering
> University of Moratuwa
> Sri Lanka
>
> Mobile: (+94) 716874425
> Email: madhawavidanapathir...@gmail.com
> Linked-In: https://lk.linkedin.com/in/madhawa-vidanapathirana-3430b94
>
-- 

*S. Suhothayan*
Associate Director / Architect
*WSO2 Inc. *http://wso2.com
* *
lean . enterprise . middleware


*cell: (+94) 779 756 757 | blog: http://suhothayan.blogspot.com/
twitter: http://twitter.com/suhothayan
 | linked-in:
http://lk.linkedin.com/in/suhothayan *
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Custom API handler gets ClassNotFoundException

2017-09-06 Thread Harsha Kumara
Hi Todd,

This might cause due to version issues and class loading issues. You might
check the exports of synapse core bundle in both of these versions. I
didn't have a chance to look at this yet. If you stuck on this issue,
better to go with the bundle approach which I provided in the reference
resource.

Thanks,
Harsha

On Tue, Sep 5, 2017 at 9:21 PM, Todd Hill  wrote:

> So, Harsha, the issue isn't resolved, but I have some additional
> information comparing the OSGI output from the API Manager v2.1.0 to the
> ESB v4.8.0.
>
> I ran each server with the system property -DosgiConsole, so I could
> query the bundle information. In both cases I let the WSO2 framework do the
> bundling by putting the raw jar into the repository/components/lib.
> The generate MANIFEST.MF files by the framework were listed earlier in this
> thread.
>
> Below are the results after executing the OSGI command b  both
> before the handler is executed and after it has executed (albeit with an
> error in the APIM version). What is most notable is that the missing
> package org.apache.synapse.core.axis2 is clearly imported in the ESB
> version, but not in the APIM version.
>
> I'm a newbie to WSO2/OSGI, so I could be missing something ... but I
> wonder if this helps you diagnose what might be going on.
> Thank you.
>
>
>
> For reference, here are the import statements in the Handler class:
> import com.google.common.base.Joiner;
> import org.apache.axiom.om.*;
> import org.apache.axis2.databinding.types.URI;
> import org.apache.commons.lang.StringUtils;
> import org.apache.commons.logging.Log;
> import org.apache.commons.logging.LogFactory;
> import org.apache.synapse.MessageContext;
> import org.apache.synapse.core.axis2.Axis2MessageContext;
> import org.apache.synapse.rest.AbstractHandler;
> import org.apache.synapse.rest.RESTConstants;
> import org.apache.synapse.transport.passthru.util.RelayUtils;
>
> import javax.xml.namespace.QName;
> import javax.xml.stream.XMLStreamException;
> import java.io.IOException;
> import java.io.StringReader;
> import java.util.*;
>
>
> Results
> *APIM 2.1.0*
>
> *Before executing Handler*
> osgi> b 57
> esb.poc_1.0.0_SNAPSHOT_1.0.0 [57]
>   Id=57, Status=ACTIVE  Data Root=/Users/tkhill/wso2am-2.1.
> 0/repository/components/default/configuration/org.
> eclipse.osgi/bundles/57/data
>   "No registered services."
>   No services in use.
>   Exported packages
> edu.wisc.services.esbpoc; version="0.0.0"[exported]
>   Imported packages
> org.apache.synapse.rest; version="0.0.0" [675]>
> javax.xml.stream; version="1.0.1" [0]>
> org.apache.axiom.om; version="1.2.11.wso2v11" [13]>
> org.apache.axis2.databinding.types; 
> version="1.6.1.wso2v20" [14]>
> org.apache.commons.logging; version="1.2.0" [454]>
>   No fragment bundles
>   Named class space
> esb.poc_1.0.0_SNAPSHOT; bundle-version="1.0.0"[provided]
>   No required bundles
>
> *After executing Handler (but gets error -
> org.apache.synapse.core.axis2.Axis2MessageContext cannot be found by
> esb.poc_1.0.0_SNAPSHOT_1.0.0)*
> osgi> b 57
> esb.poc_1.0.0_SNAPSHOT_1.0.0 [57]
>   Id=57, Status=ACTIVE  Data Root=/Users/tkhill/wso2am-2.1.
> 0/repository/components/default/configuration/org.
> eclipse.osgi/bundles/57/data
>   "No registered services."
>   No services in use.
>   Exported packages
> edu.wisc.services.esbpoc; version="0.0.0"[exported]
>   Imported packages
> org.apache.synapse.rest; version="0.0.0" [675]>
> javax.xml.stream; version="1.0.1" [0]>
> org.apache.axiom.om; version="1.2.11.wso2v11" [13]>
> org.apache.axis2.databinding.types; 
> version="1.6.1.wso2v20" [14]>
> org.apache.commons.logging; version="1.2.0" [454]>
> org.apache.synapse; version="0.0.0"
> org.jaxen; version="1.1.1"
> org.apache.axiom.om.xpath; version="1.2.11.wso2v11" [13]>
> org.apache.commons.lang; version="2.6.0" [46]>
> com.google.common.base; version="19.0.0"
>   No fragment bundles
>   Named class space
> esb.poc_1.0.0_SNAPSHOT; bundle-version="1.0.0"[provided]
>   No required bundles
>
>
>
> ESB 4.8.0
> *Before executing Handler  *
>   osgi> b 40
>   esb.poc_1.0.0_SNAPSHOT_1.0.0 [40]
> Id=40, Status=ACTIVE  Data Root=/Users/tkhill/wso2esb-4.
> 8.0/repository/components/default/configuration/org.
> eclipse.osgi/bundles/40/data
> "No registered services."
> No services in use.
> Exported packages
>   edu.wisc.services.esbpoc; version="0.0.0"[exported]
> Imported packages
>   org.apache.synapse.rest; version="0.0.0" [526]>
>   org.apache.axis2.databinding.types; 
> version="1.6.1.wso2v10" [15]>
>   javax.xml.stream; 
> version="1.0.1" [0]>
>   org.apache.axiom.om; version="1.2.11.wso2v4" [14]>
>   org.apache.commons.logging; 
> version="1.1.1" [236]>
> No fragment bundles
> Named class space
>   esb.poc_1.0.0_SNAPSHOT; bundle-version="1.0.0"[provided]
> No required bundles
>
> *After executing Handler*
> osgi> b 40
> esb.poc_1

[Dev] [DEV] Problem While using For each mediator within iterate mediator

2017-09-06 Thread Biruntha Gnaneswaran
Hi All,

I have $subject issue while doing github to spreadsheet integration
scenario. For that, I have tried the sample sequence as below [1]. After
calling fist call mediator, I'm getting the response for the first call
mediator. But the remain highlighted code segment is not executing. Is
there any way to resolve this issue? or Is this an expected behavior?

But when I replace the for each mediator with iterate mediator There are no
issues.

[1]


http://ws.apache.org/ns/synapse
">

{"repo" : ["repo_1"]}

http://org.apache.synapse/xsd";>




https://api.github.com

application/vnd.github+json


Biruntha
{$ctx:repository}








https://www.googleapis.com/oauth2/v1/tokeninfo?access_token=ya29.Glu_BNInVSEO-bM3sJaYoN8m-k6w91j_WKg8mKraTu3E6_AKvbQmzJFMVDZ9q6HsfYDjT2enY5jjEy8p3ce9UJFwk7uhduKB8imoAi725i27toW0mwRs_LevZUvR
"/>








{"values":[['repo_2','1st issue for repo_2']]}




https://sheets.googleapis.com/v4/spreadsheets/14PJALKcIXLr75rJWXlHhVjOt7z0Nby7AvcKXJGhMN2s/values/Scenario!A1:append?valueInputOption=RAW
"/>










Thanks,
-- 
Biruntha

Software Engineer
WSO2
Email: birun...@wso2.com
LinkedIn: https://lk.linkedin.com/in/biruntha
Mobile : +94773718986
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [GSOC][Siddhi][PySiddhi] Sincere Thanks and Future Contributions

2017-09-06 Thread Anjana Fernando
Great work indeed! .. I was just an observer mainly, but I saw the work was
done very methodically, under the guidance of others; Keep it up.

Cheers,
Anjana.

On Wed, Sep 6, 2017 at 11:57 PM, Madhawa Vidanapathirana <
madhawavidanapathir...@gmail.com> wrote:

> Dear All,
>
> This mail is to thank everyone who helped me to successfully complete *Google
> Summer of Code 2017* with project *PySiddhi*. I was able to learn a lot
> via the project, specially on areas such as *JNI*, *Python Native
> Programming* and *developing Python Wrappers to Java.* In overall, it has
> been a great experience and I am grateful for everyone who helped me.
>
> Special thanks must go to *Grainier,* *Suho *and *Anjana*, whom helped me
> throughout as mentors of the project. Also I must thank *Mohan* and
> *Ramindu* for the help given.
>
> I would like to continue my contribution to the project in the future and
> would like to discuss on how it can be taken forward.
>
> GitHub Link: https://github.com/wso2/PySiddhi
> GSoC Work Summary: https://gist.github.com/madhawav/
> 195b7dc601d94c40958d88be1d56e705
>
> Kind Regards,
>
> --
> *Madhawa Vidanapathirana*
> Student
> Department of Computer Science and Engineering
> University of Moratuwa
> Sri Lanka
>
> Mobile: (+94) 716874425 <071%20687%204425>
> Email: madhawavidanapathir...@gmail.com
> Linked-In: https://lk.linkedin.com/in/madhawa-vidanapathirana-3430b94
>



-- 
*Anjana Fernando*
Associate Director / Architect
WSO2 Inc. | http://wso2.com
lean . enterprise . middleware
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Regarding auth_time claim in OIDC id_token

2017-09-06 Thread Hasanthi Purnima Dissanayake
Hi Hasini,

Spec does not speak directly about the auth_time directly when the user
have previous session. IMO when we send the request without prompt =none,
as 'auth_time' indicates user authenticated time, if the user does not have
a previous session then the 'auth_time' should be the session created time
and if the user have a previous session then it should be the session
updated time.

Thanks,

Hasanthi Dissanayake

Software Engineer | WSO2

E: hasan...@wso2.com
M :0718407133| http://wso2.com 

On Wed, Aug 30, 2017 at 10:56 AM, Hasini Witharana  wrote:

> Hi Asela,
>
> We take the session updated time as the new auth_time.
>
> Thank you.
>
> On Tue, Aug 29, 2017 at 5:59 PM, Asela Pathberiya  wrote:
>
>>
>>
>> On Tue, Aug 29, 2017 at 4:29 PM, Hasini Witharana 
>> wrote:
>>
>>> Hi Asela,
>>>
>>> If SP sends a force auth request, we update the existing session.
>>>
>>
>> So;  Are we generating new auth_time when session is updated ?
>>
>>
>>>
>>> Thanks,
>>> Hasini
>>>
>>>
>>>
>>> On Wed, Aug 23, 2017 at 1:27 PM, Asela Pathberiya 
>>> wrote:
>>>


 On Wed, Aug 23, 2017 at 12:46 PM, Hasini Witharana 
 wrote:

> Hi,
>
> In the OIDC specification auth_time is defined as below.[1]
>
> Time when the End-User authentication occurred. Its value is a JSON
> number representing the number of seconds from 1970-01-01T0:0:0Z as
> measured in UTC until the date/time. When a max_age request is made
> or when auth_time is requested as an Essential Claim, then this Claim
> is REQUIRED; otherwise, its inclusion is OPTIONAL.
>
> In the current implementation when the user is authenticated for the
> first time using user credentials, auth_time is considered as the session
> created time. After that when user is implicitly login in using a cookie
> without giving user credentials, auth_time is considered as session 
> updated
> time.
>

 If SP sends a force authe request,  Are we creating a new session or
 update the existing session ?

 If max_age is expired,  Does SP need to send a force auth request or
 just an authentication request ?

 Thanks,
 Asela.

>
> As I think the auth_time should be the first time user authenticated
> using credentials.
> [2] is the fix made for this issue.
>
> Thank you.
>
> [1] - http://openid.net/specs/openid-connect-core-1_0.html
> [2] - https://github.com/wso2-extensions/identity-inbound-auth-oau
> th/pull/455
>
> --
>
> *Hasini Witharana*
> Software Engineering Intern | WSO2
>
>
> *Email : hasi...@wso2.com *
>
> *Mobile : +94713850143 <+94%2071%20385%200143>[image:
> http://wso2.com/signature] *
>



 --
 Thanks & Regards,
 Asela

 ATL
 Mobile : +94 777 625 933 <+94%2077%20762%205933>
  +358 449 228 979

 http://soasecurity.org/
 http://xacmlinfo.org/

>>>
>>>
>>>
>>> --
>>>
>>> *Hasini Witharana*
>>> Software Engineering Intern | WSO2
>>>
>>>
>>> *Email : hasi...@wso2.com *
>>>
>>> *Mobile : +94713850143 <+94%2071%20385%200143>[image:
>>> http://wso2.com/signature] *
>>>
>>
>>
>>
>> --
>> Thanks & Regards,
>> Asela
>>
>> ATL
>> Mobile : +94 777 625 933 <+94%2077%20762%205933>
>>  +358 449 228 979
>>
>> http://soasecurity.org/
>> http://xacmlinfo.org/
>>
>
>
>
> --
>
> *Hasini Witharana*
> Software Engineering Intern | WSO2
>
>
> *Email : hasi...@wso2.com *
>
> *Mobile : +94713850143 <+94%2071%20385%200143>[image:
> http://wso2.com/signature] *
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev