Permalink
Browse files

Added server API description

  • Loading branch information...
1 parent 37af5bb commit f0d39b73b2d7b07b83079608da4cd438e9907018 @yannk yannk committed with gbarr Jan 11, 2009
Showing with 29 additions and 1 deletion.
  1. +29 −1 api.txt
View
30 api.txt
@@ -1,3 +1,5 @@
+Client API
+----------
Basically the Authen::SASL module gathers some info. When ->client_new
is called the plugin is called to create a $conn object. At that point
it should query the Authen::SASL object for mechanisms and callbacks
@@ -7,7 +9,8 @@ Properties are then set on the $conn object by calling $conn->property
Then client_start is called
Then we call client_step with a challenge string to get a response
-string.
+string. need_step can be called to check that this step is actually
+necessary for the selected mechanism.
Quite simple really I think.
@@ -18,12 +21,37 @@ So the plugin just needs to support
client_new
client_start
client_step
+ need_step # returns true if client_step needs to be called
property # set/get for properties
mechanism # returns the name of the chosen mechanism
service # the service name passed to client_new
host # the hostname passed to client_new
+ is_success # returns true if authentication suceeded
+Server API
+----------
+The server API is symetric to the client's one. server_new is called to
+create a connection object. Then server_start is called, and if relevant
+the first data from the client is passed to it as argument.
+Then we call server_step with all the response from the clients, which
+returns challenges. need_step also determines if the current mechanism
+requires another step.
+
+So the plugin just needs to support
+
+ server_new
+ server_start
+ server_step
+ need_step # returns true if client_step needs to be called
+ property # set/get for properties
+ mechanism # returns the name of the chosen mechanism
+ service # the service name passed to client_new
+ host # the hostname passed to client_new
+ is_success # returns true if authentication suceeded
+
+Callbacks
+---------
properties and callbacks are passed by name, so you will need to convert
them to numbers.

0 comments on commit f0d39b7

Please sign in to comment.