Is it also possible to login a user using a REST-call?

So in my third party app, I ask the user to enter his Drupal username/pw (I stored his/her identity) and using those, I let the user authenticate with Drupal 7 OpenId Provider.