Bio::Das::ProServer::Authenticator - authenticates DAS requests


Bio-Das-ProServer documentation  | view source Contained in the Bio-Das-ProServer distribution.

Index


NAME

Top

Bio::Das::ProServer::Authenticator - authenticates DAS requests

VERSION

Top

$LastChangedRevision: 549 $

SYNOPSIS

Top

  my $auth = Bio::Das::ProServer::Authenticator::<impl>->new({
    'dsn'    => $, # source name
    'config' => $, # source config
    'debug'  => $, # debug flag
  });

  my $allow = $auth->authenticate({
    'socket'    => $, # handle
    'peer_addr' => $, # packed
    'peer_port' => $, # number
    'request'   => $, # HTTP::Request object
    'cgi'       => $, # CGI object
    'call'      => $, # DAS command
  });

DESCRIPTION

Top

This is a stub class intended to be extended.

CONFIGURATION AND ENVIRONMENT

Top

See subclasses.

DIAGNOSTICS

Top

  my $auth = Bio::Das::ProServer::Authenticator::<impl>->new({
    ...
    'debug'  => 1,
  });

SUBROUTINES/METHODS

Top

new : Instantiates a new object.

  my $auth = Bio::Das::ProServer::Authenticator::<impl>->new({
    'dsn'    => $, # source name
    'config' => $, # source config
    'debug'  => $, # debug flag
  });

authenticate : Applies authentication to a request.

  my $allow = $oAuth->authenticate({
    'socket'    => $, # handle
    'peer_addr' => $, # packed
    'peer_port' => $, # number
    'request'   => $, # HTTP::Request object
    'cgi'       => $, # CGI object
    'call'      => $, # DAS command
  });

Authenticates a request by making use of various request data. If requests are to be denied, the authentication operation should return an appropriate HTTP::Response object. Otherwise nothing (undef) is returned.

This stub method denies all requests with a standard 403 (Forbidden) response.

deny : Convenience method useful for indicating authentication failure

  sub authenticate {
    my ($self, $params) = @_;
    # Perform authentication
    return $self->deny($params);
  }

  Returns a standard 403 (Forbidden) response.

allow : Convenience method useful for indicating authentication success

  sub authenticate {
    my ($self, $params) = @_;
    # Perform authentication
    return $self->allow($params);
  }

  Simply returns an undefined value.

init : Executed upon construction

This stub method does nothing.

INCOMPATIBILITIES

Top

None reported.

BUGS AND LIMITATIONS

Top

None reported.

DEPENDENCIES

Top

Carp
HTTP::Response

AUTHOR

Top

Andy Jenkinson <andy.jenkinson@ebi.ac.uk>

LICENSE AND COPYRIGHT

Top


Bio-Das-ProServer documentation  | view source Contained in the Bio-Das-ProServer distribution.