~ifolder-dev/simias/trunk-packaging

« back to all changes in this revision

Viewing changes to src/core/HttpAuthentication/.svn/text-base/IAuthService.cs.svn-base

  • Committer: Jorge O. Castro
  • Date: 2007-12-03 06:56:46 UTC
  • Revision ID: jorge@ubuntu.com-20071203065646-mupcnjcwgm5mnhyt
* Remove a bunch of .svn directories we no longer need.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/****************************************************************************
2
 
 |
3
 
 | Copyright (c) 2007 Novell, Inc.
4
 
 | All Rights Reserved.
5
 
 |
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.
9
 
 |
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.
14
 
 |
15
 
 | You should have received a copy of the GNU General Public License
16
 
 | along with this program; if not, contact Novell, Inc.
17
 
 |
18
 
 | To contact Novell about this file by physical or electronic mail,
19
 
 | you may find current contact information at www.novell.com 
20
 
 | 
21
 
 |***************************************************************************/
22
 
 
23
 
using System;
24
 
using System.IO;
25
 
 
26
 
//using Simias.Client;
27
 
//using Simias.Client.Authentication;
28
 
 
29
 
namespace Simias.Security.Web.AuthenticationService
30
 
{
31
 
    /// <summary>
32
 
        /// Attribute used to identify a class that implements the
33
 
        /// IAuthenticationService.
34
 
        /// 
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.
38
 
        /// </summary>
39
 
        public class IAuthenticationServiceAttribute: System.Attribute {}
40
 
 
41
 
 
42
 
        /// <summary>
43
 
        /// Well known path for logging into a Simias domain
44
 
        /// An HttpRequest (get/post) can be issued against this path
45
 
        /// </summary>
46
 
        public class Login
47
 
        {
48
 
                public static string Path = "/simias10/Login.ashx";
49
 
 
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";
57
 
        }
58
 
 
59
 
        /// <summary>
60
 
        /// Defines the AuthenticationService interface.
61
 
    /// </summary>
62
 
        public interface IAuthenticationService
63
 
        {
64
 
       /// <summary>
65
 
       /// Authenticates the user with password
66
 
       /// </summary>
67
 
       /// <returns>
68
 
       /// Returns a string representing the user name for the identity
69
 
       /// of the principle to be set on the current context and session.
70
 
       /// </returns>
71
 
 
72
 
           string Authenticate(string user, string password);
73
 
 
74
 
                /// <summary>
75
 
                /// Authenticates the user by name and password
76
 
                /// </summary>
77
 
        /// <returns>
78
 
                /// Returns an authentication status object
79
 
                /// </returns>
80
 
 
81
 
                Simias.Authentication.Status AuthenticateByName(string user, string password);
82
 
 
83
 
                /// <summary>
84
 
                /// Authenticates the user using their unique ID and a password
85
 
                /// </summary>
86
 
        /// <returns>
87
 
                /// Returns an authentication status object
88
 
                /// </returns>
89
 
 
90
 
                Simias.Authentication.Status AuthenticateByID(string id, string password);
91
 
    }
92
 
}