mirror of
https://git.sr.ht/~tsileo/microblog.pub
synced 2024-12-22 05:04:27 +00:00
Tweak OAuth2 registration params
This commit is contained in:
parent
7b506f2519
commit
1de108b019
1 changed files with 4 additions and 2 deletions
|
@ -46,7 +46,7 @@ async def well_known_authorization_server(
|
||||||
|
|
||||||
class OAuthRegisterClientRequest(BaseModel):
|
class OAuthRegisterClientRequest(BaseModel):
|
||||||
client_name: str
|
client_name: str
|
||||||
redirect_uris: list[str]
|
redirect_uris: list[str] | str
|
||||||
|
|
||||||
client_uri: str | None = None
|
client_uri: str | None = None
|
||||||
logo_uri: str | None = None
|
logo_uri: str | None = None
|
||||||
|
@ -62,7 +62,9 @@ async def oauth_registration_endpoint(
|
||||||
|
|
||||||
client = models.OAuthClient(
|
client = models.OAuthClient(
|
||||||
client_name=register_client_request.client_name,
|
client_name=register_client_request.client_name,
|
||||||
redirect_uris=register_client_request.redirect_uris,
|
redirect_uris=[register_client_request.redirect_uris]
|
||||||
|
if isinstance(register_client_request.redirect_uris, str)
|
||||||
|
else register_client_request.redirect_uris,
|
||||||
client_uri=register_client_request.client_uri,
|
client_uri=register_client_request.client_uri,
|
||||||
logo_uri=register_client_request.logo_uri,
|
logo_uri=register_client_request.logo_uri,
|
||||||
scope=register_client_request.scope,
|
scope=register_client_request.scope,
|
||||||
|
|
Loading…
Reference in a new issue