Class: Krb5::CredentialsCache

Inherits:
Object
  • Object
show all
Defined in:
ext/krb5_auth/ccache.c

Instance Method Summary (collapse)

Constructor Details

- (Object) Krb5Auth::CredentialsCache.new(principal = nil, cache_name = nil)

Creates and returns a new Krb5Auth::CredentialsCache object. If cache_name is specified, then that cache is used, which must be in "type:residual" format, where 'type' is a type known to Kerberos (typically 'FILE').

If a principal is specified, then it creates or refreshes the credentials cache with the primary principal set to principal. If the credentials cache already exists, its contents are destroyed.

Note that the principal's credentials are not set via the constructor. It merely creates the cache and sets the default principal.



# File 'ext/krb5_auth/ccache.c'

/*
 * call-seq:
 *   Krb5Auth::CredentialsCache.new(principal = nil, cache_name = nil)
 *
 * Creates and returns a new Krb5Auth::CredentialsCache object. If cache_name
 * is specified, then that cache is used, which must be in "type:residual"
 * format, where 'type' is a type known to Kerberos (typically 'FILE').
 *
 * If a +principal+ is specified, then it creates or refreshes the credentials
 * cache with the primary principal set to +principal+. If the credentials
 * cache already exists, its contents are destroyed.
 *
 * Note that the principal's credentials are not set via the constructor.
 * It merely creates the cache and sets the default principal.
 */
static VALUE rkrb5_ccache_initialize(int argc, VALUE* argv, VALUE self){

Instance Method Details

- (Object) close

Closes the ccache object. Once the ccache object is closed no more methods may be called on it, or an exception will be raised.

Note that unlike ccache.destroy, this does not delete the cache.



# File 'ext/krb5_auth/ccache.c'

/*
 * call-seq:
 *   ccache.close
 *   
 * Closes the ccache object. Once the ccache object is closed no more
 * methods may be called on it, or an exception will be raised.
 *
 * Note that unlike ccache.destroy, this does not delete the cache.
 */
static VALUE rkrb5_ccache_close(VALUE self){

- (Object) default_name

Returns the name of the default credentials cache.

This is typically a file under /tmp with a name like 'krb5cc_xxxx', where 'xxxx' is the uid of the current process owner.



# File 'ext/krb5_auth/ccache.c'

/*
 * call-seq:
 *   ccache.default_name
 *
 * Returns the name of the default credentials cache.
 *
 * This is typically a file under /tmp with a name like 'krb5cc_xxxx',
 * where 'xxxx' is the uid of the current process owner.
 */
static VALUE rkrb5_ccache_default_name(VALUE self){

- (Object) destroy

Destroy the credentials cache of the current principal. This also closes the object and it cannot be reused.

If the cache was destroyed then true is returned. If there is no cache then false is returned.



# File 'ext/krb5_auth/ccache.c'

/*
 * call-seq:
 *   ccache.destroy
 *
 * Destroy the credentials cache of the current principal. This also closes
 * the object and it cannot be reused.
 *
 * If the cache was destroyed then true is returned. If there is no cache
 * then false is returned.
 */
static VALUE rkrb5_ccache_destroy(VALUE self){