Interface ITeamInvitationService
Resolves an invite code to the invitation it names — the interface an invitation screen should inject.
public interface ITeamInvitationService
Remarks
Authorized by the code, not by a scope, which is why this is its own interface rather than a
member of a [RequireScope] one. An invitee is not yet a member and holds nothing for the team
they are being invited to; requiring a scope would make an invitation impossible to accept. The rule
is that a first-level call is checked, not that it is checked by a scope.
It replaces the pattern it supersedes: reading an arbitrary team by naming its key and matching the code against the roster in memory. That returned the whole team — every member, access level and membership state — to someone who had only been sent a link, and it is why the invitation screen was the one read that could not simply move onto the gated path.
Returns null for a code that is malformed, unknown, or no longer outstanding. The three are deliberately indistinguishable to the caller: telling an unauthenticated visitor which of them applies would confirm whether a team exists.
Methods
GetInvitationAsync(string)
The invitation this code names, or null.
Task<TeamInvitation> GetInvitationAsync(string inviteCode)
Parameters
inviteCodestring