Class Krb5Auth::Krb5
In: ext/ruby_krb5_auth.c
Parent: Object

Ruby bindings for kerberos

The module Krb5Auth provides bindings to kerberos version 5 libraries

Methods

Classes and Modules

Class Krb5Auth::Krb5::Cred
Class Krb5Auth::Krb5::Exception

Public Class methods

Create a new Krb5Auth::Krb5 object. This must be called before any other methods are called. Returns true on success, raises Krb5Auth::Krb5::Exception on failure.

Public Instance methods

Call krb5_cc_store_cred to store credentials in a cachefile. With no parameters, it stores the credentials in the default cachefile. With one parameter, it stores the credentials in the named cachefile. This requires that the credentials have already been fetched via Krb5.get_init_creds_password or Krb5.get_init_creds_keytab. Returns true on success, raises Krb5Auth::Krb5::Exception on failure.

Call krb5_set_password to set the password for this credential to new_password. This requires that the credentials have already been fetched via Krb5.get_init_creds_password or Krb5.get_init_creds_keytab. Returns true on success, raises Krb5Auth::Krb5::Exception on failure.

Free up all memory associated with this object. After this is called, no more methods may be called against this object.

Call krb5_cc_destroy to destroy all credentials in a cachefile. With no parameters, it destroys the credentials in the default cachefile. With one parameter, it destroys the credentials in the named cachefile. Returns true on success, raises Krb5Auth::Krb5::Exception on failure.

Call krb5_cc_get_principal() to get the principal from the default cachefile. Returns the default principal on success, raises Krb5Auth::Krb5::Exception on failure.

Call krb5_get_default_realm() to get the default realm. Returns the default realm on success, raises Krb5Auth::Krb5::Exception on failure.

Call krb5_get_init_creds_keytab() to get credentials based on a keytab. With no parameters, gets the default principal (probably the username@DEFAULT_REALM) from the default keytab (as configured in /etc/krb5.conf). With one parameter, get the named principal from the default keytab (as configured in /etc/krb5.conf). With two parameters, get the named principal from the named keytab. Returns true on success, raises Krb5Auth::Krb5::Exception on failure.

Call krb5_get_init_creds_password() to get credentials based on a username and password. Returns true on success, raises Krb5Auth::Krb5::Exception on failure.

Call krb5_cc_next_cred to fetch credentials from a cachefile. With no parameters, it fetches the credentials in the default cachefile. With one parameter, it fetches the credentials in the named cachefile. Returns a list of Krb5Auth::Krb5::Cred objects on success, raises Krb5Auth::Krb5::Exception on failure.

[Validate]