No description, website, or topics provided.
Java
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
web
.gitignore
LICENSE
README.md
build.gradle
settings.gradle

README.md

Bit6 Token Generator for Java

A super simple application demonstrating the external authentication in Bit6.

Prerequisites

Running Locally

Make sure you have Gradle installed.

$ git clone git@github.com:bit6/bit6-token-generator-java.git
$ cd bit6-token-generator-java

Specify your Bit6 API key and secret in com.bit6.auth.SampleServlet source code or set the environment variables:

export BIT6_API_KEY=abc
export BIT6_API_SECRET=xyz

Start the application

$ gradle appRun

Your app should now be running on localhost:5000.

Generating a Token

You would normally generate an external token by doing a POST from your app client to your application server. To simulate this using curl:

curl -X POST \
    -H "Content-Type: application/json" \
    -d '{"identities": ["usr:john","tel:+12123331234"]}' \
    http://localhost:5000/auth

The response should be a JSON object:

{
    "ext_token": "..."
}