AFS::KTC_TOKEN

AFS::KTC_TOKEN is a Perl class to handle the AFS structure ktc_token.
Download

AFS::KTC_TOKEN Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Norbert E. Gruener
  • Publisher web site:
  • http://search.cpan.org/~nog/AFS-2.4.0/pod/v2/afsperlkas.pod

AFS::KTC_TOKEN Tags


AFS::KTC_TOKEN Description

AFS::KTC_TOKEN is a Perl class to handle the AFS structure ktc_token. AFS::KTC_TOKEN is a Perl class to handle the AFS structure ktc_token.SYNOPSIS use AFS::KTC_TOKEN; use AFS::KTC_PRINCIPAL; use AFS::KTC_EKEY; use AFS::Cell qw(localcell); my $token = AFS::KTC_TOKEN->nulltoken; print "StartTime = ", $token->startTime, "n"; print "EndTime = ", $token->endTime, "n"; print "SessionKey = ", $token->sessionKey, "n"; print "Kvno = ", $token->kvno, "n"; print "TicketLen = ", $token->ticketLen, "n"; print "Ticket = ", $token->ticket, "n"; print "String = ", $token->string, "n"; my $index = 0; my $service = AFS::KTC_PRINCIPAL->ListTokens($index); print "service = ", $service->principal, "n"; ($token, my $user) = AFS::KTC_TOKEN->GetToken($service); print " client = ", $user -> principal, "n"; print " StartTime = ", $token->startTime, "n"; print " EndTime = ", $token->endTime, "n"; print " SessionKey = ", $token->sessionKey, "n"; print " Kvno = ", $token->kvno, "n"; print " TicketLen = ", $token->ticketLen, "n"; print " Ticket = ", $token->ticket, "n"; print " String = ", $token->string, "n"; $service = AFS::KTC_PRINCIPAL->new("afs","",localcell); ($token, $user) = AFS::KTC_TOKEN->GetToken($service); AFS::KTC_TOKEN->ForgetAllTokens(); AFS::KTC_TOKEN->SetToken($service, $token, $user, 0); my $string = $token->string; $token = AFS::KTC_TOKEN->FromString($string); print " StartTime = ", $token->startTime, "n"; print " EndTime = ", $token->endTime, "n"; my $user = AFS::KTC_PRINCIPAL->new('nog','',localcell); my $key = AFS::KTC_EKEY->ReadPassword('nog Password:'); my $ok = AFS::KTC_TOKEN->GetAuthToken($user, $key, 600); $service = AFS::KTC_PRINCIPAL->new("afs","",localcell); $token = AFS::KTC_TOKEN->GetServerToken($service, 600, 1); $user = AFS::KTC_PRINCIPAL->new('nog','',localcell); $key = AFS::KTC_EKEY->ReadPassword('nog Password:'); $token = AFS::KTC_TOKEN->GetAdminToken($user, $key, 300); $user = AFS::KTC_PRINCIPAL->new('nog'); $password = AFS::KTC_EKEY->UserReadPassword("Password:"); my $pwexp = 0; my $reason = ''; $ok = AFS::KTC_TOKEN->UserAuthenticateGeneral($user, $password, 300, &AFS::KA_USERAUTH_VERSION | &AFS::KA_USERAUTH_DOSETPAG, $pwexp, $reason); AFS::KTC_TOKEN->ForgetAllTokens();NOTE: The following lines are 'version 1' style: all names are exported by default. This style is deprecated !!! use AFS; # import all AFS names use AFS @AFS::KA; # import just the ka names use AFS @AFS::KTC; # import just the ktc namesThis class provides methods to handle the AFS structure ktc_token. This structure contains information about tokens and is used in the Kernel Token Cache (KTC), which is part of the Cache Manager.It is used to create, modify, and retrieve ktc_token instances for different services. It has methods to retrieve and to reset the ktc_token attributes. In order to make proper usage of these methods it is necessary to have access to AFS::KTC_PRINCIPAL objects and to AFS::KTC_EKEY objects. Requirements: · Perl


AFS::KTC_TOKEN Related Software