[prev in list] [next in list] [prev in thread] [next in thread] 

List:       esb-java-dev
Subject:    Re: [Dev] How to get Inbound Authenticator Property Values
From:       Chamara Philips <chamarap () wso2 ! com>
Date:       2016-10-29 20:11:26
Message-ID: CAFTw2X4yPtisyzWojxBZXceQ1axcAxYth7WrE1TV7Ybq=UWW1Q () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hi,

You can get the properties from the InboundAuthenticationRequestConfig by
using config.getProperties() method.

On Fri, Oct 28, 2016 at 1:02 PM, Kanapriya Kuleswararajan <
kanapriya@wso2.com> wrote:

> Hi All,
>
> In outbound authenticators, we have set required properties in
> authenticator UI as in [1] and get the values for that properties from the
> authentication context as in [2]
> [1]
> List<Property> configProperties = new ArrayList<>();
> Property apiKey = new Property();
> apiKey.setName(Constants.APIKEY);
> apiKey.setDisplayName(Constants.APIKEY);
> apiKey.setRequired(true);
> configProperties.add(apiKey);
>
> [2]
> Map<String, String> authenticatorProperties =
> context.getAuthenticatorProperties();
>
> In Inbound authenticators also, we have set the UI properties as in [3].
> Here we can get the value for acsUrl as in [4]
>
> [3]
> Property acsUrl = new Property();
> acsUrl.setName(Constants.acsUrl);
> acsUrl.setDisplayName(Constants.acsUrl);
> return new Property[]{acsUrl};
>
> [4]
> for (InboundAuthenticationRequestConfig config :
> serviceProvider.getInboundAuthenticationConfig().getInboundAuthenticationRequestConfigs())
> {
>                 String acsUrl = config.getInboundAuthKey();
> }
>
> Is this the way to get the property values whatever we set the value for
> that property or Is there any other way to get those values like getting
> the values from authentication context as in outbound authenticators.
>
> Thanks
> Kanapriya Kuleswararajan
> Associate Software Engineer
> Mobile : - 0774894438
> Mail : - kanapriya@wso2.com
>



-- 
Hareendra Chamara Philips
*Software  Engineer*
Mobile : +94 (0) 767 184161
chamarap@wso2.com

[Attachment #5 (text/html)]

<div dir="ltr">Hi,<div><br></div><div>You can get the properties from the  <span \
style="font-size:12.8px">InboundAuthenticationRequestC</span><wbr \
style="font-size:12.8px"><span style="font-size:12.8px">onfig by using \
config.getProperties() method.  </span></div></div><div class="gmail_extra"><br><div \
class="gmail_quote">On Fri, Oct 28, 2016 at 1:02 PM, Kanapriya Kuleswararajan <span \
dir="ltr">&lt;<a href="mailto:kanapriya@wso2.com" \
target="_blank">kanapriya@wso2.com</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div dir="ltr"><div><div><div>Hi All,<br><br></div>In \
outbound authenticators, we have set required properties in authenticator UI as in \
[1] and get the values for that properties from the authentication context as in \
[2]<br>[1]<br>List&lt;Property&gt; configProperties = new \
ArrayList&lt;&gt;();<br>Property apiKey = new \
Property();<br>apiKey.setName(Constants.APIKE<wbr>Y);<br>apiKey.setDisplayName(Constan \
t<wbr>s.APIKEY);<br>apiKey.setRequired(true);<br>configProperties.add(apiKey);<br><br>[2]<br>Map&lt;String, \
String&gt; authenticatorProperties = \
context.getAuthenticatorProper<wbr>ties();<br><br></div>In Inbound authenticators \
also, we have set the UI properties as in [3]. Here we can get the value for acsUrl \
as in [4]<br><br>[3]<br>Property acsUrl = new \
Property();<br>acsUrl.setName(Constants.acsUr<wbr>l);<br>acsUrl.setDisplayName(Constant<wbr>s.acsUrl);<br>return \
new Property[]{acsUrl};<br><br>[4]<br>for (InboundAuthenticationRequestC<wbr>onfig \
config : serviceProvider.getInboundAuth<wbr>enticationConfig().getInboundA<wbr>uthenticationRequestConfigs()) \
{<br>                               String acsUrl = \
config.getInboundAuthKey();<br>}<br><br>Is this the way to get the property values \
whatever we set the value for that property or Is there any other way to get those \
values like getting the values from authentication context as in outbound \
authenticators.<br> <br></div>Thanks<span class="HOEnZb"><font \
color="#888888"><br><div><div><div><div><div><div><div><div \
class="m_7042793887024023511m_8189889556606872706gmail_signature"><div \
dir="ltr"><div><div><div>Kanapriya Kuleswararajan<br></div>Associate Software \
Engineer<br></div>Mobile : - 0774894438<br></div>Mail : - <a \
href="mailto:kanapriya@wso2.com" \
target="_blank">kanapriya@wso2.com</a><br></div></div></div> \
</div></div></div></div></div></div></font></span></div> </blockquote></div><br><br \
clear="all"><div><br></div>-- <br><div class="gmail_signature" \
data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div \
dir="ltr"><div><div dir="ltr"><span>Hareendra Chamara Philips<br><div><b \
style="color:rgb(0,0,0);font-family:arial,helvetica,sans-serif">Software   \
Engineer</b><br></div><div>Mobile : <a href="tel:%2B94%20%280%29%20767%20184161" \
value="+94773451194" target="_blank">+94 (0) 767 184161</a><br></div><div><a \
href="mailto:chamarap@wso2.com" \
target="_blank">chamarap@wso2.com</a></div></span><br></div></div></div></div></div></div></div></div>
 </div>



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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic