Uploaded image for project: 'Apache Oltu'
  1. Apache Oltu
  2. OLTU-159

Basic authorization in access token request

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Invalid
    • oauth2-1.0.0
    • None
    • oauth2-client
    • None
    • Wildfly 8.1 with basic authorization on token confidential endpoint

    Description

      .h1 basic authorization on token endpoint for confidential clients

      First of all, I'm working with the actual OAuth 2.0 specification: http://tools.ietf.org/html/rfc6749

      During our work on this specification we found the following problem in your library:

      Intro: We are working with a confidential client and the authorization code grant - flow.

      During the step of requesting an access token from the token endpoint, basic authorization is required against the server. This step is done by the library as describen in chapter 4.1.3:
      "If the client type is confidential or the client was issued client credentials (or assigned other authentication requirements), the client MUST authenticate with the authorization server as described in Section 3.2.1."

      You can see this also in the listet http request in this section 4.1.3

      You can fix that problem by adding the basic-authorization header in your "OAuthClient.java", line 63. An example from my side:

      headers.put("Authorization", base64EncodedBasicAuthentication());
      

      with this method:

          private String base64EncodedBasicAuthentication() {
              String up = "username" + ":" + "password";
              byte[] base64 = Base64.encodeBase64(up.getBytes());
              return "Basic " + new String(base64);
          }
      

      But you have to check where to get the username and password from. Those are credentials which should be saved on the client-side, not resource owner!

      Attachments

        Activity

          People

            Unassigned Unassigned
            Boeby ChristofBuechi
            Votes:
            0 Vote for this issue
            Watchers:
            4 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