<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Just one small thing to clarify. Maybe
      you're already aware for it (Sorry for spaming then ) <span
        class="moz-smiley-s1"><span> :-) </span></span><br>
      <br>
      The "scope=openid" should be always there per OIDC specification.
      So if you want to add "offline_access" or other scope value, the
      parameter should be like "scope=openid offline_access" (encoded
      value is "openid%20offline_access" ).<br>
      <br>
      Marek<br>
      <br>
      On 31/08/16 12:43, Sebastien Blanc wrote:<br>
    </div>
    <blockquote
cite="mid:CAMZCGg-ZCoPaRAxoc+wZGYU9BnyeeN2dxiqUq_n=r7xf79VmjA@mail.gmail.com"
      type="cite">
      <div dir="ltr">Well yes there is an ugly workaround :) , in your
        node_modules/keycloak-connnect/index.js at line 304 , you can
        replace openid with offline_access<br>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Wed, Aug 31, 2016 at 12:39 PM,
          sheishere b <span dir="ltr">&lt;<a moz-do-not-send="true"
              href="mailto:sheishere48@gmail.com" target="_blank">sheishere48@gmail.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">Is there some workaround ? Is it possible to
              override the login url &amp; replace "scope=openid" to
              "scope=offline" ?</div>
            <div class="HOEnZb">
              <div class="h5">
                <div class="gmail_extra"><br>
                  <div class="gmail_quote">On Wed, Aug 31, 2016 at 2:39
                    PM, sheishere b <span dir="ltr">&lt;<a
                        moz-do-not-send="true"
                        href="mailto:sheishere48@gmail.com"
                        target="_blank"><a class="moz-txt-link-abbreviated" href="mailto:sheishere48@gmail.com">sheishere48@gmail.com</a></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">Ok, thanks.
                        <div>It would be great if you could create jira
                          &amp; share the information. </div>
                      </div>
                      <div>
                        <div>
                          <div class="gmail_extra"><br>
                            <div class="gmail_quote">On Wed, Aug 31,
                              2016 at 2:03 PM, Sebastien Blanc <span
                                dir="ltr">&lt;<a moz-do-not-send="true"
                                  href="mailto:sblanc@redhat.com"
                                  target="_blank">sblanc@redhat.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>I just made some tests and
                                      looked at the nodejs adapter code,
                                      it doesn't look like it supports
                                      offline_access since it's
                                      hardcoded to "scope=openid" ( <a
                                        moz-do-not-send="true"
href="https://github.com/keycloak/keycloak-nodejs-connect/blob/master/index.js#L304"
                                        target="_blank"><a class="moz-txt-link-freetext" href="https://github.com/keycloak/ke">https://github.com/keycloak/ke</a><wbr>ycloak-nodejs-connect/blob/mas<wbr>ter/index.js#L304</a>
                                      ).<br>
                                      <br>
                                    </div>
                                    Fix would be quite simple since we
                                    have access to the original url
                                    query parameters through the
                                    redirectUrl parameter of the
                                    function. <br>
                                    <br>
                                  </div>
                                  I can create a jira for this. <br>
                                  <br>
                                   <br>
                                </div>
                                <div>
                                  <div>
                                    <div class="gmail_extra"><br>
                                      <div class="gmail_quote">On Wed,
                                        Aug 31, 2016 at 9:43 AM, Stian
                                        Thorgersen <span dir="ltr">&lt;<a
                                            moz-do-not-send="true"
                                            href="mailto:sthorger@redhat.com"
                                            target="_blank"><a class="moz-txt-link-abbreviated" href="mailto:sthorger@redhat.com">sthorger@redhat.com</a></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">Do we support
                                            offline_access param in
                                            Node.js adapter?</div>
                                          <div>
                                            <div>
                                              <div class="gmail_extra"><br>
                                                <div class="gmail_quote">On
                                                  31 August 2016 at
                                                  09:11, Marek Posolda <span
                                                    dir="ltr">&lt;<a
                                                      moz-do-not-send="true"
href="mailto:mposolda@redhat.com" target="_blank"><a class="moz-txt-link-abbreviated" href="mailto:mposolda@redhat.com">mposolda@redhat.com</a></a>&gt;</span>
                                                  wrote:<br>
                                                  <blockquote
                                                    class="gmail_quote"
                                                    style="margin:0 0 0
                                                    .8ex;border-left:1px
                                                    #ccc
                                                    solid;padding-left:1ex">
                                                    <div
                                                      bgcolor="#FFFFFF"
                                                      text="#000000">
                                                      <div>It depends if
                                                        keycloak-nodejs
                                                        adapter has some
                                                        nice support for
                                                        "inject" the
                                                        custom value of
                                                        scope parameter
                                                        into the initial
                                                        Keycloak login (
                                                        AuthorizationEndpoint

                                                        ) URL.<br>
                                                        <br>
                                                        Our java adapter
                                                        has support for
                                                        it, as it
                                                        "forwards" the
                                                        value of scope
                                                        parameter from
                                                        the secured URL
                                                        to the Keycloak
                                                        login URL. For
                                                        example if you
                                                        open <a
                                                          moz-do-not-send="true"
