[WIP] Start implementing request signing on inbox delivery

This commit is contained in:
Jeremy Dormitzer 2018-10-04 17:41:17 -04:00
parent 4b3e43baaa
commit 76abc08dd4

View File

@ -132,4 +132,17 @@ function post_activity_to_inboxes( $activity, $recipients ) {
}
}
}
function get_signing_string( $inbox_url ) {
$now = new \DateTime( 'now', new \DateTimeZone('GMT') );
$now_str = $now->format( 'D, d M Y H:i:s T' );
$parsed = parse_url( $inbox_url );
return "(request-target): post $parsed[path]
host: $parsed[host]
date: $now_str"
}
function signature_header( $inbox_url, $actor_id ) {
// TODO
}
?>