Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

redneb/hubic-auth-swift

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

24 Commits

Repository files navigation

hubic-auth-swift

hubiC is a file hosting service that supports accessing the files via the OpenStack Swift API. Unfortunately, hubiC does not support the standard Swift authentication mechanism and instead uses one based on OAuth 2.0. Consequently, it is not possible to use most of Swift client applications with hubiC. hubic-auth-swift is a simple solution to that problem: it provides a single stand-alone executable that acts as an authentication gateway, enabling applications to access a hubiC account via the standard Swift v1 authentication method.

DISCLAIMER: I am not affiliated with hubiC or OVH. This is a tool I developed for my personal use and is not officially supported by hubiC.

Getting started

  1. Download the executable for your OS (precompiled binaries for Linux, Mac OS X, and Windows are provided).
  2. Execute it.
  3. Visit http://localhost:8080/ with your favorite browser.
  4. Follow the instructions.

Features

  • A single stand-alone executable.
  • Cross platform (Linux, Mac OS X, Windows, and others).
  • Caches authentication tokens.
  • Includes an in-browser setup guide.
  • Can be used behind a reverse proxy.
  • Supports multiple hubiC applications (i.e. apps with different client IDs).

Usage

Usage: hubic-auth-swift [OPTION]...
 -p NUM --port=NUM port to listen on (default: 8080)
 -a HOST --address=HOST address to listen on (default: 127.0.0.1)
 -t NUM --max-cache-ttl=NUM maximum time (in minutes) to cache auth tokens (default: 30)
 -u URL --base-url=URL the URL that this server is reachable at if reverse proxied
 -h --help display this help and exit

Compiling from source

In order to compile hubic-auth-swift you need a haskell development environment. For that, you can use the haskell platform. Alternatively, you can just install GHC and cabal-install. After you have setup the haskell environment, hubic-auth-swift can be compiled as follows:

cabal update
cd /path/to/hubic-auth-swift/sources
cabal sandbox init
cabal install

The resulting binary will be available at .cabal-sandbox/bin.

Similar projects

About

Swift v1 authentication for hubiC

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

AltStyle によって変換されたページ (->オリジナル) /