Skip to content

Instantly share code, notes, and snippets.

@danil
Last active August 29, 2015 14:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danil/a891dacfb25c73fddefd to your computer and use it in GitHub Desktop.
Save danil/a891dacfb25c73fddefd to your computer and use it in GitHub Desktop.
Fhirwall

Fhirface with OAuth2

git clone https://github.com/fhirbase/fhirface.git

If node.js is not installed get nvm (node version manager)

Then

nvm install 0 && nvm use 0

And then

cd /path/to/fhirface && npm install

Build

echo '{' \
    '"description": "Fhirface wiht OAuth2", ' \
    '"name": "fhirface-oauth", ' \
    '"server": "http://your-fhirplace-domain/api/app", ' \
    '"title": "Fhirface oauth", '\
    '"version": "0.0.0"' \
    '}' > /path/to/fhirface/src/fhir.json

BASEURL='http://your-fhirwall-domain/fhir' \
    OAUTH_CLIENT_ID='your-client-id' \
    OAUTH_CLIENT_SECRET='your-client-secret' \
    OAUTH_REDIRECT_URI='http://your-fhirplace-domain/fhirface-oauth/#/redirect' \
    OAUTH_SCOPE='all' \
    OAUTH_RESPONSE_TYPE='token' \
    OAUTH_AUTHORIZE_URI='http://your-fhirwall-domain/oauth/authorize' \
    npm run-script build

Deploy

`npm bin`/fhirbase

Fhirwall face

git clone https://github.com/fhirbase/fhirwall-face.git

If node.js is not installed get nvm (node version manager)

Then

nvm install 0 && nvm use 0

And then

cd /path/to/fhirwall-face && npm install

Build

echo '{' \
    '"description": "Fhirwall crud", ' \
    '"name": "fhirwall", ' \
    '"server": "http://your-fhirplace-domain/api/app", ' \
    '"title": "Fhirwall", '\
    '"version": "0.0.0"' \
    '}' > /path/to/fhirwall-face/src/fhir.json

SERVER_URI=http://your-fhirplace-domain npm run-script build

Deploy

`npm bin`/fhirbase

Get keys

Go to http://your-fhirplace-domain/fhirwall. Create OAuth2 client application. Set redirect_uri to http://your-fhirplace-domain/fhirface-oauth/#/redirect. Set homepage_uri to http://your-fhirplace-domain/fhirface-oauth/#/. Get client_id and client_secret (after OAuth2 client created).

Fhirwall

Asume Fhirwall will be on http://your-fhirwall-domain

git clone https://github.com/fhirbase/fhirwall.git
git submodule init
git submodule update

PostgreSQL

cd path/to/fhirwall
psql -U youruser -h yourhost -p yourport yourdb < oauth.sql

Clojure

cd path/to/fhirwall
cp lein-env.tpl .lein-env
lein run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment