Skip to content
This repository has been archived by the owner on Aug 10, 2021. It is now read-only.

ModelSEED Auth

Scott Devoid edited this page Jun 29, 2012 · 1 revision

ModelSEED::Auth

Abstract role for authentication implementations.

Abstract

There are multiple different ways one could authenticate against an API, a data store, etc. For example, there is the "basic auth" of a username + password pair. Then there is an OAuth token and secret. The point of this interface is to abstract these implementations.

Methods

new

Each implementation has it's own version of initialization.

wrap_http_request

$bool = $auth->wrap_http_request($request)

Given a HTTP::Request object, wrap that object in authentication info and return success (1). If there are problems, this returns false (0). The request object is modified by this call.

username

$string = $auth->username();

Return a username.