ILogoutConfirmationStore Interface
Issues and redeems the value that carries an end user's answer to the logout question back to this server.
public interface ILogoutConfirmationStoreDerived
↳ LogoutConfirmationStore
Remarks
OpenID Connect RP-Initiated Logout 1.0 section 2 makes the server ask the end user whether to log out, and its section 6 says why: a logout request nobody asked for is a denial of service. The answer therefore has to be something only this server could have handed to the page it rendered: a value the caller can state for itself would let any site end a session by naming it.
Methods
ILogoutConfirmationStore.IssueAsync(TenantDefinition, string) Method
Issues the value that answers for sessionId, to be rendered into the page that asks the
end user and sent back with their answer. A session has one outstanding question at a time: asking again
while it stands answers with the same value, so a request arriving while the end user reads the page
cannot void the answer they are about to give. Two first requests for one session that overlap are given
the same value too: the value is written only where the session has none, which the entity storage
decides. The default storage decides within one process only; across several nodes only an
IEntityStorage built on the store's own primitive, such as Redis SET NX or a unique-key insert,
does.
System.Threading.Tasks.Task<string> IssueAsync(Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition tenant, string sessionId);Parameters
tenant TenantDefinition
The tenant the session belongs to.
sessionId System.String
The session the end user is being asked about.
Returns
System.Threading.Tasks.Task<System.String>
The value, unguessable and good until it is answered or expires.
ILogoutConfirmationStore.RedeemLogoutConfirmationAsync(TenantDefinition, string, string) Method
Answers whether confirmation is the value sessionId was asked with, and spends the question when it is, so a value captured from a page stops being an answer once it has been given. Two identical answers arriving together can both be told they took it; each of them asked to end the same session, which is what happens.
System.Threading.Tasks.Task<bool> RedeemLogoutConfirmationAsync(Abblix.Oidc.Server.Features.MultiTenancy.TenantDefinition tenant, string sessionId, string confirmation);Parameters
tenant TenantDefinition
The tenant the session belongs to.
sessionId System.String
The session the request would end.
confirmation System.String
The value the request presented.
Returns
System.Threading.Tasks.Task<System.Boolean>
true when the end user answered this session's question; false when that session has
no question outstanding, when the question has expired or been answered already, and when the value is not
the one it was asked with.
Remarks
Every false means the same thing to the caller, which is what makes this seam usable at all: the end
user is asked again, and a fresh question replaces whatever stood before. A logout that asks twice costs a
click; one that acts on an answer somebody else's browser gave, or on one already spent, costs the session.