Shindig
  1. Shindig
  2. SHINDIG-1359

Increase visibility of selected fields in org.apache.shindig.gadgets.oauth.OAuthRequest to make subclassing easier

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0.0-RC2
    • Component/s: Java
    • Labels:
      None

      Description

      We are subclassing OAuthRequest and override its sanitizeAndSign method, which references "accessorInfo", which currently has "private" scope in the superclass.

      This is forcing us to redefine and initialize "accessorInfo" in our subclass, by copying this code from OAuthRequest#fetchNoThrow():

      accessorInfo = fetcherConfig.getTokenStore().getOAuthAccessor(
      realRequest.getSecurityToken(), realRequest.getOAuthArguments(), clientState,
      responseParams, fetcherConfig);

      As a result of this, we also need to redefine "realRequest" in our subclass, because it also has "private" scope in the superclass.

      We might consider broadening the scope of some of the other fields of OAuthRequest, but at a minimum, we should change the visibility of "accessorInfo" and "realRequest" from "private" to "protected".

        Activity

        Hide
        Paul Lindner added a comment -

        requested changes applied.

        Show
        Paul Lindner added a comment - requested changes applied.
        Hide
        Paul Lindner added a comment -

        Also, if you have any code that would be of general use please feel free to send attach it to the jira and I can see about getting it into the base OAuthRequest class.

        Thanks!

        Show
        Paul Lindner added a comment - Also, if you have any code that would be of general use please feel free to send attach it to the jira and I can see about getting it into the base OAuthRequest class. Thanks!
        Hide
        Jan Luehe added a comment -

        Thanks, Paul!

        Jan

        Show
        Jan Luehe added a comment - Thanks, Paul! Jan

          People

          • Assignee:
            Unassigned
            Reporter:
            Jan Luehe
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development