Authen::PAAS::Credential - represents a credential for a subject


Authen-PAAS documentation Contained in the Authen-PAAS distribution.

Index


Code Index:

NAME

Top

Authen::PAAS::Credential - represents a credential for a subject

SYNOPSIS

Top

  use Authen::PAAS::Credential;

  my $cred = Authen::PAAS::Credential->new(name => "krb5ticket");

  print $cred->name, "\n";

DESCRIPTION

Top

The Authen::PAAS::Credential module represents a credential for an authenticated subject. A credential is merely an abstract token generated during the authentication process. This module would be subclassed by Authen::PAAS::LoginModule implementations to provide module specific data.

METHODS

Top

$cred = Authen::PAAS::Credential->new(name => $name);

Create a new credential assigning it the name given by the name parameter to the method. This constructor is usually only used by sub-classes.

$name = $cred->name;

Retrieves the name of this credential.

AUTHORS

Top

Daniel Berrange <dan@berrange.com>

COPYRIGHT

Top

SEE ALSO

Top

Authen::PAAS::Subject, Authen::PAAS::Principal


Authen-PAAS documentation Contained in the Authen-PAAS distribution.
# -*- perl -*-
#
# Authen::PAAS::Credential by Daniel Berrange
#
# Copyright (C) 2004-2006 Dan Berrange
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
#
# $Id: Credential.pm,v 1.2 2004/12/28 23:43:46 dan Exp $

package Authen::PAAS::Credential;

use warnings;
use strict;

our $VERSION = '1.0.0';


sub new {
    my $proto = shift;
    my $class = ref($proto) || $proto;
    my $self = {};
    my %params = @_;

    $self->{name} = exists $params{name} ? $params{name} : die "name parameter is required";

    bless $self, $class;

    return $self;
}


sub name {
    my $self = shift;
    return $self->{name};
}

1 # So that the require or use succeeds.

__END__