Add runtime configuration to perl lib
[blerg.git] / lib / perl / Blerg-Database / lib / Blerg / Database.pm
index 3c4ad12..e462860 100644 (file)
@@ -244,6 +244,30 @@ Validates that C<name> is a valid tag name.
 
 Validates that C<name> is a valid username.
 
+=item configuration()
+
+Returns a hashref containing runtime configuration information.  Contains these fields:
+
+=over
+
+=item base_path
+
+The base path to the BlĂ«rg database
+
+=item data_path
+
+The path under base_path for account data
+
+=item hash_tags_path
+
+The path under base_path for hashtag data
+
+=item ref_tags_path
+
+The path under base_path for mention data
+
+=back
+
 =back
 
 =head2 AUTHENTICATION
@@ -277,6 +301,13 @@ Checks that the token represents a valid session for the given username.
 Returns 1 if the session is valid, 0 otherwise.  Also resets the expiration
 time of the session.
 
+=item auth_get_counter(username)
+
+Gets an opaque "counter" value for the auth information of the given username.
+This counter is changed every time the authentication information is changed,
+making it useful for protecting password changes against replay attacks.
+Returns a 32-bit integer on success, or undef on failure.
+
 =back
 
 =head1 CONSTRUCTOR