Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
sso
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
8
Issues
8
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
ai
sso
Commits
1ab7c127
Commit
1ab7c127
authored
Aug 13, 2013
by
ale
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor fixes to the inline API documentation
parent
49cbed20
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
8 deletions
+22
-8
src/sso/signer.h
src/sso/signer.h
+10
-0
src/sso/ticket.h
src/sso/ticket.h
+3
-2
src/sso/verifier.h
src/sso/verifier.h
+9
-6
No files found.
src/sso/signer.h
View file @
1ab7c127
...
...
@@ -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:
...
...
src/sso/ticket.h
View file @
1ab7c127
...
...
@@ -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
;
}
...
...
src/sso/verifier.h
View file @
1ab7c127
...
...
@@ -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:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment