1
/****************************************************************************
3
| Copyright (c) 2007 Novell, Inc.
6
| This program is free software; you can redistribute it and/or
7
| modify it under the terms of version 2 of the GNU General Public License as
8
| published by the Free Software Foundation.
10
| This program is distributed in the hope that it will be useful,
11
| but WITHOUT ANY WARRANTY; without even the implied warranty of
12
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
| GNU General Public License for more details.
15
| You should have received a copy of the GNU General Public License
16
| along with this program; if not, contact Novell, Inc.
18
| To contact Novell about this file by physical or electronic mail,
19
| you may find current contact information at www.novell.com
21
|***************************************************************************/
26
//using Simias.Client;
27
//using Simias.Client.Authentication;
29
namespace Simias.Security.Web.AuthenticationService
32
/// Attribute used to identify a class that implements the
33
/// IAuthenticationService.
35
/// It is necessary to associate this attribute with the
36
/// class that implements the interface to allow for your
37
/// authentication service to be configured via Web Configuration.
39
public class IAuthenticationServiceAttribute: System.Attribute {}
43
/// Well known path for logging into a Simias domain
44
/// An HttpRequest (get/post) can be issued against this path
48
public static string Path = "/simias10/Login.ashx";
50
// Response headers set by the Http Authentication Module
51
public readonly static string DaysUntilPwdExpiresHeader = "Simias-Days-Until-Pwd-Expires";
52
public readonly static string GraceTotalHeader = "Simias-Grace-Total";
53
public readonly static string GraceRemainingHeader = "Simias-Grace-Remaining";
54
public readonly static string SimiasErrorHeader = "Simias-Error";
55
public readonly static string DomainIDHeader = "Domain-ID";
56
public readonly static string BasicEncodingHeader = "Basic-Encoding";
60
/// Defines the AuthenticationService interface.
62
public interface IAuthenticationService
65
/// Authenticates the user with password
68
/// Returns a string representing the user name for the identity
69
/// of the principle to be set on the current context and session.
72
string Authenticate(string user, string password);
75
/// Authenticates the user by name and password
78
/// Returns an authentication status object
81
Simias.Authentication.Status AuthenticateByName(string user, string password);
84
/// Authenticates the user using their unique ID and a password
87
/// Returns an authentication status object
90
Simias.Authentication.Status AuthenticateByID(string id, string password);