goradius
package implements basic Radius client capabilities, allowing Go code to authenticate against a Radius server.
It is based on https://github.com/btimby/py-radius python package
To install this package simply:
go get github.com/kirves/goradius
Before testing goradius
fill the necessary data in the goradius_test.go file (server url, secret, username and password to test the client).
After that, simply run:
go test github.com/kirves/goradius
To authenticate a user simply create a new AuthenticatorT
object using server information and the secret associated to your client
auth := goradius.Authenticator(server_url, server_port, secret)
And try to authenticate a user:
ok, err := auth.Authenticate(username, password, nasId)
if err != nil {
panic(err)
}
if ok {
// user successfully authenticated
}
goradius
is released under the MIT license. See LICENSE.