When I send a /token request followed by an /authorize request for Open Id Connect server, I know it's required to set scope=openid for /authorize call. My question is, is it required for /token call too?
In OIDC spec it says nothing about that.
3.1.3.1. Token Request
A Client makes a Token Request by presenting its Authorization Grant (in the form of an Authorization Code) to the Token Endpoint using the grant_type value authorization_code, as described in Section 4.1.3 of OAuth 2.0 [RFC6749]. If the Client is a Confidential Client, then it MUST authenticate to the Token Endpoint using the authentication method registered for its client_id, as described in Section 9.
The Client sends the parameters to the Token Endpoint using the HTTP POST method and the Form Serialization, per Section 13.2, as described in Section 4.1.3 of OAuth 2.0 [RFC6749].
If that is the case, how does /token endpoint implementation realize if a request is ODIC or OAuth2? How does it know if it should send an id_token or not?