MemberHubInvitationOptions class
What Runtime.CreateMemberHubInvitation asks the primary hub for.
Namespace: Quaternar.Qaros · Assembly: Quaternar.Qaros.dll
public sealed class MemberHubInvitationOptions
Properties
| Member | Description |
|---|---|
| Lifetime | How long the invitation can be used. Unset: 24 h. At most 7 days. |
| MaxUses | How many hubs may join with it. 0: 1. At most 64, and never more than the app's quota left. |
| Permissions | What it permits. MemberHubInvitationPermissions.None: the defaults. |
| Label | Optional UTF-8 label of at most 64 bytes, shown in the primary's visualizer. |
| AppTag | Optional remote-app grant (C QarMemberHubInvitationAppGrantExt): set, the invitation also admits one app on the joining PC, bound to this app's approval and this tag. Null, the default, makes a plain member-hub invitation. |
Lifetime
How long the invitation can be used. Unset: 24 h. At most 7 days.
public TimeSpan? Lifetime { get; set; }
Value: TimeSpan?
MaxUses
How many hubs may join with it. 0: 1. At most 64, and never more than the app's quota left.
public uint MaxUses { get; set; }
Value: uint
Permissions
What it permits. MemberHubInvitationPermissions.None: the defaults.
public MemberHubInvitationPermissions Permissions { get; set; }
Value: MemberHubInvitationPermissions
Label
Optional UTF-8 label of at most 64 bytes, shown in the primary's visualizer.
public string? Label { get; set; }
Value: string
AppTag
Optional remote-app grant (C QarMemberHubInvitationAppGrantExt): set, the
invitation also admits one app on the joining PC, bound to this app's approval and this
tag. Null, the default, makes a plain member-hub invitation.
public string? AppTag { get; set; }
Value: string
Exceptions
| Exception | Condition |
|---|---|
| ArgumentException | The value breaks the rules above (checked as a courtesy; the runtime checks too). |
Remarks
On a member hub of this primary, the first executable that onboards as a local app with
the invitation as OnboardLocalApp.RemoteAppGrant is approved without a
prompt, recorded by its publisher or image hash, and every later start of that executable
onboards with no invitation and no prompt under the same peer id while no other live
process holds it. The first executable that redeems the grant wins: any other one is
refused it afterwards, also with a later invitation of the same app and tag.
One grant admits one app on one member PC however many hubs MemberHubInvitationOptions.MaxUses lets
join: issue one tag per remote app. With a grant this app's own approval is not extended
to the member hub. Revoking this app's approval, or the granted one, on the primary
revokes the granted app and forgets its peer id.
The invitation then also is a bearer credential for that app slot: whoever redeems it first owns it. Hand it over privately, to the app it is meant for only, and never log it.
Same rules as OnboardLocalApp.Tag: non-empty printable ASCII, no space at
either end, at most 256 bytes, compared exactly, and not starting with the reserved
member/ prefix.