.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Web::ID 3pm" .TH Web::ID 3pm "2021-09-11" "perl v5.32.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Web::ID \- implementation of WebID (a.k.a. FOAF+SSL) .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 5 \& my $webid = Web::ID\->new(certificate => $pem_encoded_x509); \& if ($webid\->valid) \& { \& say "Authenticated as: ", $webid\->uri; \& } .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" WebID is a simple authentication protocol based on \s-1TLS\s0 (Transaction Layer Security, better known as Secure Socket Layer, \s-1SSL\s0) and the Semantic Web. This module provides a Perl implementation for authenticating clients using WebID. .PP For more information see the Web::ID::FAQ document. .PP Bundled with this module are Plack::Middleware::Auth::WebID, a plugin for Plack to perform WebID authentication on \s-1HTTPS\s0 connections; and Web::ID::Certificate::Generator, a module that allows you to generate WebID-enabled certificates that can be installed into web browsers. .SS "Constructor" .IX Subsection "Constructor" .ie n .IP """new""" 4 .el .IP "\f(CWnew\fR" 4 .IX Item "new" Standard Moose-style constructor. .SS "Attributes" .IX Subsection "Attributes" .ie n .IP """certificate""" 4 .el .IP "\f(CWcertificate\fR" 4 .IX Item "certificate" A Web::ID::Certificate object representing and x509 certificate, though a PEM-encoded string will be coerced. .Sp This is usually the only attribute you want to pass to the constructor. Allow the others to be built automatically. .ie n .IP """first_valid_san""" 4 .el .IP "\f(CWfirst_valid_san\fR" 4 .IX Item "first_valid_san" Probably fairly uninteresting. This is the first subjectAltName value found in the certificate that could be successfully authenticated using Web::ID. An Web::ID::SAN object. .ie n .IP """uri""" 4 .el .IP "\f(CWuri\fR" 4 .IX Item "uri" The \s-1URI\s0 associated with the first valid \s-1SAN. A\s0 \s-1URI\s0 object. .Sp This is a \s-1URI\s0 you can use to identify the person, organisation or robotic poodle holding the certificate. .ie n .IP """profile""" 4 .el .IP "\f(CWprofile\fR" 4 .IX Item "profile" Data about the certificate holder. An RDF::Trine::Model object. Their \s-1FOAF\s0 file (probably). .ie n .IP """valid""" 4 .el .IP "\f(CWvalid\fR" 4 .IX Item "valid" Boolean. .SS "Methods" .IX Subsection "Methods" .ie n .IP """node""" 4 .el .IP "\f(CWnode\fR" 4 .IX Item "node" Returns the same as \f(CW\*(C`uri\*(C'\fR, but as an RDF::Trine::Node object. .ie n .IP """get(@predicates)""" 4 .el .IP "\f(CWget(@predicates)\fR" 4 .IX Item "get(@predicates)" Queries the \f(CW\*(C`profile\*(C'\fR for triples of the form: .Sp .Vb 1 \& $self\->node $predicate $x . .Ve .Sp And returns literal and \s-1URI\s0 values for \f(CW$x\fR, as strings. .Sp \&\f(CW$predicate\fR should be an RDF::Trine::Node, or a string. If a string, it will be expanded using RDF::Trine::NamespaceMap, so you can do stuff like: .Sp .Vb 2 \& my $name = $webid\->get(\*(Aqfoaf:name\*(Aq, \*(Aqrdfs:label\*(Aq); \& my @mboxes = $webid\->get(\*(Aqfoaf:mbox\*(Aq); .Ve .SH "BUGS" .IX Header "BUGS" Please report any bugs to . .SH "SEE ALSO" .IX Header "SEE ALSO" Web::ID::FAQ. .PP Web::ID::Certificate, Plack::Middleware::Auth::WebID. .PP \&\s-1RDF::ACL\s0 provides an access control system that complements WebID. .PP CGI::Auth::FOAF_SSL is the spiritual ancestor of this module though they share very little code, and have quite different APIs. .PP General WebID information: , , , . .PP Mailing list for general Perl RDF/SemWeb discussion and support: . .SH "AUTHOR" .IX Header "AUTHOR" Toby Inkster . .SH "THANKS" .IX Header "THANKS" Thanks to Kjetil Kjernsmo (cpan:KJETILK) for persuading me to port my old CGI-specific implementaton of this to Plack. .PP Thanks Kjetil Kjernsmo (again), Florian Ragwitz (cpan:FLORA), and Jonas Smedegaard for help with testing and advice on dependencies. .PP Thanks to Henry Story, Melvin Carvalho, Simon Reinhardt, Bruno Harbulot, Ian Jacobi and many others for developing WebID from a poorly thought out idea to a clever, yet simple and practical authentication protocol. .PP Thanks to Gregory Williams (cpan:GWILLIAMS), Tatsuhiko Miyagawa (cpan:MIYAGAWA) and the Moose Cabal for providing really good platforms (RDF::Trine, Plack and Moose respectively) to build this on. .SH "COPYRIGHT AND LICENCE" .IX Header "COPYRIGHT AND LICENCE" This software is copyright (c) 2012 by Toby Inkster. .PP This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. .SH "DISCLAIMER OF WARRANTIES" .IX Header "DISCLAIMER OF WARRANTIES" \&\s-1THIS PACKAGE IS PROVIDED \*(L"AS IS\*(R" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.\s0