GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  HTTP_SERVLET_BASICAUTH (3)

NAME

http_servlet_basicauth - HTTP basic authentication servlet

CONTENTS

Library
Synopsis
Description
Return Values
See Also
History
Authors

LIBRARY

PDEL Library (libpdel, -lpdel)

SYNOPSIS


.In sys/types.h
.In stdio.h
.In netinet/in.h
.In openssl/ssl.h
.In pdel/http/http_defs.h
.In pdel/http/http_server.h
.In pdel/http/servlet/basicauth.h struct http_servlet * http_servlet_basicauth_create http_servlet_basicauth_t *auth void *arg void (*destroy)(void *)

DESCRIPTION

http_servlet_basicauth_create creates a new servlet that implements HTTP basic authentication. The servlet should be registered with a lower order than the other servlets that it protects, so that it executes first.

auth is a pointer to a function having this type:

typedef const char *http_servlet_basicauth_t(void *arg,
            struct http_request *req, const char *username,
            const char *password);

arg is the opaque cookie supplied to http_servlet_basicauth_create. req is the HTTP request object and username and password are the credentials supplied with the request, or the empty string if none were supplied.

auth should return NULL to allow access. Otherwise, it should return the authorization realm string to deny access. This string is not freed by the calling function. Warning: this is reversed from usual semantics; returning NULL indicates success and allows access.

When the servlet is destroyed, if destroy is not NULL, it will be invoked with arg as its parameter.

RETURN VALUES

On failure, http_servlet_basicauth_create returns NULL and sets errno to an appropriate value.

SEE ALSO

http_request(3), http_response(3), http_server(3), http_servlet(3), http_servlet_cookieauth(3), libpdel(3)
.Rs HTTP Authentication: Basic and Digest Access Authentication
.Re

HISTORY

The PDEL library was developed at Packet Design, LLC. http://www.packetdesign.com/

AUTHORS


.An Archie Cobbs Aq archie@freebsd.org
Search for    or go to Top of page |  Section 3 |  Main Index


Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.