Handle OIDC back-channel notification
The URL registered in Authway for back-channel notification when a user signs out will receive an HTTP POST with a logout token (JWT). This JWT token must be correctly validated by checking at least these requirements:
- The token is signed by the keys published by Authway (can be found through metadata).
- The issuer should be the Authway instance (exact value for issuer is also available in metadata).
- The audience should be the client id of the application receiving the notification.
- A
sub
claim that uniquely identifies the user should be present. - A
sid
claim should be present if the application settings is to include session index. - A
nonce
claim should be present. - A
events
claim should be present and it should contain ahttp://schemas.openid.net/event/backchannel-logout
event.
By using the sub
claim and optionally the sid
the application should invalidate the user session. How this is done will differ depending on platform/application.
.NET Sample
A sample for .NET can be found here.