On Wed, Jan 31, 2018 at 8:37 PM, Isuru Haththotuwa <[email protected]> wrote:
> > > On Wed, Jan 31, 2018 at 8:19 PM, Malintha Amarasinghe <[email protected]> > wrote: > >> Hi All, >> >> Shall we move our sequence execution logic [1] such a way that it is >> followed by response setting logic in the code [2]? Currently, it is >> preceded by [2] so whatever we set in the sequence is getting overridden by >> the code [2]. That needs to happen in the other way round ideally. If we do >> it, we can simply override the HTTP_SC only without affecting other things. >> WDYT? >> > +1 > Yes that's better. Let's create a issue to track this. > >> [1] https://github.com/wso2/carbon-apimgt/blob/e5bda7afcf0fb >> 9679cfcba96f56682692c0eb87a/components/apimgt/org.wso2. >> carbon.apimgt.gateway/src/main/java/org/wso2/carbon/ >> apimgt/gateway/handlers/security/APIAuthenticationHandler.java#L200-L204 >> [2] https://github.com/wso2/carbon-apimgt/blob/e5bda7afcf0fb >> 9679cfcba96f56682692c0eb87a/components/apimgt/org.wso2. >> carbon.apimgt.gateway/src/main/java/org/wso2/carbon/ >> apimgt/gateway/handlers/security/APIAuthenticationHandler.java#L219-L235 >> >> On Wed, Jan 31, 2018 at 9:25 AM, Lahiru Sandaruwan <[email protected]> >> wrote: >> >>> I see. Will follow that and set the code, respond from the sequence then. >>> >>> Thanks. >>> >>> On Tue, Jan 30, 2018 at 9:28 PM, Sanjeewa Malalgoda <[email protected]> >>> wrote: >>> >>>> Yes send from custom sequence and then drop flow will work. Its better >>>> to maintain separate convert sequence. >>>> >>>> Thanks, >>>> sanjeewa. >>>> >>>> On Wed, Jan 31, 2018 at 8:21 AM, Harsha Kumara <[email protected]> >>>> wrote: >>>> >>>>> Hi Lahiru, >>>>> >>>>> I think it's not possible to override it but you can follow [1] to do >>>>> it in a separate way. >>>>> >>>>> [1] http://sanjeewamalalgoda.blogspot.com/2015/04/how-to-gen >>>>> erate-custom-error-message.html >>>>> >>>>> Thanks, >>>>> Harsha >>>>> >>>>> On Wed, Jan 31, 2018 at 2:08 AM, Lahiru Sandaruwan <[email protected]> >>>>> wrote: >>>>> >>>>>> Hi, >>>>>> >>>>>> I changed _auth_failure_handler_ to set HTTP code to 498. But it >>>>>> still responds with 401. My handler after change is as follows, >>>>>> >>>>>> <sequence name="_auth_failure_handler_" xmlns=" >>>>>> http://ws.apache.org/ns/synapse"> >>>>>> <property name="error_message_type" value="application/xml"/> >>>>>> <sequence key="_cors_request_handler_"/> >>>>>> <property name="HTTP_SC" value="498" scope="axis2" type="STRING" >>>>>> /> >>>>>> </sequence> >>>>>> >>>>>> Anything wrong with my config? >>>>>> >>>>>> Thanks. >>>>>> >>>>>> -- >>>>>> -- >>>>>> >>>>>> Lahiru Sandaruwan >>>>>> Associate Technical Lead, >>>>>> WSO2 Inc., http://wso2.com >>>>>> >>>>>> lean.enterprise.middleware >>>>>> >>>>>> m: +1 901 530 2379 <(901)%20530-2379> >>>>>> e: [email protected] b: https://medium.com/@lahirugmg >>>>>> in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146 >>>>>> >>>>>> >>>>> >>>>> >>>>> -- >>>>> Harsha Kumara >>>>> Software Engineer, WSO2 Inc. >>>>> Mobile: +94775505618 <077%20550%205618> >>>>> Blog:harshcreationz.blogspot.com >>>>> >>>> >>>> >>>> >>>> -- >>>> >>>> *Sanjeewa Malalgoda* >>>> WSO2 Inc. >>>> Mobile : +94713068779 <071%20306%208779> >>>> >>>> <http://sanjeewamalalgoda.blogspot.com/>blog >>>> :http://sanjeewamalalgoda.blogspot.com/ >>>> <http://sanjeewamalalgoda.blogspot.com/> >>>> >>>> >>>> >>> >>> >>> -- >>> -- >>> >>> Lahiru Sandaruwan >>> Associate Technical Lead, >>> WSO2 Inc., http://wso2.com >>> >>> lean.enterprise.middleware >>> >>> m: +1 901 530 2379 <(901)%20530-2379> >>> e: [email protected] b: https://medium.com/@lahirugmg >>> in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146 >>> >>> >>> _______________________________________________ >>> Dev mailing list >>> [email protected] >>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>> >>> >> >> >> -- >> Malintha Amarasinghe >> *WSO2, Inc. - lean | enterprise | middleware* >> http://wso2.com/ >> >> Mobile : +94 712383306 <+94%2071%20238%203306> >> >> _______________________________________________ >> Dev mailing list >> [email protected] >> http://wso2.org/cgi-bin/mailman/listinfo/dev >> >> > > > -- > Thanks and Regards, > > Isuru H. > +94 716 358 048 <+94%2071%20635%208048>* <http://wso2.com/>* > > > -- Harsha Kumara Software Engineer, WSO2 Inc. Mobile: +94775505618 Blog:harshcreationz.blogspot.com
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
