arr2036 / omnigollum

Omniauth authentication for gollum
MIT License
147 stars 61 forks source link

The base path problem on integrating omniauth-ldap #32

Closed njman closed 9 years ago

njman commented 9 years ago

There was an issue when integrating omniauth-ldap, please check its issue.

Not sure whether the root cause is on omnigollum or not, Just copy that as following:

I want wiki sub-directory, e.g. http://localhost:4567/wiki/Home, /wiki/ is the sub-directory.

Gollum support --base-path option in Rack way, please check the wiki tips. The omnigollum support it by the pull. However, omniauth-ldap has Sign In problem, i.e. always return to Home page once submit. Look around the LDAP Authentication html source:

      <body>
      <h1>LDAP Authentication</h1>
      <form method='post' action='/__omnigollum__/auth/ldap/callback' noValidate='noValidate'>

<label for='username'>Login:</label>
<input type='text' id='username' name='username'/>
<label for='password'>Password:</label>
<input type='password' id='password' name='password'/>
<button type='submit'>Sign In</button>      </form>
      </body>

I doubted on this line:

action='/__omnigollum__/auth/ldap/callback'

should write:

action='/wiki/__omnigollum__/auth/ldap/callback'

Not sure. How to resolve this problem, thanks.

Sorry for the duplicating.

njman commented 9 years ago

closed.