[asterisk-scf-commits] asterisk-scf/examples.git branch "master" updated.
Commits to the Asterisk SCF project code repositories
asterisk-scf-commits at lists.digium.com
Thu Oct 6 11:05:19 CDT 2011
branch "master" has been updated
via 76a0f175f5e75de7aa39bc25e2891ba03df620b3 (commit)
via b5ff593fec8451cda48e75b42df01b89b1c8b71f (commit)
from d428e252027ea3d406c08af5d125a2b5996040b0 (commit)
Summary of changes:
ExampleSipAuthHook.py | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
- Log -----------------------------------------------------------------
commit 76a0f175f5e75de7aa39bc25e2891ba03df620b3
Merge: b5ff593 d428e25
Author: Mark Michelson <mmichelson at digium.com>
Date: Thu Oct 6 11:05:10 2011 -0500
Merge branch 'master' of git.asterisk.org:asterisk-scf/examples
commit b5ff593fec8451cda48e75b42df01b89b1c8b71f
Author: Mark Michelson <mmichelson at digium.com>
Date: Thu Oct 6 11:04:50 2011 -0500
Add the respondToChallenge method for our sample auth hook.
diff --git a/ExampleSipAuthHook.py b/ExampleSipAuthHook.py
index 2154f52..bba8878 100755
--- a/ExampleSipAuthHook.py
+++ b/ExampleSipAuthHook.py
@@ -41,6 +41,19 @@ class ExampleAuthHook(AuthHook):
challenges = [ challenge ]
return (result, challenges)
+ def respondToChallenge(self, endpointName, realms, current=None):
+ result = HookResult()
+ result.status = HookStatus.Succeeded
+
+ auth = ClientAuth()
+ #Just grab the first realm from the list for this example
+ auth.realm = realms[0];
+ auth.username = "bob"
+ auth.password = "alice"
+
+ auths = [ auth ]
+
+ return (result, auths)
class ExampleAuthHookApp(Ice.Application):
def usage(self):
-----------------------------------------------------------------------
--
asterisk-scf/examples.git
More information about the asterisk-scf-commits
mailing list