Usage

First, make sure you have access to the API Key and Secret for your application:

  • Navigate to the applications page.
  • Click on your application.
  • Scroll down to the "Access Information" section.
  • Grab the Key and Secret.

Establish a tunnel to a local port using the following command:

ssofy listen 8080 -k <YOUR-API-KEY>

Alternatively, you may want to simply share a directory containing json files for testings:

ssofy serve <DIR> -k <YOUR-API-KEY> -s <YOUR-API-SECRET>

The API Secret is required with serving files as the CLI tool's debugger automatically calculates and attaches the Signature header to response messages.

Here is example files you may use in case you want to give the functionality a try:

First create a directory named ssofy:

mkdir ssofy

Now let's create files:

# client.json
echo '{
  "id": "test",
  "name": "Test Client",
  "secret": "secret",
  "redirect_uris": [
    "*"
  ]
}' > ./ssofy/client.json

# scopes.json
echo '[
  {
    "id": "email",
    "title": "Your email address.",
    "icon": "fa-envelope"
  },
  {
    "id": "profile",
    "title": "Access to information like name, birthday and gender.",
    "icon": "fa-user-shield",
    "description": null,
    "url": null
  }
]' > ./ssofy/scopes.json

# user.json
echo '{
  "id": "1",
  "hash": "1",
  "display_name": "Test User"
}' > ./ssofy/user.json

# auth.json
echo '{
  "user": {
    "id": "1",
    "hash": "1",
    "display_name": "Test User"
  }
}' > ./ssofy/auth.json

By default, incoming requests are routed to the following paths:

ResourcePath
client/ssofy/client
scopes/ssofy/scopes
user/ssofy/user
password_auth/ssofy/auth/password
token_auth/ssofy/auth/token
social_auth/ssofy/auth/social
otp_options/ssofy/otp-options
event/ssofy/event

If you wish to route to specific paths, you may configure them within the CLI's config file. The config file must be a json file named ssofy.json within the directory of the binary execution:

echo '{
    "paths": {
        "client": "/ssofy/client",
        "scopes": "/ssofy/scopes",
        "user": "/ssofy/user",
        "password_auth": "/ssofy/auth",
        "token_auth": "/ssofy/auth",
        "social_auth": "/ssofy/auth",
        "otp_options": "/ssofy/otp-options",
        "event": "/ssofy/event"
    }
}' > ssofy.json

You may also configure path visually within the web-based debugger application.

Upon a successful login, you'll be redirected to the web-based debugger application. From there, you'll have access to tools like initiating a login flow, monitoring and debugging requests, and configuring paths.

ssofyKnowledge Base
At our core, we believe that staying up-to-date with the latest trends and advancements in Authentication and related areas is essential. That's why we take great pride in keeping you informed with the latest insights, updates, and news in this rapidly evolving landscape.


Do you need support?
SSOfy is by Cubelet Ltd.
Copyright © 2024 Cubelet Ltd. All rights reserved.