Skip to content
This repository was archived by the owner on Jul 16, 2024. It is now read-only.

Commit f6b6372

Browse files
committed
Enhanced preview support. Developers can now provide client application credentials and the plugin will use Oracle's cloud IDP to generate an OAuth token for the session.
1 parent 75113f3 commit f6b6372

File tree

8 files changed

+132
-853
lines changed

8 files changed

+132
-853
lines changed

LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2021 Oracle and/or its affiliates.
1+
Copyright (c) 2021, 2022, Oracle and/or its affiliates.
22

33
The Universal Permissive License (UPL), Version 1.0
44

README.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ module.exports = {
3838
renditions: 'none',
3939
preview: false,
4040
auth: '',
41+
oAuthSettings: null,
4142
staticAssetDownload: 'false'.
4243
staticAssetRootDir: 'asset'
4344

@@ -87,8 +88,19 @@ This setting controls whether the client will be retrieving preview (unpublished
8788

8889
**`auth`** [optional]
8990
This setting is used to set authentication tokens required when downloading from a secure publishing channel (preview=false) or preview items. It may use basic auth or
90-
an OAuth bearer token. It defaults to an empty string.
91+
an OAuth bearer token. It defaults to an empty string. Note that using this setting with a bearer token will not refresh the token when it is no longer valid. For that
92+
behavior you need to use the oAuthSettings parameter documented below.
9193

94+
**`oAuthSettings`** [optional]
95+
This setting is used when using OAUTH to authenticate a secure publishing channel or using preview support. Using this will ensure that a valid OAUTH bearer token will
96+
be available to the application. The setting takes the form of an object with the following fields:
97+
{
98+
CLIENT_ID: 'xxxxx',
99+
CLIENT_SECRET: 'xxxxx',
100+
CLIENT_SCOPE_URL: 'xxxxx',
101+
IDP_URL: 'https://identity.server.com'
102+
}
103+
92104
**`staticAssetDownload`** [optional]
93105
This setting is used to make the plugin download binary assets into the public directory of the site as opposed to storing them in the internal Gatsby cache. This allows items such as image files to be referenced as direct URLs rather than using GraphQL to access them. It is used in combination with the staticAssetRootDir (described below). The default value is false which means all data will be in the cache instead.
94106

@@ -187,7 +199,7 @@ vulnerability disclosure process.
187199

188200
## License
189201

190-
Copyright (c) 2021 Oracle and/or its affiliates.
202+
Copyright (c) 2021, 2022, Oracle and/or its affiliates.
191203

192204
Released under the Universal Permissive License v1.0 as shown at
193205
<https://oss.oracle.com/licenses/upl/>.

0 commit comments

Comments
 (0)