href="http://localhost:/yourapp/secured?scope=offline_access"
                                                          target="_blank">"<a class="moz-txt-link-freetext" href="http://localhost:/yourapp/sec">http://localhost:/yourapp/sec</a><wbr>ured?scope=offline_access"</a>,
                                                        the adapter
                                                        forwards the
                                                        "scope=offline_access"
                                                        to the Keycloak.
                                                        Our keycloak.js
                                                        adapter also has
                                                        support for
                                                        adding custom
                                                        scope. However
                                                        not really sure
                                                        about
                                                        keycloak-nodejs-connect.<br>
                                                        <br>
                                                        Maybe either
                                                        someone more
                                                        familiar with
                                                        keycloak nodeJS
                                                        adapter will
                                                        reply. Or you
                                                        can try to dig
                                                        yourself and
                                                        eventually
                                                        create JIRA (or
                                                        even better send
                                                        PR) for adding
                                                        the missing
                                                        functionality.<br>
                                                        <br>
                                                        Marek
                                                        <div>
                                                          <div><br>
                                                          <br>
                                                          On 30/08/16
                                                          11:51,
                                                          sheishere b
                                                          wrote:<br>
                                                          </div>
                                                        </div>
                                                      </div>
                                                      <blockquote
                                                        type="cite">
                                                        <div>
                                                          <div>
                                                          <div dir="ltr">
                                                          <div>Hello,</div>
                                                          <div><br>
                                                          </div>
                                                          <div>From
                                                          nodejs, I am
                                                          trying to
                                                          integrate with
                                                          keycloak
                                                          server.</div>
                                                          <div>Have
                                                          followed the
                                                          steps
                                                          mentioned in <a
moz-do-not-send="true"
                                                          href="https://github.com/keycloak/keycloak-nodejs-connect"
target="_blank"><a class="moz-txt-link-freetext" href="https://github.com/keycloak/ke">https://github.com/keycloak/ke</a><wbr>ycloak-nodejs-connect</a> </div>
                                                          <div>But I
                                                          need to use
                                                          offline access
                                                          to generate
                                                          offline token
                                                          as mentioned
                                                          here, <a
                                                          moz-do-not-send="true"
href="https://keycloak.gitbooks.io/server-adminstration-guide/content/v/2.1/topics/sessions/offline.html"
target="_blank"><a class="moz-txt-link-freetext" href="https://keycloak.gitbooks.io/s">https://keycloak.gitbooks.io/s</a><wbr>erver-adminstration-guide/cont<wbr>ent/v/2.1/topics/sessions/offl<wbr>ine.html</a> </div>
                                                          <div>How can
                                                          this be done
                                                          from nodejs?</div>
                                                          </div>
                                                          <br>
                                                          <fieldset></fieldset>
                                                          <br>
                                                          </div>
                                                        </div>
                                                        <pre>______________________________<wbr>_________________
keycloak-user mailing list
<a moz-do-not-send="true" href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.jboss.org</a>
<a moz-do-not-send="true" href="https://lists.jboss.org/mailman/listinfo/keycloak-user" target="_blank">https://lists.jboss.org/mailma<wbr>n/listinfo/keycloak-user</a></pre>
    </blockquote>
    

  </div>


______________________________<wbr>_________________

keycloak-user mailing list

<a moz-do-not-send="true" href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.jboss.org</a>

<a moz-do-not-send="true" href="https://lists.jboss.org/mailman/listinfo/keycloak-user" rel="noreferrer" target="_blank">https://lists.jboss.org/mailma<wbr>n/listinfo/keycloak-user</a>
</blockquote></div>
</div>
</div></div>
______________________________<wbr>_________________

keycloak-user mailing list

<a moz-do-not-send="true" href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.jboss.org</a>

<a moz-do-not-send="true" href="https://lists.jboss.org/mailman/listinfo/keycloak-user" rel="noreferrer" target="_blank">https://lists.jboss.org/mailma<wbr>n/listinfo/keycloak-user</a>
</blockquote></div>
</div>
</div></div>
______________________________<wbr>_________________

keycloak-user mailing list

<a moz-do-not-send="true" href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.jboss.org</a>

<a moz-do-not-send="true" href="https://lists.jboss.org/mailman/listinfo/keycloak-user" rel="noreferrer" target="_blank">https://lists.jboss.org/mailma<wbr>n/listinfo/keycloak-user</a>
</blockquote></div>
</div>
</div></div></blockquote></div>
</div>
</div></div></blockquote></div>
</div>


<fieldset class="mimeAttachmentHeader"></fieldset>
<pre wrap="">_______________________________________________
keycloak-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:keycloak-user@lists.jboss.org">keycloak-user@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/keycloak-user">https://lists.jboss.org/mailman/listinfo/keycloak-user</a></pre>

</blockquote>
</body></html>