aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2010-11-11 14:53:39 -0800
committerFriendika <info@friendika.com>2010-11-11 14:53:39 -0800
commit4c5f3fbf7983ec64d4564c80578221ed57e2521e (patch)
tree2ce264b3f906b0f7af4dafe83e80f8ff163b441b
parent7be66b1d91f80c3cee0ed6f08392c3f3f1bffc1e (diff)
downloadvolse-hubzilla-4c5f3fbf7983ec64d4564c80578221ed57e2521e.tar.gz
volse-hubzilla-4c5f3fbf7983ec64d4564c80578221ed57e2521e.tar.bz2
volse-hubzilla-4c5f3fbf7983ec64d4564c80578221ed57e2521e.zip
auth manager update, increased verbosity on salmon logs
-rw-r--r--index.php1
-rw-r--r--mod/amcd.php31
-rw-r--r--mod/salmon.php4
3 files changed, 31 insertions, 5 deletions
diff --git a/index.php b/index.php
index abb528f95..91b864df8 100644
--- a/index.php
+++ b/index.php
@@ -30,6 +30,7 @@ $a->init_pagehead();
session_start();
+// header('Link: <' . $a->get_baseurl() . '/amcd>; rel="acct-mgmt";');
if((x($_SESSION,'authenticated')) || (x($_POST,'auth-params')) || ($a->module === 'login'))
require("auth.php");
diff --git a/mod/amcd.php b/mod/amcd.php
index 01c6b92da..a2a1327e6 100644
--- a/mod/amcd.php
+++ b/mod/amcd.php
@@ -1,10 +1,15 @@
<?php
function amcd_content(&$a) {
-header("Content-type: text/json");
+//header("Content-type: text/json");
echo <<< EOT
{
- "methods": {
+ "version":1,
+ "sessionstatus":{
+ "method":"GET",
+ "path":"/session"
+ },
+ "auth-methods": {
"username-password-form": {
"connect": {
"method":"POST",
@@ -12,11 +17,29 @@ echo <<< EOT
"params": {
"username":"login-name",
"password":"password"
- }
+ },
+ "onsuccess": { "action":"reload" }
+ },
+ "disconnect": {
+ "method":"GET",
+ "path":"\/logout"
+ }
+ }
+ }
+ "methods": {
+ "username-password-form": {
+ "connect": {
+ "method":"POST",
+ "path":"\/login",
+ "params": {
+ "username":"login-name",
+ "password":"password"
+ },
+ "onsuccess": { "action":"reload" }
},
"disconnect": {
"method":"GET",
- "path":"/logout"
+ "path":"\/logout"
}
}
}
diff --git a/mod/salmon.php b/mod/salmon.php
index 3a18f35f0..3c62a6d8c 100644
--- a/mod/salmon.php
+++ b/mod/salmon.php
@@ -158,8 +158,10 @@ function salmon_post(&$a) {
$verify = $rsa->verify($signed_data,$signature);
- if(! $verify)
+ if(! $verify) {
+ logger('mod-salmon: message did not verify using protocol. Trying statusnet hack.');
$verify = $rsa->verify($stnet_signed_data,$signature);
+ }
if(! $verify) {
logger('mod-salmon: Message did not verify. Discarding.');