Thanks for the explanation Shakila and Kanapriya. I wanted to try this out
before replying to the mail. As you both have explained, without commenting
out the addressing module we infact get an error during authentication

As per the code, [1] is the place where the error is generated. From what I
understood, this line is used to check whether the mailto transport is
configured, correct ? because the ConfigurationContext is not used in
another place after the check. Other than that, having the addressing
module does not have any effect on the email sending flow. I verified this
by removing the below code block at [1].

ConfigurationContext configurationContext =
ConfigurationContextFactory.createConfigurationContextFromFileSystem((String)
null, (String) null);

if 
(configurationContext.getAxisConfiguration().getTransportsOut().containsKey(EmailOTPAuthenticatorConstants.TRANSPORT_MAILTO))
{

However, without this check, the user will be always redirected to the OTP
page even when the mailto transport is not configured. My question is, can
we do this check without creating a new 'ConfigurationContext' ? If that
can be done, having the addressing module uncommented will not have any
impact on the authenticator.


[1] -
https://github.com/wso2-extensions/identity-outbound-auth-email-otp/blob/master/component/authenticator/src/main/java/org/wso2/carbon/identity/authenticator/emailotp/EmailOTPAuthenticator.java#L1419-L1420

Thanks,
Omindu.

On Wed, Jan 17, 2018 at 9:09 AM, Shavindri Dissanayake <shavin...@wso2.com>
wrote:

> Hi Team,
>
> Verifying details: Do we need to change the explanation given in docs?If
> yes, what should the messaging be?
>
> Thanks & Regards
> Shavindri Dissanayake
> Senior Technical Writer
>
> WSO2 Inc.
> lean.enterprise.middleware
>
> On Mon, Jan 15, 2018 at 11:00 AM, Shakila Sasikaran <shak...@wso2.com>
> wrote:
>
>> Hi,
>>
>> As I remember when we create the axis configuration from the given
>> axis2.xml, we get an error. Because of the emptiness of this module. Please
>> note that this module is not defined in the axis2_default.xml.
>>
>> Thanks
>>
>> On Mon, Jan 15, 2018 at 10:43 AM, Omindu Rathnaweera <omi...@wso2.com>
>> wrote:
>>
>>> Hi Team,
>>>
>>> Is anyone aware of the reason why we have to do the following
>>> configuration for Email OTP [1] in axis2.xml (See instruction No.3 in
>>> 'Enabling email configuration on WSO2 IS' section) ?
>>>
>>> '*Comment out the <module ref="addressing"/> property to avoid syntax
>>> errors*.'
>>>
>>> IMO saying '*to avoid syntax errors*' doesn't make much sense.
>>>
>>> [1] - https://docs.wso2.com/display/IS540/Configuring+Email+OTP
>>>
>>> Thanks,
>>> Omindu.
>>>
>>> --
>>> Omindu Rathnaweera
>>> Senior Software Engineer, WSO2 Inc.
>>> Mobile: +94 771 197 211 <+94%2077%20119%207211>
>>>
>>
>>
>>
>> --
>> Shakila Sasikaran
>> Software Engineer
>> Mobile :+94 (0) 77 526 6848 <+94%2077%20526%206848>
>> shak...@wso2.com
>> WSO2, Inc.
>> lean . enterprise . middleware
>> http://www.wso2.com/
>>
>
>


-- 
Omindu Rathnaweera
Senior Software Engineer, WSO2 Inc.
Mobile: +94 771 197 211
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to