-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extends the Google Drive support in 2.0.0 by supporting the Google Picker API (also introduces Rails 5.1.z support) #331
Conversation
@@ -2,6 +2,10 @@ | |||
|
|||
module BrowseEverything | |||
class AuthorizationsController < ActionController::Base | |||
include BrowseEverything::Controller::JsonApiRequestable | |||
|
|||
skip_before_action :verify_authenticity_token if respond_to?(:verify_authenticity_token) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These respond_to?(:verify_authenticity_token)
statements were needed in order to support Rails 5.1.z releases.
@serializer = AuthorizationSerializer.new(@authorization) | ||
serialized_json = @serializer.serialized_json | ||
serialized = JSON.parse(serialized_json) | ||
# I do not know why this is happening |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to be an issue with the fast_jsonapi
serialization for Authorizations
5e01b5c
to
1587331
Compare
Controllers which do not implement #verify_authenticity_token; Implementing support for HMAC using SHA-256 for JSON Web Tokens; Providing support for activestorage release 0.1 (for Rails 5.1.z releases); Extending Uploads and UploadFiles to store information regarding Bytestream and Container structure; Implementing partials for the React user interface and a Bootstrap 3 modal containing the React UI; Adjusting the Google Drive support for cases where the OAuth2 token is passed only from a client (as is the case with the Picker API JavaScript client)
1587331
to
235a0f0
Compare
2a35ad4
to
9db03d7
Compare
I've tested this throughout the past two weeks against a custom Samvera repository for integrating Google Drive uploads. In order to advance a 2.0.0.pre.alpha1 pre-release, I'm going to merge this. |
This brings in updates which I've introduced in order to support the usage of a Google Picker API within the React user interface (please see the ongoing work on samvera-deprecated/browse-everything-redux-react@master...jrgriffiniii:issues-319-jrgriffiniii-google-filepicker). This was also developed against an existing Rails 5.1.z app. which is required to use the
0.1
release ofactivestorage
.The Google Picker API is a client-side JavaScript solution for selecting Google Drive items (please see https://developers.google.com/picker/). The interaction with the Rails API for 2.0.0 was most consistent, but there were some adjustments needed for supporting a slightly different approach for OAuth2 authorization.
Advances #319