Giter VIP home page Giter VIP logo

radius-api's Introduction

Jozef Rebjak's Radius API Server

API Server for FreeRadius3 with DaloRadius

Version Node.js CI Last commit Issues Forks GitHub stars License

Built With

Features

GET

  • Users
    • /user-all/
    • /user-id/{id}
    • /user-username/{username}
    • /user-group/{groupname}
  • Nas
    • /nas-all
    • /nas-id/{id}
    • /nas-name/{shortname}
    • /nas-ip/{nasname}

POST

  • Users
    • /user-create/
  • Nas
    • /nas-create/

UPDATE

  • Users
    • /user-update/{username}

DELETE

  • Users
    • /user-delete-id/{id}
    • /user-delete-username/{username}
  • Nas
    • /nas-delete-id/{id}
    • /nas-delete-name/{shortname}
    • /nas-delete-ip/{nasname}

Documentation with testing of API endpoints

  • Swagger Documentation
    • /api-docs

Known problems

  • Missing Authorization
  • Only HTTP Scheme for now

Getting Started with this repo

This guide will take you through setting up your Radius API Server

Step 1: Starter installation

With git clone:
git clone https://github.com/jozefrebjak/radius-api.git /opt/radius-api

cd /opt/radius-api

npm install

Step 2: Edit env

After instalation of dependencies you need to specife .env parameters

# Create .env file in root folder
touch .env

# Insert this parameters and edit them with your parameters
DB_HOST=YOUR_DATABASE_HOSTNAME_OR_IP
DB_USER=YOUR_USER 
DB_PASS=YOUR_USER_PASS
DB_DATABASE=YOUR_DATABASE_NAME
DB_PORT=YOUR_DATABASE_PORT

Step 3: Install SQL Procedures to your radius database

Go to the /opt/radius-api/extra/database

There is two procedures needed for production. They are need for POST and UPDATE of USER and NAS.

  1. procedure-userAddOrEdit.sql
  2. procedure-nasAdd.sql

Log to your database and run the sql statements from that files.

Step 4: Run Radius API Server as a service

Once installed or cloned locally and all packages are installed you can setup service.

# Copy example service file to your systemd
cp /opt/radius-api/extra/radius-api.service /etc/systemd/system/radius-api.service

systemctl daemon-reload

systemctl enable radius-api

systemctl start radius-api

service api status

License

License

radius-api's People

Contributors

jozefrebjak avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.