You can retrieve this object from the database and use the attributes you stored (login, password,...) when calling the rest service, as credentials.
Or is your question about something different?