forked from ServiceStack/ServiceStack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIAuthProvider.cs
More file actions
40 lines (35 loc) · 1.41 KB
/
IAuthProvider.cs
File metadata and controls
40 lines (35 loc) · 1.41 KB
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
using System.Collections.Generic;
namespace ServiceStack.ServiceInterface.Auth
{
public interface IAuthProvider
{
string AuthRealm { get; set; }
string Provider { get; set; }
string CallbackUrl { get; set; }
/// <summary>
/// Remove the Users Session
/// </summary>
/// <param name="service"></param>
/// <param name="request"></param>
/// <returns></returns>
object Logout(IServiceBase service, Auth request);
/// <summary>
/// The entry point for all AuthProvider providers. Runs inside the AuthService so exceptions are treated normally.
/// Overridable so you can provide your own Auth implementation.
/// </summary>
object Authenticate(IServiceBase authService, IAuthSession session, Auth request);
/// <summary>
/// Determine if the current session is already authenticated with this AuthProvider
/// </summary>
bool IsAuthorized(IAuthSession session, IOAuthTokens tokens, Auth request = null);
}
public interface IOAuthProvider : IAuthProvider
{
IAuthHttpGateway AuthHttpGateway { get; set; }
string ConsumerKey { get; set; }
string ConsumerSecret { get; set; }
string RequestTokenUrl { get; set; }
string AuthorizeUrl { get; set; }
string AccessTokenUrl { get; set; }
}
}