Added factory method for creating a DwApiCredentials object from stream, or using the OAuth flow.