add password-based login endpoint

This commit is contained in:
sam 2024-05-20 21:59:30 +02:00
parent 7959b64fe6
commit 656eec81d8
5 changed files with 40 additions and 21 deletions

View file

@ -24,11 +24,4 @@ public static class OauthUtils
return false;
}
}
public static Application GetApplicationOrThrow(this HttpContext context)
{
var token = context.GetToken();
if (token is not { Account: null }) throw new ApiError.Forbidden("This endpoint requires a client token.");
return token.Application;
}
}