1using System.Threading.Tasks;
14 null,
null,
null,
null);
17 private readonly
string[] deviceTokens;
18 private readonly
string[] serviceTokens;
19 private readonly
string[] userTokens;
20 private readonly
string from;
43 public string From => this.from;
70 return Task.FromResult(
this);
80 return this.authority?.HasPrivilege(Privilege) ??
false;
Tokens available in request.
static readonly RequestOrigin Empty
Empty request origin.
bool HasPrivilege(string Privilege)
If the origin has a given privilege.
RequestOrigin(string From, string[] DeviceTokens, string[] ServiceTokens, string[] UserTokens, IRequestOrigin Authority)
Tokens available in request.
IRequestOrigin Authority
Optional authority for privilege authorization
string[] UserTokens
User tokens, or null.
string[] DeviceTokens
Device tokens, or null.
string From
Address of caller.
Task< RequestOrigin > GetOrigin()
Origin of request.
string[] ServiceTokens
Service tokens, or null.
Interface for requestors that can act as an origin for distributed requests.