NAME
CHEF::Header - Class that will generate CHEF::Headers
VERSION
1.0
DESCRIPTION
This class inherites from Chef. This class will generate encrypted headers as described in the ChefHeaderDocumentation
Once you call header method it will load CHEF::Header::header class . Which will generate and fill up User Agent with appropriate Chef Headrs as specified in the above documentation.
+---------------+ | CHEF::Header | +-----------------------+ | CHEF::Header::header | +-----------------------------------+ | CHEF::Header::header::chefheader | +-----------------------------------+header
loads CHEF::Header::header class and returns an object.
Methods of CHEF::Header::header class
- Method( $Method )
-
set internally to either 'GET' or 'POST'
- HashedPath ( $path )
-
calcualtes hash of end point for chef
- XOpsContentHash ( $content )
-
calculdates hash of the content
- XOpsUserId ( $class->name )
-
initialized user-id field sets to the user_id or client-name.
- Host( $server )
-
initialized Host parameter of UA to chef server
- XChefVersion ( $chef_server_version )
-
initialized Chef server Version to use
- XOpsSign( $XOpsSign )
-
initializes to 'version=1.0' as specified in the chef API documentation.
- XOpsTimestamp
-
initialized the request timestamp for http request to now
- header
-
returns all the headers
- hash
-
returns hash of all the headers , initialized so far.
- header_to_string
-
return a comma seperated list of keys and values of the header
Methods of CHEF::Header::header::chefheader
- Method ( $method )
-
initialized chefheader with $method . either 'GET' or 'POST'
- HashedPath ( $hashed_path )
-
initializes hashed path and 'Hashed Path' heder value.
- XOpsContentHash ( $content_hash )
-
initializes content hash and 'X-Ops-Content-Hash' header.
- XOpsTimestamp
-
initializes X-Ops-Timestamp values
- XOpsUserId
-
initialized X-Ops-UserId value
- XOpsAuthorization
-
initializes X-Ops-Authorization-xxxx values . for more details refere to chef header API
- split_60
-
split the heder in chuncks of 60 characters
- hash
-
return chef_header in hash format
- to_string
-
returns chef_header in string format . directly insertable to UserAgent headers.
KNOWN BUGS
SUPPORT
open a github ticket or email comments to Bhavin Patel <bpatel10@nyit.edu>
COPYRIGHT AND LICENSE
This Software is free to use , licensed under : The Artisic License 2.0 (GPL Compatible)