taskrambler  0.1.9
Web server and task management solution.
auth.c File Reference
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <ldap.h>
#include "class.h"
#include "uuid.h"
#include "utils/memory.h"
#include "commons.h"
#include "auth.h"
#include "auth/credential.h"
#include "auth/interface/auth.h"
+ Include dependency graph for auth.c:

Go to the source code of this file.

Functions

static int authCtor (void *_this, va_list *params)
 
static void authDtor (void *_this)
 
static int authAuthenticate (void *_this, Credential cred, Uuid user_index)
 
 INIT_IFACE (Class, authCtor, authDtor, NULL)
 
 INIT_IFACE (Auth, authAuthenticate)
 
 CREATE_CLASS (Auth, NULL, IFACE(Class), IFACE(Auth))
 

Detailed Description

Author
Georg Hopp

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Definition in file auth.c.

Function Documentation

static int authAuthenticate ( void *  _this,
Credential  cred,
Uuid  user_index 
)
static

Definition at line 66 of file auth.c.

References authenticate(), FALSE, and MAX_AUTH.

67 {
68  Auth this = _this;
69  int i;
70 
71  for (i=1; i<=MAX_AUTH; i++) {
72  if (authenticate(this->auth[i], cred, user_index)) {
73  return i;
74  }
75  }
76 
77  return FALSE;
78 }
#define MAX_AUTH
Definition: auth/auth.h:56
int authenticate(void *, Credential, Uuid)
#define FALSE
Definition: commons.h:28

+ Here is the call graph for this function:

static int authCtor ( void *  _this,
va_list *  params 
)
static

Definition at line 40 of file auth.c.

References MAX_AUTH.

41 {
42  Auth this = _this;
43  int i;
44 
45  for (i=0; i<=MAX_AUTH; i++) {
46  this->auth[i] = NULL;
47  }
48 
49  return 0;
50 }
#define MAX_AUTH
Definition: auth/auth.h:56
static void authDtor ( void *  _this)
static

Definition at line 54 of file auth.c.

References MAX_AUTH.

55 {
56  Auth this = _this;
57  int i;
58 
59  for (i=1; i<=MAX_AUTH; i++) {
60  delete(this->auth[i]);
61  }
62 }
#define MAX_AUTH
Definition: auth/auth.h:56
CREATE_CLASS ( Auth  ,
NULL  ,
IFACE(Class)  ,
IFACE(Auth)   
)
INIT_IFACE ( Class  ,
authCtor  ,
authDtor  ,
NULL   
)
INIT_IFACE ( Auth  ,
authAuthenticate   
)