Giter VIP home page Giter VIP logo

pam-discord's Introduction

pam-discord

A PAM discord oauth module built using pam-rs

Prerequisites

You need some libraries before you build like libpam and libssl.

If you're going to build on Ubuntu, just run this:

sudo apt-get install -y build-essential libpam0g-dev libpam0g libssl-dev

Building

Just use cargo build.

Installing

Just use just install.

Usage

You need to move the build product to a folder where PAM is looking for modules.

If you're using Ubuntu you can move pam_discord.so to /lib/security. After doing so you need to make sure it has proper permissions: sudo chmod 755 /lib/security/pam_discord.so. Then you can place a configuration file in /etc/pam.d/. It can look something like this:

auth sufficient pam_discord.so client_id=<client_id> client_secret=<client_secret>  guild=<guild id> role=<role id>
account sufficient pam_discord.so client_id=<client_id> client_secret=<client_secret> guild=<guild id> role=<role id>
session    include      system-local-login

To use with sshd, you'll need a patched version of openssh, located here and built with these commands:

autoreconf
./configure --with-pam
make install

pam-discord's People

Contributors

nigma1337 avatar pbo-eupry 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.