aboutsummaryrefslogtreecommitdiff
path: root/ident/ident.h
blob: c262f5844d8888585db935f3769dc4ef6bf8be72 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/* This file is part of GNU Pies.
   Copyright (C) 2015-2016 Sergey Poznyakoff

   GNU Pies 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, or (at your option)
   any later version.

   GNU Pies 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 GNU Pies.  If not, see <http://www.gnu.org/licenses/>. */

#include <config.h>
#include <errno.h>
#include "libpies.h"
#include "grecs.h"
#include "identity.h"

struct pies_identity
{
  pies_identity_provider_t provider;
  char *username;
  void *data;
};

struct pies_identity_mechanism
{
  char const *name;
  int (*authenticate) (pies_identity_provider_t p,
		       pies_identity_t id, char const *passwd);
  int (*is_group_member) (pies_identity_provider_t p,
			  pies_identity_t id, char * const * groups);
  void (*destroy_identity) (pies_identity_provider_t p,
			    pies_identity_t id);
  int (*configure)(struct grecs_node *, pies_identity_provider_t);
  void (*confhelp) (void);
};

struct pies_identity_provider
{
  char *name;
  pies_identity_mechanism_t mech;
  struct grecs_locus locus;
  void *data;
};


Return to:

Send suggestions and report system problems to the System administrator.