Re: [Dev] Custom authentication error message in APIM

2017-10-04 Thread Tharika Madurapperuma
Hi Vivek,

   You could try this [1] out to customize your error message. Alter the
sample based on your requirement.

[1]
http://sanjeewamalalgoda.blogspot.com/2015/06/how-to-send-specific-status-code-and.html

Thanks,
Tharika.

On Mon, Oct 2, 2017 at 6:46 PM, vivekkumar 
wrote:

> Any clue from anybody ?
>
>
>
> --
> Sent from: http://wso2-oxygen-tank.10903.n7.nabble.com/WSO2-
> Development-f3.html
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>



-- 
*Tharika Madurapperuma*
Software Engineer | WSO2, Inc.

Email : thar...@wso2.com
Mobile : +94777875624
Web : http://wso2.com


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


Re: [Dev] Custom authentication error message in APIM

2017-10-02 Thread vivekkumar
Any clue from anybody ?



--
Sent from: http://wso2-oxygen-tank.10903.n7.nabble.com/WSO2-Development-f3.html
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Custom authentication error message in APIM

2017-09-27 Thread vivekkumar
auth_handler.xml
  

Here is attached file. After this getting deployed. I am still getting
following response 

{
"fault": {
"code": 900901,
"message": "Invalid Credentials",
"description": "Access failure for API: /fps/v1, version: v1 status:
(900901) - Invalid Credentials. Make sure you have given the correct access
token"
}
}



--
Sent from: http://wso2-oxygen-tank.10903.n7.nabble.com/WSO2-Development-f3.html
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Custom authentication error message in APIM

2017-09-26 Thread Rajkumar Rajaratnam
Can you attach your modified auth_failure_handler.xml?

On Tue, Sep 26, 2017 at 10:17 AM, Rajkumar Rajaratnam 
wrote:

> See this document [1]. You will have to customize auth_failure_handler.xml
> sequence.
>
> [1] https://docs.wso2.com/display/AM210/Error+Handling#ErrorHandling-
> Customerrormessages
>
> On Tue, Sep 26, 2017 at 8:14 AM, vivekkumar 
> wrote:
>
>> I would like to send custom error message for any authentication related
>> issue.
>>
>> Currently APIM is sending default error message that is following
>>
>> {
>> "fault": {
>> "code": 900901,
>> "message": "Invalid Credentials",
>> "description": "Access failure for API: //v1, version: v1
>> status: (900901) - Invalid Credentials. Make sure you have given the
>> correct
>> access token"
>> }
>> }
>>
>> I tried to modify the sequence '_auth_failure_handler_.xml', but that
>> didn't
>> make any difference.
>>
>> Any suggestion would be helpful.
>>
>> Vivek
>>
>>
>>
>>
>> --
>> Sent from: http://wso2-oxygen-tank.10903.n7.nabble.com/WSO2-Development
>> -f3.html
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>
>
>
> --
> Rajkumar Rajaratnam
> Committer & PMC Member, Apache Stratos
> Senior Software Engineer, WSO2
>



-- 
Rajkumar Rajaratnam
Committer & PMC Member, Apache Stratos
Senior Software Engineer, WSO2
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Custom authentication error message in APIM

2017-09-26 Thread Rajkumar Rajaratnam
See this document [1]. You will have to customize auth_failure_handler.xml
sequence.

[1]
https://docs.wso2.com/display/AM210/Error+Handling#ErrorHandling-Customerrormessages

On Tue, Sep 26, 2017 at 8:14 AM, vivekkumar 
wrote:

> I would like to send custom error message for any authentication related
> issue.
>
> Currently APIM is sending default error message that is following
>
> {
> "fault": {
> "code": 900901,
> "message": "Invalid Credentials",
> "description": "Access failure for API: //v1, version: v1
> status: (900901) - Invalid Credentials. Make sure you have given the
> correct
> access token"
> }
> }
>
> I tried to modify the sequence '_auth_failure_handler_.xml', but that
> didn't
> make any difference.
>
> Any suggestion would be helpful.
>
> Vivek
>
>
>
>
> --
> Sent from: http://wso2-oxygen-tank.10903.n7.nabble.com/WSO2-
> Development-f3.html
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>



-- 
Rajkumar Rajaratnam
Committer & PMC Member, Apache Stratos
Senior Software Engineer, WSO2
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev