Class: Sabre_HTTP_AWSAuth

Source Location: /includes/classes/SabreDAV/lib/Sabre/HTTP/AWSAuth.php

Class Overview [line 14]

Sabre_HTTP_AbstractAuth
   |
   --Sabre_HTTP_AWSAuth

HTTP AWS Authentication handler

Author(s):

  • Evert Pot (http://www.rooftopsolutions.nl/)

Version:

Copyright:

  • Copyright (C) 2010 Rooftop Solutions. All rights reserved.

Variables

Constants

Methods


Inherited Methods

Class: Sabre_HTTP_AbstractAuth

Sabre_HTTP_AbstractAuth::__construct()
__construct
Sabre_HTTP_AbstractAuth::getRealm()
Returns the realm
Sabre_HTTP_AbstractAuth::requireLogin()
Returns an HTTP 401 header, forcing login
Sabre_HTTP_AbstractAuth::setHTTPRequest()
Sets an alternative HTTP request object
Sabre_HTTP_AbstractAuth::setHTTPResponse()
Sets an alternative HTTP response object
Sabre_HTTP_AbstractAuth::setRealm()
Sets the realm


Class Details

HTTP AWS Authentication handler

Use this class to leverage amazon's AWS authentication header

Tags:

[ Top ]


Class Variables

$errorCode =  0

[line 37]

An error code, if any

This value will be filled with one of the ERR_* contants

Tags:

  • access - public

Type: int

Overrides:

[ Top ]


Class Methods

getAccessKey

string getAccessKey( )

[line 73]

Returns the username for the request

Tags:

  • access - public

Parameters:

[ Top ]

getAmzHeaders

void getAmzHeaders( )

[line 209]

Returns a list of AMZ headers

Tags:

  • access - protected

Parameters:

[ Top ]

init

bool init( )

[line 52]

Gathers all information from the headers

This method needs to be called prior to anything else.

Tags:

  • access - public

Parameters:

[ Top ]

requireLogin

void requireLogin( )

[line 139]

Returns an HTTP 401 header, forcing login

This should be called when username and password are incorrect, or not supplied at all

Tags:

  • access - public

Overrides Sabre_HTTP_AbstractAuth::requireLogin() (Returns an HTTP 401 header, forcing login)

Parameters:

[ Top ]

validate

bool validate( $secretKey)

[line 84]

Validates the signature based on the secretKey

Tags:

  • access - public

Parameters:

  • $secretKey -

[ Top ]

validateRFC2616Date

bool validateRFC2616Date( string $dateHeader)

[line 158]

Makes sure the supplied value is a valid RFC2616 date.

If we would just use strtotime to get a valid timestamp, we have no way of checking if a user just supplied the word 'now' for the date header.

This function also makes sure the Date header is within 15 minutes of the operating system date, to prevent replay attacks.

Tags:

  • access - protected

Parameters:

  • string $dateHeader -

[ Top ]


Class Constants

ERR_INVALIDDATEFORMAT =  3

[line 41]

[ Top ]

ERR_INVALIDSIGNATURE =  5

[line 43]

[ Top ]

ERR_MD5CHECKSUMWRONG =  2

[line 40]

[ Top ]

ERR_NOAWSHEADER =  1

[line 39]

[ Top ]

ERR_REQUESTTIMESKEWED =  4

[line 42]

[ Top ]


Documentation generated on Mon, 31 May 2010 12:52:59 -0400 by phpDocumentor 1.4.3