oderwat / hubic2swiftgate Goto Github PK
View Code? Open in Web Editor NEWA HubiC.com to OpenStack Swift Gateway
A HubiC.com to OpenStack Swift Gateway
Hi,
I have this problem with hubic2swiftgate. How can I do to determine the problem ?
Thank you.
Hi!
Just letting you know this exist, https://github.com/jkaberg/docker-hubic2swiftgate
Should ease the setup part :-)
Hi,
I have a 404 not found error when I go to https://hb.my.domaine/register/?client=hubic&password=mypassword
My Apache vhost:
<VirtualHost *:1443>
ServerName hb.my.domaine
DocumentRoot /var/www/hubic2swiftgate/
SSLEngine on
SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP
SSLCertificateFile /etc/ssl/hubic/server.crt
SSLCertificateKeyFile /etc/ssl/hubic/server.key
CustomLog /var/log/apache2/hsgate_ssl_access.log combined
ErrorLog /var/log/apache2/hsgate_ssl_error.log
<Directory "/var/www/hubic2swiftgate/">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
php_admin_flag engine on
</VirtualHost>
php5-curl and curl installed
mod_rewrite and mod_ssl activeted
permission ok:
root@ks:/var/www# ls -alh hubic2swiftgate/
total 44K
drwxrwxr-x 5 www-data www-data 4,0K oct. 26 17:08 .
drwxr-xr-x 9 www-data root 4,0K oct. 26 15:07 ..
drwxrwxr-x 2 www-data www-data 4,0K oct. 26 15:07 cache
-rwxrwxr-x 1 www-data www-data 220 oct. 26 17:08 config.php
-rwxrwxr-x 1 www-data www-data 172 oct. 26 15:07 config.php.sample
drwxrwxr-x 8 www-data www-data 4,0K oct. 26 15:07 .git
-rwxrwxr-x 1 www-data www-data 39 oct. 26 15:07 .gitignore
-rwxrwxr-x 1 www-data www-data 12K oct. 26 15:07 README.md
drwxrwxr-x 2 www-data www-data 4,0K oct. 26 15:45 www
In hubiC account:
Name: swiftraja
URL: https://hb.my.domaine/callback/
idea ?
Thx,
Rajaskank42
Hi, I think than would be cool add info about how config h2sg with caddy server, caddy is really simple, noob friendly and you don't need a big setup (only download the executable) so it could be a good option for those than doesnt need apache or nginx in his machine...
I'm not a caddy expert but I'll try satup it, if someone has more experience please let me know.
If we customise the ip port of the webserver the callback don't work.
To make the "callback" work i have modify this line :
$redirect_uri="https://".$_SERVER['SERVER_NAME']."/callback/";
Replace by :
$redirect_uri="https://".$_SERVER['SERVER_NAME'].":444/callback/";
I just added my server port configuration.
I thinks this must be in config.php ;)
Hello,
I installed Owncloud on a VPS with Nginx and php-fpm
Now i would like to link my Hubic account inside Owncloud using the openstack interface that's why i would like to use the gateway.
Unfortunaltly i don't know how to use/configure it. Owncloud is installed at the root of one of my subdomain. The gateway (simple.php) is in a subfolder called hubic. Another subfolder called cache has been created with config.php at the root path.
When i try to access the register part i got a 404 error code
Here is my nginx configuration (with a dedicated block for /hubic)
server {
listen 80;
listen [::]:80;
server_name cloud.mysubdomain.fr;
return 301 https://$server_name$request_uri;
}
server {
server_name cloud.mysubdomain.fr;
listen 443 ssl;
listen [::]:443 ssl;
include snippets/ssl-cloud.mysubdomain.fr.conf;
include snippets/ssl-params.conf;
index index.php;
root /var/www/cloud;
# set max upload size
client_max_body_size 10G;
fastcgi_buffers 64 4K;
# Disable gzip to avoid the removal of the ETag header
gzip off;
rewrite ^/caldav((/|$).*)$ /remote.php/caldav$1 last;
rewrite ^/carddav((/|$).*)$ /remote.php/carddav$1 last;
rewrite ^/webdav((/|$).*)$ /remote.php/webdav$1 last;
error_page 403 = /core/templates/403.php;
error_page 404 = /core/templates/404.php;
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
location ~ ^/(?:\.htaccess|data|config|db_structure\.xml|README) {
deny all;
}
location / {
# The following 2 rules are only needed with webfinger
rewrite ^/.well-known/host-meta /public.php?service=host-meta last;
rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json last;
rewrite ^/.well-known/carddav /remote.php/carddav/ redirect;
rewrite ^/.well-known/caldav /remote.php/caldav/ redirect;
rewrite ^(/core/doc/[^\/]+/)$ $1/index.html;
try_files $uri $uri/ index.php;
}
location ~ \.php(?:$|/) {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param HTTPS on;
fastcgi_pass unix:/var/run/php5-fpm.sock;
}
location /hubic {
index simple.php;
rewrite ^/(.*)$ /simple.php?/$1 last;
root /var/www/cloud/hubic;
try_files $uri $uri/ /simple.php?$args;
}
# Adding the cache control header for js and css files
# Make sure it is BELOW the location ~ \.php(?:$|/) { block
location ~* \.(?:css|js)$ {
add_header Cache-Control "public, max-age=7200";
# Add headers to serve security related headers
add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;";
add_header X-Content-Type-Options nosniff;
add_header X-Frame-Options "SAMEORIGIN";
add_header X-XSS-Protection "1; mode=block";
add_header X-Robots-Tag none;
# Optional: Don't log access to assets
access_log off;
}
# Optional: set long EXPIRES header on static assets
location ~* \.(?:jpg|jpeg|gif|bmp|ico|png|css|js|swf)$ {
expires 30d;
# Optional: Don't log access to assets
access_log off;
}
}
Any help is welcome.
Thank you
after updating to commit 215efc9 i receive this error:
Notice: Undefined index: SCRIPT_URL in /hubic2swiftgate/www/simple.php on line 26
apache seems to be the only webserver wich supports SCRIPT_URL. php frameworks like symfony2 do use other parameters (https://github.com/symfony/HttpFoundation/blob/master/Tests/RequestTest.php#L453) to detect the correct "prefix".
here is my nginx config (with rewrites):
server {
listen 192.168.0.60:443 ssl;
listen 192.168.0.60:80;
location / {
index simple.php;
rewrite ^/(.*)$ /simple.php?/$1 last;
}
location ~ /simple.php($|/) {
include /opt/local/etc/nginx/fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
}
}
an call to the host https://hub_ic.local with active nginx rewrites return the following var_dump($_SERVER)
array(35) {
["HOME"]=>
string(21) "/Users/christiankrupa"
["QUERY_STRING"]=>
string(1) "/"
["SCRIPT_NAME"]=>
string(11) "/simple.php"
["REQUEST_URI"]=>
string(1) "/"
["DOCUMENT_URI"]=>
string(11) "/simple.php"
["DOCUMENT_ROOT"]=>
string(47) "/Users/christiankrupa/Sites/hubic2swiftgate/www"
["SERVER_SOFTWARE"]=>
string(11) "nginx/1.7.7"
["SERVER_NAME"]=>
string(12) "hub_ic.local"
["SCRIPT_FILENAME"]=>
string(58) "/Users/christiankrupa/Sites/hubic2swiftgate/www/simple.php"
["PATH_INFO"]=>
string(11) "/simple.php"
}
the same call without rewrites (http://localhost/hubic2swiftgate/www/simple.php)
array(33) {
["HOME"]=>
string(21) "/Users/christiankrupa"
["QUERY_STRING"]=>
string(0) ""
["SCRIPT_NAME"]=>
string(31) "/hubic2swiftgate/www/simple.php"
["REQUEST_URI"]=>
string(31) "/hubic2swiftgate/www/simple.php"
["DOCUMENT_URI"]=>
string(31) "/hubic2swiftgate/www/simple.php"
["DOCUMENT_ROOT"]=>
string(27) "/Users/christiankrupa/Sites"
["SERVER_SOFTWARE"]=>
string(11) "nginx/1.7.7"
["SCRIPT_FILENAME"]=>
string(58) "/Users/christiankrupa/Sites/hubic2swiftgate/www/simple.php"
["PATH_INFO"]=>
string(31) "/hubic2swiftgate/www/simple.php"
}
what is the apache response? after comparing the params i think we are able to find a valid solution which does work on different webservers.
I'm trying to setup hubic2swiftgate with lighttpd, I've had some problems so far:
First of all, I couldn't get the registration to work properly, I guess something wrong with my lighttpd config, it wasn't getting the ?password from the url. I hardcoded it in the simple.php and it worked.
Would this be an issue for the hubic2swiftgate backend to work after configuration? I never did find out what's wrong with my lighttpd config.
I can go to http://localhost/usage/ and it works, displays my accurate space stats.
However, I'm trying to mount it with s3ql and no matter what I get:
I'm using login: hubic and passphrase from the h2s config, that's correct?
sudo mkfs.s3ql --debug --backend-options ssl-ca-path=/etc/lighttpd/certs/lighttpd.pem swift://localhost/hubic
Enter backend login:
Enter backend passphrase:
2015-11-09 19:57:28.742 20419 MainThread s3ql.backends.common.get_ssl_context: Reading CA certificates from file /etc/lighttpd/certs/lighttpd.pem
2015-11-09 19:57:28.748 20419 MainThread s3ql.backends.swift._do_request: started with 'GET', '/', None, {'limit': 1}, None, None
2015-11-09 19:57:28.749 20419 MainThread s3ql.backends.swift._do_request: no active connection, calling _get_conn()
2015-11-09 19:57:28.749 20419 MainThread s3ql.backends.swift._get_conn: started
2015-11-09 19:57:28.750 20419 MainThread s3ql.backends.swift._get_conn: GET /v1.0
2015-11-09 19:57:28.795 20419 MainThread root.excepthook: No permission to access backend.
This is my lighttpd config:
# This is a minimal example config
# See /usr/share/doc/lighttpd
# and http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ConfigurationOptions
server.port = 80
server.username = "http"
server.groupname = "http"
server.document-root = "/srv/http/hubic2swiftgate/www"
server.errorlog = "/var/log/lighttpd/error.log"
dir-listing.activate = "disable"
index-file.names = ( "index.html" )
server.modules += ( "mod_fastcgi" )
server.modules += ( "mod_scgi" )
server.modules += ( "mod_rewrite" )
$SERVER["socket"] == ":443" {
ssl.engine = "enable"
ssl.pemfile = "/etc/lighttpd/certs/lighttpd.pem"
}
mimetype.assign = (
".rpm" => "application/x-rpm",
".pdf" => "application/pdf",
".sig" => "application/pgp-signature",
".spl" => "application/futuresplash",
".class" => "application/octet-stream",
".ps" => "application/postscript",
".torrent" => "application/x-bittorrent",
".dvi" => "application/x-dvi",
".gz" => "application/x-gzip",
".pac" => "application/x-ns-proxy-autoconfig",
".swf" => "application/x-shockwave-flash",
".tar.gz" => "application/x-tgz",
".tgz" => "application/x-tgz",
".tar" => "application/x-tar",
".zip" => "application/zip",
".mp3" => "audio/mpeg",
".m3u" => "audio/x-mpegurl",
".wma" => "audio/x-ms-wma",
".wax" => "audio/x-ms-wax",
".ogg" => "application/ogg",
".wav" => "audio/x-wav",
".gif" => "image/gif",
".jar" => "application/x-java-archive",
".jpg" => "image/jpeg",
".jpeg" => "image/jpeg",
".png" => "image/png",
".xbm" => "image/x-xbitmap",
".tar.gz" => "application/x-tgz",
".tgz" => "application/x-tgz",
".tar" => "application/x-tar",
".zip" => "application/zip",
".mp3" => "audio/mpeg",
".m3u" => "audio/x-mpegurl",
".wma" => "audio/x-ms-wma",
".wax" => "audio/x-ms-wax",
".ogg" => "application/ogg",
".wav" => "audio/x-wav",
".gif" => "image/gif",
".jar" => "application/x-java-archive",
".jpg" => "image/jpeg",
".jpeg" => "image/jpeg",
".png" => "image/png",
".xbm" => "image/x-xbitmap",
".xpm" => "image/x-xpixmap",
".xwd" => "image/x-xwindowdump",
".css" => "text/css",
".html" => "text/html",
".htm" => "text/html",
".js" => "text/javascript",
".asc" => "text/plain",
".c" => "text/plain",
".cpp" => "text/plain",
".log" => "text/plain",
".conf" => "text/plain",
".text" => "text/plain",
".txt" => "text/plain",
".dtd" => "text/xml",
".xml" => "text/xml",
".mpeg" => "video/mpeg",
".mpg" => "video/mpeg",
".xwd" => "image/x-xwindowdump",
".css" => "text/css",
".html" => "text/html",
".htm" => "text/html",
".js" => "text/javascript",
".asc" => "text/plain",
".c" => "text/plain",
".cpp" => "text/plain",
".log" => "text/plain",
".conf" => "text/plain",
".text" => "text/plain",
".txt" => "text/plain",
".dtd" => "text/xml",
".xml" => "text/xml",
".mpeg" => "video/mpeg",
".mpg" => "video/mpeg",
".mov" => "video/quicktime",
".qt" => "video/quicktime",
".avi" => "video/x-msvideo",
".asf" => "video/x-ms-asf",
".asx" => "video/x-ms-asf",
".wmv" => "video/x-ms-wmv",
".bz2" => "application/x-bzip",
".tbz" => "application/x-bzip-compressed-tar",
".tar.bz2" => "application/x-bzip-compressed-tar",
# default mime type
"" => "application/octet-stream",
)
scgi.server = ( "/RPC2" =>
( "127.0.0.1" =>
(
"host" => "127.0.0.1",
"port" => 5050,
"check-local" => "disable"
)
)
)
fastcgi.server = ( ".php" => ((
"bin-path" => "/usr/bin/php-cgi",
"socket" => "/tmp/php.socket"
)))
url.rewrite-if-not-file = (
"^(.*)$" => "/simple.php/$1"
)
I'm thinking maybe the problem is with my rewrite rule, but would that even matter after registering with hubic?
Is there a way I can debug what's going wrong with the hubic2swiftgate backend? Or any idea what I might be doing wrong?
Any simple way to determine where the problem is, whether it's with lighttpd, hubic2swiftgate, or s3ql? I can't get anything but " No permission to access backend." from s3ql.
I've setup hubic2swiftgate on a devuan virtual server as described in the readme.
When I try to register the app with hubiC, I get redirected to the hubic2swiftgate homepage not to the success page. The usage page is giving Error 178 without any further details, the apache2 error log is not showing anything.
What can I do to find the error?
You write in the readme :
To register the gateway with hubic visit:
https://yourserver.com/register/?user=hubic&password=mypassword
But the good URL was :
https://yourserver.com/register/?client=hubic&password=mypassword
You may add that the simple.php file should be linked or renamed to a classic index.php in order to setup the gateway.
I am pretty sure that it is possible to make this work for multiple ClientIDs and therefor multiple HubiC Accounts on the same "Gateway". This may be implemented later!
Hello!
First of all thank you very much for everything!
I'm trying to make hubic2swiftgate work but I'm finding some trouble to access this address:
https://issam******.com/register/?client=hubic&password=mypassword
I have an 404 error. What I did is to make the necessary configuration in the file config.php, and the i renamed the folder "hubic2swiftgate-master" to "hsgate", and finally I put the folder in /var/www.
My website does work with SSL. Indeed now I can see the content of /var/www/hsgate, but the I don't understand how to connect with hubiC.
Can someone please give me a hand?
Thanks!
Since revision 24781fe something has been changed and it's not possible anymore to register api_access. The redirect_uri always points to https://yourserver.com(:port)/simple.php/callback/ instead of https://yourserver.com(:port)/callback/
A fix for this would be really great. Thx
http://gyazo.com/7c5653d810a2fb040c947c8ee3fbfe60
the program is posting with /v2.0/tokens ... so its not sending the right things it seams
it would be nice if you could put this on the front page that this works wonders with https://github.com/cloudfs/ftp-cloudfs
README.md suggest to use Python-SwiftClient version 1.9 because of a problem with 2.0.
But it look like the problem is solved in recent version, I just do a "pip install python-swiftclient" that install me the version 2.6 and it work fine with Hubic.
The only change I need when moving from 1.9 is to use "export SWIFTCLIENT_INSECURE=true" because my gateway use a self-signed certificate.
Maybe README.md can be updated to avoid people to use an old version when this is not required.
Or is the problem with a specific function I am not using?
Hello,
After succefully instal the hubic2swiftgate script, set all the config variable I cannot succes for register my client ...
Same error with both autoregister or register mod. I enter my Hubic credential and I give in return :
(I hide with XXX the personal information ;) )
For URL : https://hub.local/autoregister/?client=hubic&password=mypassword&hubic_user=XXX&hubic_password=XXX
I get :
HubiC api server responded with return code: 0
Failed to request authorization code, check client_id or redirect_ur
(same with the register mod, i get
Notice: Undefined variable: uri in C:\xampp\htdocs\hubic\simple.php on line 386
HubiC api server responded with return code: 0 )
What is this error code 0 ? I have make a lot of time on it, so if somebody can help me :) ?
Nota : thanks for this project, it's very useful
Hi Hans,
I'm trying to run ftpcloudfs + hubic2swiftgate on Mac OS X Yosemite (+ Server.app installed).
Have you been able to make it run under such a similar config?
Everytime I want to connect to ftp://[email protected]:2021, I get an error.
I've both tested with MAMP or Apple's Apache.
https://myServerDomain:8890/auth/v1.0/ is when I test with MAMP, else, it's https://myServerDomain/auth/v1.0/ with default OS X Apache.
With MAMP, I'm using a MAMP create autosigned certificate+key
With Apple's Apache, I'm using an Apple autosigned certificate+key create right into the Server.app
Error With Apple Apache
[E 14-11-25 19:59:14] 192.168.1.11:64096-[hubic] Failed to authenticate user hubic: [Errno 8] _ssl.c:507: EOF occurred in violation of protocol
[13683] 2014-11-25 19:59:14,996 - ERROR - 192.168.1.11:64096-[hubic] Failed to authenticate user hubic: [Errno 8] _ssl.c:507: EOF occurred in violation of protocol
Error with MAMP
[54610] 2014-11-28 18:53:34,687 - INFO - Starting new HTTPS connection (1): myServerDomain
/Library/Python/2.7/site-packages/requests/packages/urllib3/connectionpool.py:730: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.org/ en/latest/security.html (This warning will only appear once by default.)
InsecureRequestWarning)
[54610] 2014-11-28 18:53:34,699 - INFO - REQ: curl -i https://myServerDomain:8890/auth/v1.0/ -X GET
[54610] 2014-11-28 18:53:34,700 - INFO - RESP STATUS: 403 Forbidden
[54610] 2014-11-28 18:53:34,700 - INFO - RESP HEADERS: [('content-length', '212'), ('keep-alive', 'timeout=5, max=100'), ('server', 'Apache'), ('connection', 'Keep-Alive'), ('date', 'Fri, 28 Nov 2014 17:53:34 GMT'), ('content- type', 'text/html; charset=iso-8859-1')]
[54610] 2014-11-28 18:53:34,700 - INFO - RESP BODY: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>403 Forbidden</title>
</head><body>
<h1>Forbidden</h1>
<p>You don't have permission to access /auth/v1.0/
on this server.</p>
</body></html>
[E 14-11-28 18:53:34] 192.168.1.11:59039-[hubic] Failed to authenticate user hubic: [Errno 13] Auth GET failed: Forbidden
[54610] 2014-11-28 18:53:34,700 - ERROR - 192.168.1.11:59039-[hubic] Failed to authenticate user hubic: [Errno 13] Auth GET failed: Forbidden
[I 14-11-28 18:53:39] 192.168.1.11:59039-[] USER 'hubic' failed login.
[54610] 2014-11-28 18:53:39,702 - INFO - 192.168.1.11:59039-[] USER 'hubic' failed login.
[I 14-11-28 18:53:42] 192.168.1.11:59039-[] FTP session closed (disconnect).
[54610] 2014-11-28 18:53:42,962 - INFO - 192.168.1.11:59039-[] FTP session closed (disconnect).
By running the command curl -v -k https://myServerDomain:8890/auth/v1.0/
I've the following output
* Hostname was NOT found in DNS cache
* Trying 192.168.1.11...
* Connected to myServerDomain (192.168.1.11) port 8890 (#0)
* TLS 1.0 connection using TLS_DHE_RSA_WITH_AES_256_CBC_SHA
* Server certificate: myServerDomain
> GET /auth/v1.0/ HTTP/1.1
> User-Agent: curl/7.37.1
> Host: myServerDomain:8890
> Accept: */*
>
< HTTP/1.1 403 Forbidden
< Date: Fri, 28 Nov 2014 18:31:10 GMT
* Server Apache is not blacklisted
< Server: Apache
< Content-Length: 212
< Content-Type: text/html; charset=iso-8859-1
<
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>403 Forbidden</title>
</head><body>
<h1>Forbidden</h1>
<p>You don't have permission to access /auth/v1.0/
on this server.</p>
</body></html>
* Connection #0 to host myServerDomain left intact
This one is the ouput with Apple Apache
* Hostname was NOT found in DNS cache
* Trying 192.168.1.11...
* Connected to myServerDomain (192.168.1.11) port 443 (#0)
* TLS 1.0 connection using TLS_DHE_RSA_WITH_AES_256_CBC_SHA
* Server certificate: myServerDomain
> GET /auth/v1.0/ HTTP/1.1
> User-Agent: curl/7.37.1
> Host: myServerDomain
> Accept: */*
>
* HTTP 1.0, assume close after body
< HTTP/1.0 403 Forbidden
< Date: Fri, 28 Nov 2014 18:37:41 GMT
< Server: Apache
< X-Powered-By: PHP/5.5.14
< Expires: Mon, 1 Jan 2000 00:00:00 GMT
< Last-Modified: Fri, 28 Nov 2014 18:37:41 GMT
< Cache-Control: no-store, no-cache, must-revalidate
< Cache-Control: post-check=0, pre-check=0
< Pragma: no-cache
< MS-Author-Via: DAV
< Content-Length: 38
< Connection: close
< Content-Type: text/html
<
* Closing connection 0
AUTH_USER and/or AUTH_KEY are missing!
To make this clear. This software could be extended to be used by "anybody" but the owner of the Gateway would be able to gain access to any Storage used by its users.
I wonder if there is a way to implement it in a way that this is not possible and create an universal public gateway...
Ideas?
Hi,
I tried with an alias in apache:
<VirtualHost *:443>
ServerName ssl.my.domaine
## SSL
SSLEngine on
SSLProtocol all -SSLv2 -SSLv3
SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM
SSLCertificateFile /etc/ssl/startssl/my.domaine.crt
SSLCertificateKeyFile /etc/ssl/startssl/my.domaine.key
SSLCertificateChainFile /etc/ssl/startssl/sub.class1.server.ca.pem
## hubiC
alias /hb /var/www/hubic2swiftgate/www/
<Directory "/var/www/hubic2swiftgate/www/">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
php_admin_flag engine on
## other
alias /other /var/www/other/
<Directory "/var/www/other/">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
etc...
</VirtualHost>
it must also change in simple.php:
switch($request) {
case '/hb/v1.0':
case '/hb/v1.0/':
case '/hb/auth':
case '/hb/auth/':
case '/hb/auth/v1.0':
case '/hb/auth/v1.0/':
$mode='swift';
break;
case '/hb/register':
case '/hb/register/':
$mode='register';
break;
case '/hb/usage':
case '/hb/usage/':
$mode='usage';
break;
case '/hb':
$mode='home';
break;
case '/hb/callback':
case '/hb/callback/':
$mode='callback';
break;
case '/hb/success':
case '/hb/success/':
$mode='success';
break;
And in hubiC account:
URL: https://ssl.my.domaine/hb/callback/
it works very well !
This is useful if you already have a valid certificate (and free like StartSSL) on your server.
And by the way , exellent work!
I greatly increase the transfer rate with ftp-cloudfs compared to the official client :)
I am pretty sure that the code which checks for expire of the OS_Token is not really working "worldwide" (or at all). My main concern are timezone differences. May be that it will work using GMT in the gateway code. Didn't check that so far!
Whereas /register works successfully, /autoregister returns the following error message:
Error on logon or user_pw. Hubic api server responded with return code: 302
Even if I uncomment the line in config.php file:
'autoredirect_uri'=>'https://localhost/callback/', // only needed for autoregister
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.