ecmascript: Add getAuthCredentials()