Commit 1ab7c127 authored by ale's avatar ale

minor fixes to the inline API documentation

parent 49cbed20
......@@ -34,6 +34,10 @@ namespace sso {
class Signer {
public:
/**
* Constructor.
* @param private_key_str the private (secret) key.
*/
Signer(const std::string& private_key_str)
: private_key_(private_key_str)
{}
......@@ -41,6 +45,12 @@ public:
~Signer()
{}
/**
* Sign a ticket.
*
* @param ticket the Ticket object to be signed.
* @return a string with the serialized, signed, and base64-encoded ticket.
*/
std::string sign(Ticket *ticket) throw(sso_error);
private:
......
......@@ -76,6 +76,7 @@ public:
* @param user username.
* @param service service specification.
* @param domain authentication domain.
* @param validity ticket validity (seconds).
*/
Ticket(const std::string& user,
const std::string& service,
......@@ -92,6 +93,7 @@ public:
* @param service service specification.
* @param domain authentication domain.
* @param groups group membership granted by this ticket.
* @param validity ticket validity (seconds).
*/
Ticket(const std::string& user,
const std::string& service,
......@@ -162,8 +164,7 @@ public:
}
protected:
void set_validity(int validity)
{
void set_validity(int validity) {
expires_ = time(NULL) + validity;
}
......
......@@ -39,7 +39,7 @@ class Verifier {
public:
/**
* Constructor.
* @param public_key the public key.
* @param public_key_str the public key.
* @param service service specification.
* @param domain authentication domain.
*/
......@@ -51,7 +51,7 @@ public:
/**
* Constructor.
* @param public_key the public key.
* @param public_key_str the public key.
* @param service service specification.
* @param domain authentication domain.
* @param required_groups the set of required groups. Membership in any
......@@ -76,16 +76,19 @@ public:
* domain. Note: this is different from authorization, as the username is
* not checked here, only the formal and cryptographical integrity.
*
* In case of a validation failure, the function will return NULL, and an
* error message will be found in 'err_out' detailing the reason of the
* failure.
* In case of a validation failure, an exception (of type sso_error) will be
* thrown.
*
* @param ticket_string string representation of the ticket.
* @param err_out string to hold an eventual error message.
* @return a new Ticket object containing the ticket information.
*/
Ticket* verify(const std::string& ticket_string) throw(sso_error);
/**
* Return the set of required groups.
*
* @return a const reference to the set of required groups.
*/
const groups_t& required_groups() const { return required_groups_; }
private:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment