Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.0
    • Fix Version/s: 1.3
    • Component/s: HTTP Interface
    • Labels:
      None
    • Skill Level:
      New Contributors Level (Easy)

      Description

      On a successful cookie-auth login (POST to _session), CouchDB will redirect the user to the URI specified in the 'next' query parameter. This is useful for adding authentication to applications that can't rely on javascript being enabled on the client. To make this functionality more useful, there should be a complimentary 'fail' redirect.

        Activity

        Matt Cooley created issue -
        Hide
        Matt Cooley added a comment -

        Patch adds support for specifying a redirect in the 'fail' member of the query string.

        Usage:
        POST 'name=

        {username}

        &password=

        {passsword}

        ' to
        _session?next=/redirect/here/on/success&fail=/redirect/here/on/fail

        Tests included.

        Show
        Matt Cooley added a comment - Patch adds support for specifying a redirect in the 'fail' member of the query string. Usage: POST 'name= {username} &password= {passsword} ' to _session?next=/redirect/here/on/success&fail=/redirect/here/on/fail Tests included.
        Matt Cooley made changes -
        Field Original Value New Value
        Attachment 0001-POST-to-_session-now-redirects-to-the-URI-given-in-t.patch [ 12451507 ]
        Matt Cooley made changes -
        Description On a successful login (POST to _session), CouchDB will redirect the user to the URI specified in the 'next' query parameter. This is useful for adding authentication to applications that can't rely on javascript being enabled on the client. To make this functionality more useful, there should be a complimentary 'fail' redirect. On a successful cookie-auth login (POST to _session), CouchDB will redirect the user to the URI specified in the 'next' query parameter. This is useful for adding authentication to applications that can't rely on javascript being enabled on the client. To make this functionality more useful, there should be a complimentary 'fail' redirect.
        Paul Joseph Davis made changes -
        Skill Level New Contributors Level (Easy)
        Hide
        Jan Lehnardt added a comment -

        I like the patch & tests, but it no longer applies to trunk. Can you update the patch?

        Show
        Jan Lehnardt added a comment - I like the patch & tests, but it no longer applies to trunk. Can you update the patch?
        Jan Lehnardt made changes -
        Fix Version/s 1.1 [ 12314933 ]
        Hide
        Simon Leblanc added a comment -

        I updated the patch.

        (I didn't change a thing but I used the latest rev from trunk)
        Hope it helps!

        Show
        Simon Leblanc added a comment - I updated the patch. (I didn't change a thing but I used the latest rev from trunk) Hope it helps!
        Simon Leblanc made changes -
        Hide
        Simon Leblanc added a comment -

        I don't know why I sent a svn patch… Here is the git one!

        Show
        Simon Leblanc added a comment - I don't know why I sent a svn patch… Here is the git one!
        Simon Leblanc made changes -
        Jan Lehnardt made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Fix Version/s 1.3 [ 12318350 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Matt Cooley
          • Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 0.5h
              0.5h
              Remaining:
              Remaining Estimate - 0.5h
              0.5h
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development