add password-based login endpoint
This commit is contained in:
parent
7959b64fe6
commit
656eec81d8
5 changed files with 40 additions and 21 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue