We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Add public properties to google.oauth2.credentials.Credentials
Resolves #124 

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `google/oauth2/credentials.py`
Content:
```
1 # Copyright 2016 Google Inc.
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 #      http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14 
15 """OAuth 2.0 Credentials.
16 
17 This module provides credentials based on OAuth 2.0 access and refresh tokens.
18 These credentials usually access resources on behalf of a user (resource
19 owner).
20 
21 Specifically, this is intended to use access tokens acquired using the
22 `Authorization Code grant`_ and can refresh those tokens using a
23 optional `refresh token`_.
24 
25 Obtaining the initial access and refresh token is outside of the scope of this
26 module. Consult `rfc6749 section 4.1`_ for complete details on the
27 Authorization Code grant flow.
28 
29 .. _Authorization Code grant: https://tools.ietf.org/html/rfc6749#section-1.3.1
30 .. _refresh token: https://tools.ietf.org/html/rfc6749#section-6
31 .. _rfc6749 section 4.1: https://tools.ietf.org/html/rfc6749#section-4.1
32 """
33 
34 from google.auth import _helpers
35 from google.auth import credentials
36 from google.oauth2 import _client
37 
38 
39 class Credentials(credentials.Scoped, credentials.Credentials):
40     """Credentials using OAuth 2.0 access and refresh tokens."""
41 
42     def __init__(self, token, refresh_token=None, token_uri=None,
43                  client_id=None, client_secret=None, scopes=None):
44         """
45         Args:
46             token (Optional(str)): The OAuth 2.0 access token. Can be None
47                 if refresh information is provided.
48             refresh_token (str): The OAuth 2.0 refresh token. If specified,
49                 credentials can be refreshed.
50             token_uri (str): The OAuth 2.0 authorization server's token
51                 endpoint URI. Must be specified for refresh, can be left as
52                 None if the token can not be refreshed.
53             client_id (str): The OAuth 2.0 client ID. Must be specified for
54                 refresh, can be left as None if the token can not be refreshed.
55             client_secret(str): The OAuth 2.0 client secret. Must be specified
56                 for refresh, can be left as None if the token can not be
57                 refreshed.
58             scopes (Sequence[str]): The scopes that were originally used
59                 to obtain authorization. This is a purely informative parameter
60                 that can be used by :meth:`has_scopes`. OAuth 2.0 credentials
61                 can not request additional scopes after authorization.
62         """
63         super(Credentials, self).__init__()
64         self.token = token
65         self._refresh_token = refresh_token
66         self._scopes = scopes
67         self._token_uri = token_uri
68         self._client_id = client_id
69         self._client_secret = client_secret
70 
71     @property
72     def requires_scopes(self):
73         """False: OAuth 2.0 credentials have their scopes set when
74         the initial token is requested and can not be changed."""
75         return False
76 
77     def with_scopes(self, scopes):
78         """Unavailable, OAuth 2.0 credentials can not be re-scoped.
79 
80         OAuth 2.0 credentials have their scopes set when the initial token is
81         requested and can not be changed.
82         """
83         raise NotImplementedError(
84             'OAuth 2.0 Credentials can not modify their scopes.')
85 
86     @_helpers.copy_docstring(credentials.Credentials)
87     def refresh(self, request):
88         access_token, refresh_token, expiry, _ = _client.refresh_grant(
89             request, self._token_uri, self._refresh_token, self._client_id,
90             self._client_secret)
91 
92         self.token = access_token
93         self.expiry = expiry
94         self._refresh_token = refresh_token
95
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/google/oauth2/credentials.py b/google/oauth2/credentials.py
--- a/google/oauth2/credentials.py
+++ b/google/oauth2/credentials.py
@@ -68,6 +68,27 @@
         self._client_id = client_id
         self._client_secret = client_secret
 
+    @property
+    def refresh_token(self):
+        """Optional[str]: The OAuth 2.0 refresh token."""
+        return self._refresh_token
+
+    @property
+    def token_uri(self):
+        """Optional[str]: The OAuth 2.0 authorization server's token endpoint
+        URI."""
+        return self._token_uri
+
+    @property
+    def client_id(self):
+        """Optional[str]: The OAuth 2.0 client ID."""
+        return self._client_id
+
+    @property
+    def client_secret(self):
+        """Optional[str]: The OAuth 2.0 client secret."""
+        return self._client_secret
+
     @property
     def requires_scopes(self):
         """False: OAuth 2.0 credentials have their scopes set when

{"golden_diff": "diff --git a/google/oauth2/credentials.py b/google/oauth2/credentials.py\n--- a/google/oauth2/credentials.py\n+++ b/google/oauth2/credentials.py\n@@ -68,6 +68,27 @@\n         self._client_id = client_id\n         self._client_secret = client_secret\n \n+    @property\n+    def refresh_token(self):\n+        \"\"\"Optional[str]: The OAuth 2.0 refresh token.\"\"\"\n+        return self._refresh_token\n+\n+    @property\n+    def token_uri(self):\n+        \"\"\"Optional[str]: The OAuth 2.0 authorization server's token endpoint\n+        URI.\"\"\"\n+        return self._token_uri\n+\n+    @property\n+    def client_id(self):\n+        \"\"\"Optional[str]: The OAuth 2.0 client ID.\"\"\"\n+        return self._client_id\n+\n+    @property\n+    def client_secret(self):\n+        \"\"\"Optional[str]: The OAuth 2.0 client secret.\"\"\"\n+        return self._client_secret\n+\n     @property\n     def requires_scopes(self):\n         \"\"\"False: OAuth 2.0 credentials have their scopes set when\n", "issue": "Add public properties to google.oauth2.credentials.Credentials\nResolves #124 \n", "before_files": [{"content": "# Copyright 2016 Google Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n\"\"\"OAuth 2.0 Credentials.\n\nThis module provides credentials based on OAuth 2.0 access and refresh tokens.\nThese credentials usually access resources on behalf of a user (resource\nowner).\n\nSpecifically, this is intended to use access tokens acquired using the\n`Authorization Code grant`_ and can refresh those tokens using a\noptional `refresh token`_.\n\nObtaining the initial access and refresh token is outside of the scope of this\nmodule. Consult `rfc6749 section 4.1`_ for complete details on the\nAuthorization Code grant flow.\n\n.. _Authorization Code grant: https://tools.ietf.org/html/rfc6749#section-1.3.1\n.. _refresh token: https://tools.ietf.org/html/rfc6749#section-6\n.. _rfc6749 section 4.1: https://tools.ietf.org/html/rfc6749#section-4.1\n\"\"\"\n\nfrom google.auth import _helpers\nfrom google.auth import credentials\nfrom google.oauth2 import _client\n\n\nclass Credentials(credentials.Scoped, credentials.Credentials):\n    \"\"\"Credentials using OAuth 2.0 access and refresh tokens.\"\"\"\n\n    def __init__(self, token, refresh_token=None, token_uri=None,\n                 client_id=None, client_secret=None, scopes=None):\n        \"\"\"\n        Args:\n            token (Optional(str)): The OAuth 2.0 access token. Can be None\n                if refresh information is provided.\n            refresh_token (str): The OAuth 2.0 refresh token. If specified,\n                credentials can be refreshed.\n            token_uri (str): The OAuth 2.0 authorization server's token\n                endpoint URI. Must be specified for refresh, can be left as\n                None if the token can not be refreshed.\n            client_id (str): The OAuth 2.0 client ID. Must be specified for\n                refresh, can be left as None if the token can not be refreshed.\n            client_secret(str): The OAuth 2.0 client secret. Must be specified\n                for refresh, can be left as None if the token can not be\n                refreshed.\n            scopes (Sequence[str]): The scopes that were originally used\n                to obtain authorization. This is a purely informative parameter\n                that can be used by :meth:`has_scopes`. OAuth 2.0 credentials\n                can not request additional scopes after authorization.\n        \"\"\"\n        super(Credentials, self).__init__()\n        self.token = token\n        self._refresh_token = refresh_token\n        self._scopes = scopes\n        self._token_uri = token_uri\n        self._client_id = client_id\n        self._client_secret = client_secret\n\n    @property\n    def requires_scopes(self):\n        \"\"\"False: OAuth 2.0 credentials have their scopes set when\n        the initial token is requested and can not be changed.\"\"\"\n        return False\n\n    def with_scopes(self, scopes):\n        \"\"\"Unavailable, OAuth 2.0 credentials can not be re-scoped.\n\n        OAuth 2.0 credentials have their scopes set when the initial token is\n        requested and can not be changed.\n        \"\"\"\n        raise NotImplementedError(\n            'OAuth 2.0 Credentials can not modify their scopes.')\n\n    @_helpers.copy_docstring(credentials.Credentials)\n    def refresh(self, request):\n        access_token, refresh_token, expiry, _ = _client.refresh_grant(\n            request, self._token_uri, self._refresh_token, self._client_id,\n            self._client_secret)\n\n        self.token = access_token\n        self.expiry = expiry\n        self._refresh_token = refresh_token\n", "path": "google/oauth2/credentials.py"}], "after_files": [{"content": "# Copyright 2016 Google Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n\"\"\"OAuth 2.0 Credentials.\n\nThis module provides credentials based on OAuth 2.0 access and refresh tokens.\nThese credentials usually access resources on behalf of a user (resource\nowner).\n\nSpecifically, this is intended to use access tokens acquired using the\n`Authorization Code grant`_ and can refresh those tokens using a\noptional `refresh token`_.\n\nObtaining the initial access and refresh token is outside of the scope of this\nmodule. Consult `rfc6749 section 4.1`_ for complete details on the\nAuthorization Code grant flow.\n\n.. _Authorization Code grant: https://tools.ietf.org/html/rfc6749#section-1.3.1\n.. _refresh token: https://tools.ietf.org/html/rfc6749#section-6\n.. _rfc6749 section 4.1: https://tools.ietf.org/html/rfc6749#section-4.1\n\"\"\"\n\nfrom google.auth import _helpers\nfrom google.auth import credentials\nfrom google.oauth2 import _client\n\n\nclass Credentials(credentials.Scoped, credentials.Credentials):\n    \"\"\"Credentials using OAuth 2.0 access and refresh tokens.\"\"\"\n\n    def __init__(self, token, refresh_token=None, token_uri=None,\n                 client_id=None, client_secret=None, scopes=None):\n        \"\"\"\n        Args:\n            token (Optional(str)): The OAuth 2.0 access token. Can be None\n                if refresh information is provided.\n            refresh_token (str): The OAuth 2.0 refresh token. If specified,\n                credentials can be refreshed.\n            token_uri (str): The OAuth 2.0 authorization server's token\n                endpoint URI. Must be specified for refresh, can be left as\n                None if the token can not be refreshed.\n            client_id (str): The OAuth 2.0 client ID. Must be specified for\n                refresh, can be left as None if the token can not be refreshed.\n            client_secret(str): The OAuth 2.0 client secret. Must be specified\n                for refresh, can be left as None if the token can not be\n                refreshed.\n            scopes (Sequence[str]): The scopes that were originally used\n                to obtain authorization. This is a purely informative parameter\n                that can be used by :meth:`has_scopes`. OAuth 2.0 credentials\n                can not request additional scopes after authorization.\n        \"\"\"\n        super(Credentials, self).__init__()\n        self.token = token\n        self._refresh_token = refresh_token\n        self._scopes = scopes\n        self._token_uri = token_uri\n        self._client_id = client_id\n        self._client_secret = client_secret\n\n    @property\n    def refresh_token(self):\n        \"\"\"Optional[str]: The OAuth 2.0 refresh token.\"\"\"\n        return self._refresh_token\n\n    @property\n    def token_uri(self):\n        \"\"\"Optional[str]: The OAuth 2.0 authorization server's token endpoint\n        URI.\"\"\"\n        return self._token_uri\n\n    @property\n    def client_id(self):\n        \"\"\"Optional[str]: The OAuth 2.0 client ID.\"\"\"\n        return self._client_id\n\n    @property\n    def client_secret(self):\n        \"\"\"Optional[str]: The OAuth 2.0 client secret.\"\"\"\n        return self._client_secret\n\n    @property\n    def requires_scopes(self):\n        \"\"\"False: OAuth 2.0 credentials have their scopes set when\n        the initial token is requested and can not be changed.\"\"\"\n        return False\n\n    def with_scopes(self, scopes):\n        \"\"\"Unavailable, OAuth 2.0 credentials can not be re-scoped.\n\n        OAuth 2.0 credentials have their scopes set when the initial token is\n        requested and can not be changed.\n        \"\"\"\n        raise NotImplementedError(\n            'OAuth 2.0 Credentials can not modify their scopes.')\n\n    @_helpers.copy_docstring(credentials.Credentials)\n    def refresh(self, request):\n        access_token, refresh_token, expiry, _ = _client.refresh_grant(\n            request, self._token_uri, self._refresh_token, self._client_id,\n            self._client_secret)\n\n        self.token = access_token\n        self.expiry = expiry\n        self._refresh_token = refresh_token\n", "path": "google/oauth2/credentials.py"}]}