pam

package
v0.0.0-...-f2e4f82 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 17, 2019 License: Apache-2.0 Imports: 1 Imported by: 0

README

PAM

Check a user/password combination using PAM.

You need to install the development PAM headers, specificially <security/pam_appl.h> and <security/pam_misc.h>.

Example

package main

import (
	"github.com/moolen/glitchlock/pam"
)

func main() {
    if pam.AuthenticateCurrentUser("1234") {
        fmt.Println("password matches")
    }else{
        fmt.Println("wrong password")
    }
    if pam.Authenticate("my-user", "1234") {
        fmt.Println("password matches")
    }else{
        fmt.Println("wrong password")
    }
}


Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Authenticate

func Authenticate(user, password string) bool

Authenticate checks a user, password combination

func AuthenticateCurrentUser

func AuthenticateCurrentUser(password string) bool

AuthenticateCurrentUser checks the specified password

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL