<div dir="ltr">Hello Peter, Thank you point out my exact need. I think basically we have the Rest API to get the data from our server(database).<div><br></div><div>Now we are doing authentication against our database by using the following code snippet:</div><div>I think the below is HTTP url:</div><div><br></div><div> URL url = new URL("http://ipaddress:port/module/manager");</div><div><span class="" style="white-space:pre">                        </span>HttpURLConnection conn = (HttpURLConnection) url.openConnection();</div><div><span class="" style="white-space:pre">                        </span>conn.setDoOutput(true);</div><div><span class="" style="white-space:pre">                        </span>conn.setRequestMethod("POST");</div><div><span class="" style="white-space:pre">                        </span>conn.setRequestProperty("Content-Type", "<b>application/json;</b> charset=UTF-8");</div><div><span class="" style="white-space:pre">                        </span>OutputStream os = conn.getOutputStream();</div><div><span class="" style="white-space:pre">                        </span>os.write(request.getBytes());</div><div><span class="" style="white-space:pre">                        </span>os.flush();</div><div><span class="" style="white-space:pre">                        </span>if (conn.getResponseCode() != HttpURLConnection.HTTP_OK) {</div><div><span class="" style="white-space:pre">                                </span>throw new RuntimeException("Failed : HTTP error code : "</div><div><span class="" style="white-space:pre">                                                </span>+ conn.getResponseCode());</div><div><span class="" style="white-space:pre">                        </span>}</div><div><br></div><div><span class="" style="white-space:pre">                        </span>BufferedReader br = new BufferedReader(new InputStreamReader(</div><div><span class="" style="white-space:pre">                                        </span>(conn.getInputStream())));</div><div><span class="" style="white-space:pre">                        </span>String output;</div><div><span class="" style="white-space:pre">                        </span>StringBuffer sb = new StringBuffer();</div><div><span class="" style="white-space:pre">                        </span>while ((output = br.readLine()) != null) {</div><div><span class="" style="white-space:pre">                                </span>sb.append(output);</div><div><span class="" style="white-space:pre">                        }</span></div><div><span class="" style="white-space:pre">                        </span>return sb.toString(); </div><div><br></div><div>The above is my 'POST' request along with the username and password as attributes in the request to get the authentication response from our database.</div><div><br></div><div>In the same way how can i write DataConnector in attribute-resolver.xml along with the attribute-definition to get the user <b>Permissions </b>from our database and then IDP can released to the SP</div><div>to do authorization.</div><div><br></div><div>Please respond to this query, is my assumption right?</div><div><br></div><div>Thank you in advance,</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Dec 5, 2014 at 12:05 AM, Peter Schober <span dir="ltr"><<a href="mailto:peter.schober@univie.ac.at" target="_blank">peter.schober@univie.ac.at</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">* Surinaidu Majji <<a href="mailto:pioneer.suri@gmail.com">pioneer.suri@gmail.com</a>> [2014-12-04 12:36]:<br>
<span class="">> if i am correct, Like this can we get the permissions of the user, Please<br>
> give me an example to get the permissions of the user at SP side in saml<br>
> response.<br>
<br>
</span>You get whatever data you need ("the permissions of the user" in your<br>
case) by configuring the attribute resolver as documented, which out<br>
of the box supports RDMBSs/JDBC and LDAP.<br>
<span class="">><br>
> 2) What data source contains this attribute?<br>
> - Here the only source is our database for every information, I can get the<br>
> info from database by sending request with proper url.<br>
<br>
</span>That's still lacking any necessary technical details. What access<br>
protocols does that "database" offer? How does the "proper url" look<br>
like? A HTTP URL? JNDI? Something like "jdbc:oracle:thin:..."?<br>
For everything other than LDAP or JNDI you'll either have to use<br>
contributed code (where some exists that matches the<br>
interfaces/protocols you have available) or write code yourself.<br>
<span class=""><br>
> Please provide me some example with xml configuration, So that i can<br>
> easily handle my task.<br>
<br>
</span>The documentation is full of examples for given protocols/interfaces.<br>
You're not saying exactly how you need to connect to the "database" of<br>
yours, you only keep repeating boilerplate code from your<br>
ExternalAuthn login handler.<br>
<span class="HOEnZb"><font color="#888888">-peter<br>
</font></span><div class="HOEnZb"><div class="h5">--<br>
To unsubscribe from this list send an email to <a href="mailto:users-unsubscribe@shibboleth.net">users-unsubscribe@shibboleth.net</a><br>
</div></div></blockquote></div><br></div>