This is the anti-pattern--the goal of federated identity is to prevent the website/mobile application from ever seeing the users password. If the end app sees the password, you destroy the integrity of your identity platform--how will you ever know if it's the user or the application that is authenticating? Modern federated identity works by having an identity provider present the login page, and then returning an identity assertion back to the website/mobile app. This is accoplished by having the client redirect to the OpenID Provider (OP), and then the OP redirects back to the client (to one of the pre-registered redirect_uri values).
If you must send the username and password, look into the OAuth "Resource Owner Password Credential Grant".