Skip to content

Instantly share code, notes, and snippets.

@diwakergupta
diwakergupta / blockstack-cla.md
Last active January 3, 2020 17:46
Blockstack Contributor License Agreement

Blockstack Contributor Agreement

Thank you for your interest in contributing to Blockstack Public Benefit Corporation ("We" or "Us"). The purpose of this contributor agreement ("Agreement") is to clarify and document the rights granted by contributors to Us. To make this document effective, please follow the instructions at https://cla-assistant.io/blockstack/

1. Definitions

  • "You" means the Copyright owner who submits a Contribution to Us. If You are an employee and submit the Contribution as part of your employment, You represent that Your employer has approved this Agreement.
  • "Contribution" means any original work of authorship (software or documentation) including any modifications or additions to an existing work, Submitted by You to Us, in which You own the Copyright. If You do not own the Copyright in the entire work of authorship, please contact Us at legal@blockstack.com.
  • "Copyright" means all rights protecting works of authorship owned or controlled by You, including copyright, moral an
Verifying my Blockstack ID is secured with the address 1JMyoMJEYqr4xhtGj53k4dTJjzQRJYJPp8 https://explorer.blockstack.org/address/1JMyoMJEYqr4xhtGj53k4dTJjzQRJYJPp8
--- a/apis/swift/src/main/java/org/jclouds/openstack/swift/CommonSwiftAsyncClient.java
+++ b/apis/swift/src/main/java/org/jclouds/openstack/swift/CommonSwiftAsyncClient.java
@@ -39,7 +39,8 @@ import org.jclouds.blobstore.functions.ReturnNullOnContainerNotFound;
import org.jclouds.blobstore.functions.ReturnNullOnKeyNotFound;
import org.jclouds.http.functions.ParseETagHeader;
import org.jclouds.http.options.GetOptions;
-import org.jclouds.openstack.filters.AuthenticateRequest;
+// import org.jclouds.openstack.filters.AuthenticateRequest;
+import org.jclouds.openstack.keystone.v2_0.filters.AuthenticateRequest;
import org.jclouds.openstack.swift.binders.BindIterableToHeadersWithContainerDeleteMetadataPrefix;
func init() {
// These are not registered in the oauth library by default
oauth2.RegisterBrokenAuthHeaderProvider("https://api.dropboxapi.com")
oauth2.RegisterBrokenAuthHeaderProvider("https://api-dbdev.dev.corp.dropbox.com")
}
var brokenAuthHeaderProviders = []string{
"https://accounts.google.com/",
"https://api.dropbox.com/",
//... elided for brevity
"https://www.googleapis.com/",
"https://www.linkedin.com/",
}
func RegisterBrokenAuthHeaderProvider(tokenURL string) {
brokenAuthHeaderProviders = append(brokenAuthHeaderProviders, tokenURL)
// providerAuthHeaderWorks reports whether the OAuth2 server identified by the tokenURL
// implements the OAuth2 spec correctly
// See https://code.google.com/p/goauth2/issues/detail?id=31 for background.
// In summary:
// - Reddit only accepts client secret in the Authorization header
// - Dropbox accepts either it in URL param or Auth header, but not both.
// - Google only accepts URL param (not spec compliant?), not Auth header
// - Stripe only accepts client secret in Auth header with Bearer method, not Basic
func providerAuthHeaderWorks(tokenURL string) bool {
// These are not registered in the oauth library by default
oauth2.RegisterBrokenAuthHeaderProvider("https://api.dropboxapi.com")
conf := &oauth2.Config{
ClientID: appKey,
ClientSecret: appSecret,
Endpoint: oauth2.Endpoint{
AuthURL: "https://www.dropbox.com/1/oauth2/authorize",
TokenURL: "https://api.dropboxapi.com/1/oauth2/token",
},
}
conf := &oauth2.Config{
ClientID: appKey,
ClientSecret: appSecret,
Endpoint: oauth2.Endpoint{
AuthURL: "https://www.dropbox.com/1/oauth2/authorize",
TokenURL: "https://api.dropbox.com/1/oauth2/token",
},
}
<VirtualHost *:80>
ServerName example.com
DocumentRoot /home/diwaker/example.com
<Directory /home/diwaker/example.com>
Options FollowSymLinks
AllowOverride Limit Options FileInfo
DirectoryIndex index.php
Require all granted
</Directory>