Skip to content
This repository has been archived by the owner on Dec 6, 2022. It is now read-only.

The authorisation server for dwyl/smart-home-security-system

License

Notifications You must be signed in to change notification settings

dwyl/smart-home-auth-server

Repository files navigation

Smart Home Authorization Server

A Phoenix server that allows for IoT devices to check for user access.

Build Status codecov.io

Why?

For our Smart Home Security System we need to be able to identify people and devices and check their access rights. This is a key part of the system and is our 'single source of truth.' It integrates with the Dwyl authentication system using auth_plug and stores as little personal information as possible.

What?

This is a simple Phoenix-Based REST service made of three key parts:

  • Devices

    Devices can be added and removed from the system. They can be NFC tags or more complicated devices like phones. These devices are automatically associated with the logged in user.

  • Locks

    (Called doors internally - we should refractor this at some point).

    Add locks to the system and add or remove users access to them. Locks are uniquely identified and associated with users through the keyholders table.

  • Access

    Looks up a user and lock and determines whether to grant access or not.

How?

Clone the project

git clone https://github.com/dwyl/smart-home-auth

Set AUTH_API_KEY

Follow the instructions to get your API Key

Run

To start the Phoenix server:

  • Install dependencies with mix deps.get
  • Edit database config in config/dev.exs
  • Create and migrate your database with mix ecto.setup
  • Start Phoenix endpoint with mix phx.server

API Development

insomnia.json is an export of the Insomnia workspace used to develop the API. It should have most routes and authentication configured.

We recommend using Insomnia for development, see: https://github.com/dwyl/learn-insomnia

About

The authorisation server for dwyl/smart-home-security-system

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •