mod_rest/example/prosody_oauth.py
changeset 5492 9a4556a13cc7
parent 5273 0e5a37f55440
equal deleted inserted replaced
5491:6cf2f32dbf40 5492:9a4556a13cc7
    14             meta["registration_endpoint"],
    14             meta["registration_endpoint"],
    15             json={
    15             json={
    16                 "client_name": client_name,
    16                 "client_name": client_name,
    17                 "client_uri": client_uri,
    17                 "client_uri": client_uri,
    18                 "redirect_uris": [redirect_uri],
    18                 "redirect_uris": [redirect_uri],
       
    19                 "application_type": redirect_uri[:8] == "https://"
       
    20                 and "web"
       
    21                 or "native",
    19             },
    22             },
    20         ).json()
    23         ).json()
    21 
    24 
    22         super().__init__(client_id=reg["client_id"], *args, **kwargs)
    25         super().__init__(client_id=reg["client_id"], *args, **kwargs)
    23 
    26