<p dir="ltr">Try changing [:email_domain] to ["email_domain"]</p>
<div class="gmail_quote">On May 14, 2015 5:23 AM, "Emyr James" <<a href="mailto:ej4@sanger.ac.uk">ej4@sanger.ac.uk</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
I used the instrumented branch of the sso server and the stack trace said the problem was in line 59 in /sso-devise-omniauth-provider/app/controllers/users/omniauth_callbacks_controller.rb<br>
<br>
I modified the code to this...<br>
<br>
  def ldap<br>
    begin<br>
      puts '******'<br>
      puts CfiOauthProvider::Application.config.use_ldap[:email_domain]<br>
      puts '******'<br>
      puts request.env['omniauth.auth']['info']['nickname']<br>
      puts '******'<br>
      @user = User.authenticate(:ldap,<br>
request.env['omniauth.auth']['info']['nickname'] + "@" + CfiOauthProvider::Application.config.use_ldap[:email_domain],<br>
                                request.env['omniauth.auth']['uid'],<br>
                                current_user)<br>
<br>
...and I get this in the apache error log :<br>
<br>
App 14046 stdout: (ldap) Callback phase initiated.<br>
App 14046 stdout: ******<br>
App 14046 stdout:<br>
App 14046 stdout:<br>
App 14046 stdout: ******<br>
App 14046 stdout:<br>
App 14046 stdout: ej4<br>
App 14046 stdout:<br>
App 14046 stdout: ******<br>
App 14046 stdout:<br>
<br>
<br>
Which suggests that this is evaluating to null : CfiOauthProvider::Application.config.use_ldap[:email_domain]<br>
<br>
I have the following (sanitized) in my application.yml...<br>
<br>
  use_ldap:<br>
    title: Sanger LDAP<br>
    host: <a href="http://example.com" target="_blank">example.com</a><br>
    port: 636<br>
    method: ssl<br>
    base: "dc=sanger,dc=ac,dc=uk"<br>
    uid: uid<br>
    email_domain: "<a href="http://sanger.ac.uk" target="_blank">sanger.ac.uk</a>"<br>
<br>
...so email_domain seems to be set properly with the correct indentation. It seems that the issue must be in the code that picks up the config items to create the config dictionary.<br>
<br>
Cheers,<br>
<br>
Emyr<br>
<br>
<br>
<br>
<br>
<br>
<br>
-- <br>
The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a company registered in England with number 2742969, whose registered office is 215 Euston Road, London, NW1 2BE. <br>
_______________________________________________<br>
arvados mailing list<br>
<a href="mailto:arvados@arvados.org" target="_blank">arvados@arvados.org</a><br>
<a href="http://lists.arvados.org/mailman/listinfo/arvados" target="_blank">http://lists.arvados.org/mailman/listinfo/arvados</a><br>
</blockquote></div>