Socket
Book a DemoInstallSign in
Socket

rpam2

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rpam2

4.0.2
bundlerRubygems
Version published
Maintainers
1
Created
Source

= rpam2

  • http://rubyforge.org/projects/rpam2

== DESCRIPTION:

This extension provides a PAM (Pluggable Authentication Modules) integration to ruby. It is inspired by rpam but provides much functionality and is licensed under MIT.

== EXAMPLE:

require 'rpam2'

if Rpam2.auth("servicename", "user", "password") puts "Authentication successful" else puts "Authentication failed" end

puts Rpam2.listenv(nil, "user", "password") # uses default (rpam) puts Rpam2.listenv("servicename", "user", "password") puts Rpam2.listenv("servicename", "user", "password", true) puts Rpam2.listenv("servicename", "user", "password", true, "RUSER", "RHOST") puts Rpam2.listenv("servicename") # error

== REQUIREMENTS:

  • pam-dev
  • ruby-dev

== INSTALL:

gem install rpam2

or if it should not depend on pam:

ALLOW_NOPAM=true gem install rpam2

WARNING: Don't use rpam2 in this case except for test. It isn't safe

Or manually:

  • gem build rpam2.gemspec
  • gem install ./rpam2-4.0.0.gem

== Usage:

require 'rpam2'

Rpam2.auth("servicename", "username", "password", ["RUSER", "RHOST"]) => (true/false)

Rpam2.account("servicename", "username") => (true/false)

Rpam2.getenv("servicename", "username", "password", "envvar", [opensession(true/false), ["RUSER", "RHOST"]]) => (string/nil)

Rpam2.listenv("servicename", "username", "password", [opensession(true/false), ["RUSER", "RHOST"]]) => (hash/nil)

== Testing: For test purposes can Rpam2 be filled with fake data. For this mode pam is not neccessary but then you may should not access not specified services. Only services in fake_data are emulated the rest is redirected to real pam.

Rpam2.fake_data = { usernames: Set['alex', 'hugo', 'thomas'], servicenames: Set['service1', 'service2'], password: '123456', env: { email: 'me@example.com'} }

FAQs

Package last updated on 27 Mar 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.