Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

webkdc(3pm) [debian man page]

WebKDC(3pm)						User Contributed Perl Documentation					       WebKDC(3pm)

NAME
WebKDC - functions to support the WebKDC SYNOPSIS
use WebAuth; use WebKDC; use WebKDC::Exception; use WebKDC::WebRequest; use WebKDC::WebResponse; my ($status, $exception) = WebKDC::make_request_token_request($req, $resp); DESCRIPTION
WebKDC is a set of convenience functions built on top of mod WebAuth to implement the WebKDC. All functions have the potential to throw either a WebKDC::WebKDCException or WebAuth::Exception. EXPORT
None FUNCTIONS
make_request_token_request(req,resp) ($status, $e) = WebKDC::make_request_token_request($req, $resp); Used to handle an incoming request token. It should be used in the following fashion: my $req = new WebKDC::WebRequest; my $resp = new WebKDC::WebResponse; # if the user just submitted their username/password, include them if ($username && $password) { $req->user($username); $req->pass($password); } # pass in any proxy-tokens we have from a cookies # i.e., enumerate through all cookies that start with webauth_wpt # and put them into a hash: # $cookies = { "webauth_wpt_krb5" => $cookie_value } $req->proxy_cookies($cookies); # $req_token_str and $service_token_str would normally get # passed in via query/post parameters $req->request_token($req_token_str); $req->service_token($service_token_str); my ($status, $e) = WebKDC::make_request_token_request($req, $resp); # for all these cases, check if $resp->proxy_cookies() has any # proxy cookies we need to update when sending back a page to # the browser if ($status == WK_SUCCESS) { # ok, request successful } elsif ($status == WK_ERR_USER_AND_PASS_REQUIRED || $status == WK_LOGIN_FORCED) { # prompt for user/pass } elsif ($status == WK_ERR_LOGIN_FAILED) { # supplied user/pass was invalid, try again } else { # use this if/elsif/else to pick the error message if ($status == WK_ERR_UNRECOVERABLE_ERROR) { # something nasty happened. } elsif ($status == WK_ERR_REQUEST_TOKEN_STATLE) { # user took too long to login, original request token is stale } elsif ($status == WK_ERR_WEBAUTH_SERVER_ERROR) { # like WK_ERR_UNRECOVERABLE_ERROR, but indicates the error # most likely is due to the webauth server making the request, } else { # treat like WK_ERROR_UNRECOVERABLE ERROR } # display the error message and don't prompt anymore } AUTHOR
Roland Schemers (schemers@stanford.edu) SEE ALSO
WebKDC::WebKDCException WebKDC::Token WebKDC::WebRequest WebKDC::WebRespsonse WebAuth. perl v5.14.2 2012-04-25 WebKDC(3pm)

Check Out this Related Man Page

HTTP::Request::Params(3pm)				User Contributed Perl Documentation				HTTP::Request::Params(3pm)

NAME
HTTP::Request::Params - Retrieve GET/POST Parameters from HTTP Requests SYNOPSIS
use HTTP::Request::Params; my $http_request = read_request(); my $parse_params = HTTP::Request::Params->new({ req => $http_request, }); my $params = $parse_params->params; DESCRIPTION
This software does all the dirty work of parsing HTTP Requests to find incoming query parameters. new my $parser = HTTP::Request::Params->new({ req => $http_request, }); "req" - This required argument is either an "HTTP::Request" object or a string containing an entier HTTP Request. Incoming query parameters come from two places. The first place is the "query" portion of the URL. Second is the content portion of an HTTP request as is the case when parsing a POST request, for example. params my $params = $parser->params; Returns a hash reference containing all the parameters. The keys in this hash are the names of the parameters. Values are the values associated with those parameters in the incoming query. For parameters with multiple values, the value in this hash will be a list reference. This is the same behaviour as the "CGI" module's "Vars()" function. req my $req_object = $parser->req; Returns the "HTTP::Request" object. mime my $mime_object = $parser->mime; Returns the "Email::MIME" object. Now, you may be wondering why we're dealing with an "Email::MIME" object. The answer is simple. It's an amazing parser for MIME compliant messages, and RFC 822 compliant messages. When parsing incoming POST data, especially file uploads, "Email::MIME" is the perfect fit. It's fast and light. SEE ALSO
"HTTP::Daemon", HTTP::Request, Email::MIME, CGI, perl. AUTHOR
Casey West, <casey@geeknest.com>. COPYRIGHT
Copyright (c) 2005 Casey West. All rights reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.10.1 2005-01-12 HTTP::Request::Params(3pm)
Man Page