LEARNING

Getting Started with Circle Access 360

The steps listed below will get Circle Access 360 up and running on your web server to provided automatic, credential-less login on computers with Circle Access installed.

Prerequisites:

  • Apache
  • PHP
  • Curl

First step, create a folder on your web server.  In my case, I’m using a local Apache server pointing at the /websites folder.

Create a folder to hold new web site, I’m using ca360.

Clone the project files from the following repository

https://github.com/circlesystems/circle-access-360

Once cloned it should look something like this.

Open a browser and browse to the website you just created and you should see the demo site:

Of course, the Login with Circle button won’t work just yet, we need to do a bit more.  Head on over to https://console.gocircle.ai and setup an application.  Here’s the one that I set up based on the sample code.

After you have your application setup, click the little magnifying glass and get the keys. 

THIS IS WHERE WE INSERT THE NEW LICENSING SCREEN SHOWING ALL THE KEYS AT ONCE.

You’ll need to enter these keys in the ajax\constants.php file (eg for me it’s C:\websites\ca360\ajax\constants.php).  I had to hide the actual values with <snip>.

<?php
    
    // Get these ones from www.gocircle.ai - create account and get the credentials
    define('CUSTOMERID', <*** snip ***>');
    define('APPKEY', <*** snip ***>');
    define('ENDUSERID', 'userman'); // anything, but should be different for every user
    define('SECRET', '<*** snip ***>');
    define('APIURL', 'https://api.gocircle.ai/api/token');
    
    
    // get these ones from https://console.gocircle.ai/ - create a new application and get the credentials
    // for the FIELD return url - use:
    // https://<yourdomain>/<yourfolder_with_this_project>/callback.php  <--- this file is on the root of the project
    define('ACCESS_APPKEY', '<*** snip ***>');
    define('ACCESS_LOGIN_URL', 'https://circleauth.gocircle.ai/login/<*** snip ***>);
    define('ACCESS_READ_KEY', '<*** snip ***>');
    define('ACCESS_WRITE_KEY', '<*** snip ***>');
    define('CIRCLEAUTH_DOMAIN', 'https://circleauth.gocircle.ai/');
?>

You’ll also need to add the AppKey to \js\constants.js (for me: C:\websites\ca360\js\constants.js)

const appKey = "<*** snip ***>"; // this is your gocircle.ai app key - NOT the console one

After all those have been values have been replaced, open up your browser and give it a shot!

For me it’s http://127.0.0.1/ca360/index.html\

Then click the big ‘Login with Circle’ and after a few seconds.