Skip to content

Commit e7e60bd

Browse files
committed
fix(server): reject unsupported body delivery during response resolution
1 parent 3747b6e commit e7e60bd

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎src/CodeBeam.UltimateAuth.Server/Auth/Response/AuthResponseResolver.cs‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@ private static void Validate(UAuthResponseOptions response)
7272

7373
private static void ValidateDelivery(CredentialResponseOptions delivery)
7474
{
75+
// TODO:
76+
if (delivery.Mode == TokenResponseMode.Body)
77+
throw new NotSupportedException($"Body credential delivery is not supported for '{delivery.Kind}'.");
78+
7579
if (delivery.Mode == TokenResponseMode.Cookie && delivery.Cookie is null)
7680
{
7781
throw new InvalidOperationException($"Credential '{delivery.Kind}' is configured as Cookie but no cookie options were bound.");

0 commit comments

Comments
 (0)