forked from ServiceStack/ServiceStack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIAuthSession.cs
More file actions
36 lines (33 loc) · 1.29 KB
/
Copy pathIAuthSession.cs
File metadata and controls
36 lines (33 loc) · 1.29 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
using System;
using System.Collections.Generic;
using ServiceStack.ServiceHost;
namespace ServiceStack.ServiceInterface.Auth
{
public interface IAuthSession
{
string ReferrerUrl { get; set; }
string Id { get; set; }
string UserAuthId { get; set; }
string UserAuthName { get; set; }
string UserName { get; set; }
string DisplayName { get; set; }
string FirstName { get; set; }
string LastName { get; set; }
string Email { get; set; }
List<IOAuthTokens> ProviderOAuthAccess { get; set; }
DateTime CreatedAt { get; set; }
DateTime LastModified { get; set; }
List<string> Roles { get; set; }
List<string> Permissions { get; set; }
bool IsAuthenticated { get; set; }
//Used for digest authentication replay protection
string Sequence { get; set; }
bool HasRole(string role);
bool HasPermission(string permission);
bool IsAuthorized(string provider);
void OnRegistered(IServiceBase registrationService);
void OnAuthenticated(IServiceBase authService, IAuthSession session, IOAuthTokens tokens, Dictionary<string, string> authInfo);
void OnLogout(IServiceBase authService);
void OnCreated(IHttpRequest httpReq);
}
}