Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get credential phase 2 #1575

Merged
merged 55 commits into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
552e964
build : Initial commit for get credential phase 2
BaskarMitrah May 8, 2024
ba795ea
build : --Added the separated components and moved into folder
BaskarMitrah May 10, 2024
d135190
build : --Updated the get crdential external page
BaskarMitrah May 10, 2024
bf902ee
feat: wired up get template by id and install template endpoints (#1577)
deepessh May 15, 2024
098278a
fix: added request access
BaskarMitrah May 15, 2024
c5871a7
integrated request access
deepessh May 16, 2024
07d5c60
build : Fixed design issues & Removed unwanted code
BaskarMitrah May 16, 2024
aa23c65
fix: code improvements
deepessh May 17, 2024
07751e0
build : fixed the design issues and removed the unwanted code
BaskarMitrah May 17, 2024
bb416e8
Revert "build : fixed the design issues and removed the unwanted code"
BaskarMitrah May 17, 2024
de3ae10
build:added some design issue (#1580)
BaskarMitrah May 17, 2024
b5a6e12
fix: incorrect import
deepessh May 20, 2024
943d83b
build: update change organization
BaskarMitrah May 20, 2024
33e3d03
fix: build issue
BaskarMitrah May 20, 2024
452fc1c
Add back in yarn.lock
timkim May 20, 2024
cf0b0b9
Increase cypress timeout
timkim May 20, 2024
60b42b9
Increase cypress timeout again
timkim May 20, 2024
e0aaf36
added hardcoded wiring for generating access token
deepessh May 21, 2024
0bf2dea
build : showed access token and secret key in the card
BaskarMitrah May 22, 2024
e00d2ff
Added optional chaining to the response
BaskarMitrah May 22, 2024
b06bfc8
fix: oauths2s and api key get credential components
deepessh May 22, 2024
e22e257
--Fixed bugs
BaskarMitrah May 23, 2024
bb41a59
fix : reduced code & added tooltip for card
BaskarMitrah May 27, 2024
8d663a3
fix : removed unwanted code
BaskarMitrah May 27, 2024
ec2bad6
feat: bug fix, integrate with TR on stage
deepessh May 28, 2024
579f960
fix: fixes
deepessh May 30, 2024
9c3447f
Bugs/api integration (#1581)
deepessh Jun 5, 2024
80209ca
Merge remote-tracking branch 'origin/main' into get_credential_phase2
deepessh Jun 5, 2024
6d5784c
fix: increase cypress timeout
timkim Jun 5, 2024
6a25dee
fix : Added Scopes & fixed design issues (#1583)
deepessh Jun 6, 2024
6625fbb
feat: integrated the new accounts API, bug fixes
deepessh Jun 6, 2024
96a6a68
fix: code improvements and bug fixes
deepessh Jun 6, 2024
3bcc5b5
Merge remote-tracking branch 'origin/main' into get_credential_phase2
deepessh Jun 6, 2024
6f18f83
removed unnecessary console.log
deepessh Jun 6, 2024
4922ec4
feat: use window.adobeIMS instead of ims from context
deepessh Jun 7, 2024
a0341da
Bugs/remaned components (#1584)
deepessh Jun 7, 2024
57615e6
--Updated helptext (#1589)
BaskarMitrah Jul 9, 2024
48cfb7b
Error in form (#1590)
BaskarMitrah Jul 9, 2024
7f5f109
--Added manage developer console as a optional (#1591)
BaskarMitrah Jul 9, 2024
771bca4
--Fixed the issues on the generate token & client secret (#1592)
BaskarMitrah Jul 9, 2024
396613d
Fix : project name issues in the return flow (#1593)
BaskarMitrah Jul 9, 2024
3c5f846
fix : Updated role text in the organization (#1600)
BaskarMitrah Jul 9, 2024
508ebd6
Fix : Picker design issues (#1594)
BaskarMitrah Jul 9, 2024
579839e
fix: added email to request access (#1599)
manimitrah Jul 9, 2024
f4cfeb5
fix: dropdown similarity (#1597)
manimitrah Jul 9, 2024
fe6416a
fix: added loading text to the loader (#1595)
manimitrah Jul 9, 2024
c1da6b3
fix: Upon requesting access, the request pending status does not show…
manimitrah Jul 9, 2024
a4415e9
fix: Personal Developer Org bug on org switcher and error states (#1598)
manimitrah Jul 9, 2024
0d2f95b
Merge remote-tracking branch 'origin/main' into get_credential_phase2
deepessh Jul 9, 2024
c450505
chore: release rc version
deepessh Jul 9, 2024
bd80871
fix: issue with download, bump version
deepessh Jul 9, 2024
c2efa3f
chore: update version in package.json
deepessh Jul 10, 2024
faec892
chore: updated changelog
deepessh Jul 10, 2024
ead5d5e
fix: typo
deepessh Jul 10, 2024
196a66d
chore: update version in package.json and changelog
deepessh Jul 10, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions example/gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
* governing permissions and limitations under the License.
*/

const { createProxyMiddleware } = require("http-proxy-middleware");

module.exports = {
pathPrefix: process.env.PATH_PREFIX || '/example/',
siteMetadata: {
Expand All @@ -35,6 +37,10 @@ module.exports = {
title: 'Adobe Analytics',
path: 'index.md'
},
{
title: 'Get credential',
path: "/getCredential"
},
{
title: 'Docs',
menu: [
Expand Down Expand Up @@ -249,9 +255,20 @@ module.exports = {
}
]
}

]
},
plugins: [
`@adobe/gatsby-theme-aio`
],
developMiddleware: app => {
app.use(
"/console/api",
createProxyMiddleware({
target: "https://developer-stage.adobe.com/console/api",
secure: false,
changeOrigin: true,
})
)
},
};
3 changes: 2 additions & 1 deletion example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"version": "0.0.1",
"dependencies": {
"@adobe/gatsby-theme-aio": "*",
"gatsby": "4.22.0"
"gatsby": "4.22.0",
"http-proxy-middleware": "^3.0.0"
},
"scripts": {
"start": "gatsby build && gatsby serve",
Expand Down
116 changes: 93 additions & 23 deletions example/src/pages/credential/GetCredentialExternal.js
Original file line number Diff line number Diff line change
@@ -1,34 +1,45 @@
import React from 'react';
import { GetCredential } from "../../../../packages/gatsby-theme-aio/src/components/GetCredential";
import "./Credential.css"
import React from 'react'
import { GetCredential } from '../../../../packages/gatsby-theme-aio/src/components/GetCredential';
import firefly from "./images/firefly.png";
import ps from "./images/ps.png";

const GetCredentialExternal = () => {
return (

<GetCredential credentialType="apiKey" className="getCredentialContainer" service="CCEmbedCompanionAPI">
<GetCredential credentialType="apiKey" className="getCredentialContainer" service="CCEmbedCompanionAPI" >

<GetCredential.SignIn title="Get credentials" paragraph="Create unique credentials that you will use to call the Adobe Express Embed SDK from your application." buttonText="Sign in to create credentials" className="SignInClass" />
<GetCredential.SignIn title="Get credentials" paragraph="Create unique credentials that you will use to call multiple APIs from your application." buttonText="Sign in to create credentials" />

<GetCredential.Form title="Get credentials" paragraph="Create unique credentials that you will use to call the Adobe Express Embed SDK from your application." className="formClass">
<GetCredential.Form title="Get credentials" paragraph="Create unique credentials that you will use to call multiple APIs from your application." className="formClass">

<GetCredential.Form.CredentialName label="Credential name" description="Credential name must be unique and between 6 and 45 character long." range="45" />
<GetCredential.Form.CredentialName label="Credential name" description="Credential name must be unique and between 3 and 45 characters long. A project will be automatically created with the same name in Adobe Developer Console." range="45" />

<GetCredential.Form.AllowedOrigins required label="Allowed domains (up to 5)" contextHelp={true} contextHelpHeading="What are allowed domains" placeholder="Example: www.domain-1.com, www.domain-2.com, *.my-domain.com, localhost:5000" contextHelpText="To prevent a third party from using your client ID on their own website, the use of your client ID is restricted to a list of domains that you specifically authorize." contextHelpLink="https://www.adobe.com/" contextHelpLabelForLink="Learn more in our documentation" description="Use wildcards to enter multiple subdomains (*.my-domains.com) or commas to separete multiple domains (www.domain-1.com,www.domain-2.com). During local development, you can include post greater than 1023 with localhost (e.g. localhost:3000). Standard ports(80,443) will be used for non-localhost domains." />
<GetCredential.Form.AllowedOrigins label="Allowed domains (up to 5)" contextHelp={true} contextHelpHeading="What are allowed domains" placeholder="Example: www.domain-1.com, www.domain-2.com, *.my-domain.com, localhost:5000" contextHelpText="To prevent a third party from using your client ID on their own website, the use of your client ID is restricted to a list of domains that you specifically authorize." contextHelpLink="https://www.adobe.com/" contextHelpLabelForLink="Learn more in our documentation" description="Use wildcards to enter multiple subdomains (*.my-domain.com) or commas to separate multiple domains (www.domain-1.com, www.domain-2.com). During local development, you can include ports greater than 1023 with localhost (e.g. localhost:3000). Standard ports (80, 443) will be used for non-localhost domains." />

<GetCredential.Form.Products label="Included products and services">
<GetCredential.Form.Product label="Firefly - Firefly and Creative Cloud Automation API" icon={firefly} />
<GetCredential.Form.Product label="Adobe Photoshop API" icon={ps} />
<GetCredential.Form.Product label="Adobe Analytics" />
<GetCredential.Form.Product label="Lughtgroom" />
</GetCredential.Form.Products>

<GetCredential.Form.Downloads label="Download a personalized code sample" contextHelp={true} contextHelpHeading="Select Language">
<GetCredential.Form.Download title="JavaScript" href="https://acrobatservices.adobe.com/dc-integration-creation-app-cdn/8bab684/files/samples_q3_2023/PROD/dc-pdf-services-sdk-java-samples.zip" />
{/* <GetCredential.Form.Download title=".Net" href="/Net.zip" />
<GetCredential.Form.Download title=".Net" href="/Net.zip" />
<GetCredential.Form.Download title="Python" href="https://python.zip/" />
<GetCredential.Form.Download title="Ruby" href="https://www.ruby.zip/" /> */}
<GetCredential.Form.Download title="Ruby" href="https://www.ruby.zip/" />
</GetCredential.Form.Downloads>

<GetCredential.Form.AdobeDeveloperConsole label='By checking this box, you agree to' linkText="Adobe Developer Terms of Use" href="https://wwwimages2.adobe.com/content/dam/cc/en/legal/servicetou/Adobe-Developer-Additional-Terms_en-US_20230822.pdf" />

<GetCredential.Form.Side>
<div className='side-container'>
<div style="display : flex ; gap : 16px ; flex-direction : column;">
<h3 className="spectrum-Heading spectrum-Heading--sizeS side-header" >API key credential</h3>
<p className="spectrum-Body spectrum-Body--sizeM">Submitting this form created an API Key credential. The API key credential identifies your application to Adobe servers and can help accept or reject requests originating from certian domains.</p>
<p className="spectrum-Body spectrum-Body--sizeM">Submitting this form creates an API Key credential. The API key credential identifies your application to Adobe servers and can help accept or reject requests originating from certain domains.</p>
<h3 className="spectrum-Heading spectrum-Heading--sizeS side-header" >Learn more</h3>
<a className="side-documentation" href='https://some_help_link' target="_blank" rel="noreferrer" >Authentication documentation</a>
<a className='side-documentation' href='https://some_help_link' target="_blank" rel="noreferrer" >Adobe Express Embed SDK documentation</a>
<a className="side-documentation" style={{ color: "#0265DC" }} href='https://some_help_link'>Authentication documentation</a>
<a className='side-documentation' style={{ color: "#0265DC" }} href='https://some_help_link'>Firefly - Firefly and Creative Cloud Automation API documentation</a>
<a className='side-documentation' style={{ color: "#0265DC" }} href='https://some_help_link'>Adobe Photoshop API documentation</a>
</div>
</GetCredential.Form.Side>

Expand All @@ -38,21 +49,80 @@ const GetCredentialExternal = () => {

<GetCredential.Card title="Your credential is ready to use" paragraph="Check the downloads section of your browser for the ZIP file, or find it where you save downloads on your machine." nextStepsLabel="Next steps" nextStepsHref="/credentials/nextsteps" developerConsoleManage="Manage on Developer console" className="card_developer_console">

<GetCredential.Side>
<div className='side-container'>
<GetCredential.Card.Side>
<div style="display : flex ; gap : 16px ; flex-direction : column;">
<h3 className="spectrum-Heading spectrum-Heading--sizeS side-header" >API key credential</h3>
<p className="spectrum-Body spectrum-Body--sizeM">An API Key credential was created. The API key credential identifies your application to Adobe servers and can help accept or reject request originating from certain domains.</p>
<h3 className="spectrum-Heading spectrum-Heading--sizeS" >Learn more</h3>
<a className="side-documentation" href='https://some_help_link' target="_blank" rel="noreferrer" >Authentication documentation</a>
<a className="side-documentation" href='https://some_help_link' target="_blank" rel="noreferrer" >Adobe Express Embed SDK documentation</a>
<p className="spectrum-Body spectrum-Body--sizeM">Submitting this form creates an API Key credential. The API key credential identifies your application to Adobe servers and can help accept or reject requests originating from certain domains.</p>
<h3 className="spectrum-Heading spectrum-Heading--sizeS side-header" >Learn more</h3>
<a className="side-documentation" style={{ color: "#0265DC" }} href='https://some_help_link'>Authentication documentation</a>
<a className='side-documentation' style={{ color: "#0265DC" }} href='https://some_help_link'>Firefly - Firefly and Creative Cloud Automation API documentation</a>
<a className='side-documentation' style={{ color: "#0265DC" }} href='https://some_help_link'>Adobe Photoshop API documentation</a>
</div>
</GetCredential.Side>
</GetCredential.Card.Side>

<GetCredential.Card.Products label="Included products and services">
<GetCredential.Card.Product label="Firefly - Firefly and Creative Cloud Automation API" icon={firefly} />
<GetCredential.Card.Product label="Adobe Photoshop API" icon={ps} />
<GetCredential.Card.Product label="Adobe Analytics" />
{/* <GetCredential.Card.Product label="Lughtgroom" /> */}
</GetCredential.Card.Products>

<GetCredential.Card.ProjectsDropdown label="Projects" subHeading="Only your projects that contain credentials are shown" />

<GetCredential.Card.ManageDeveloperConsole label="Manage all your projects and credentials on Adobe Developer Console" direction='/console' />

<GetCredential.Card.AccessToken helpText="" buttonLabel="Generate and copy token" heading="Access Token" />

<GetCredential.Card.DevConsoleLink heading="Developer Console Project" />

<GetCredential.Card.CredentialDetails heading="Credential details">
{/* <GetCredential.Card.CredentialDetails.ClientId heading="ClientId" /> */}
{/* <GetCredential.Card.CredentialDetails.Scopes heading="Scopes" /> */}
{/* <GetCredential.Card.CredentialDetails.ClientSecret heading="Client Secret" buttonLabel="Retrieve and copy client secret" /> */}
<GetCredential.Card.CredentialDetails.APIKey heading="API Key" />
<GetCredential.Card.CredentialDetails.OrganizationName heading="Organization" />
<GetCredential.Card.CredentialDetails.AllowedOrigins heading="Allowed Domains" />
</GetCredential.Card.CredentialDetails>

</GetCredential.Card>

<GetCredential.NoBetaAccessError betaProgramLink="https://some_help_link" betaProgramLinkText="Join Beta program" heading="Get Credentials" text="Join Beta program to get access to the Adobe Express Embed SDK and start creating unique credentials that you will use in your application." className="joinBetaProgram" />
<GetCredential.Return title="Previously created projects" paragraph="Select a project and access your existing credentials for Firefly - Firefly and Creative Cloud Automation." devConsoleDirection="project_overview|api_overview|credential_overview" developerConsoleManage="Manage all your projects and credentials on Adobe Developer Console" className="card_developer_console">
deepessh marked this conversation as resolved.
Show resolved Hide resolved

<GetCredential.Return.Side>
<GetCredential.Return.Side.Custom>
<div style={{ display: "flex", gap: "30px", flexDirection: "column", width: "100%" }}>
<h3 className='spectrum-Heading spectrum-Heading--sizeM'>Welcome back</h3>
<p className="spectrum-Body spectrum-Body--sizeL">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation.</p>
</div>
</GetCredential.Return.Side.Custom>
<GetCredential.Return.Side.NewCredential heading="Need another credential?" buttonLabel="Create new credential" />
</GetCredential.Return.Side>

<GetCredential.Return.CredentialDetails heading="Credential details">
{/* <GetCredential.Return.CredentialDetails.ClientId heading="ClientId" />
<GetCredential.Return.CredentialDetails.Scopes heading="Scopes" />
<GetCredential.Return.CredentialDetails.ClientSecret heading="Client Secret" buttonLabel="Retrieve and copy client secret" /> */}
<GetCredential.Return.CredentialDetails.APIKey heading="API Key" />
<GetCredential.Return.CredentialDetails.OrganizationName heading="Organization" />
<GetCredential.Return.CredentialDetails.AllowedOrigins heading="Allowed Domains" />
</GetCredential.Return.CredentialDetails>

<GetCredential.Return.ProjectsDropdown label="Projects" subHeading="Only your projects that contain credentials are shown" />

<GetCredential.Return.ManageDeveloperConsole label="Manage all your projects and credentials on Adobe Developer Console" direction='/console' />

<GetCredential.Return.AccessToken helpText="" buttonLabel="Generate and copy token" heading="Access Token" />

<GetCredential.Return.DevConsoleLink heading="Developer Console Project" />

<GetCredential.Return.Products label="Included products and services">
<GetCredential.Return.Product label="Firefly - Firefly and Creative Cloud Automation API" icon={firefly} />
<GetCredential.Return.Product label="Adobe Photoshop API" icon={ps} />
<GetCredential.Return.Product label="Adobe Analytics" />
<GetCredential.Return.Product label="Lughtgroom" />
</GetCredential.Return.Products>

<GetCredential.NoDeveloperAccessError docsLink="https://some_help_link" docsLinkText="How do I got developer permissions for the [Adobe Express Embed SDK]?" />
</GetCredential.Return>
deepessh marked this conversation as resolved.
Show resolved Hide resolved

</GetCredential>

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added example/src/pages/credential/images/ps.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions example/src/pages/getCredential/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import GetCredentialExternal from "../credential/GetCredentialExternal.js"

<GetCredentialExternal />
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,9 @@
"sharp": "0.33.0",
"gatsby-sharp": "1.12.0"
},
"packageManager": "yarn@3.2.3"
"packageManager": "yarn@3.2.3",
"dependencies": {
"@adobe/react-spectrum": "^3.35.0",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure about including react-spectrum as a dependency. It looks like we are just using it for a few ui components. I would like to not have react-spectrum as it would increase the bloat/size of the theme for all who consume it. Moreover, most people who do use the theme won't be using the create credentials component.

I think moving forward we would want to remove whatever ui components we are getting from it and just create our own version of those ui components.

"http-proxy-middleware": "^3.0.0"
}
}
Loading
Loading