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 22 commits
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
1 change: 1 addition & 0 deletions cypress.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ module.exports = defineConfig({
baseUrl: 'http://localhost:9000',
specPattern: 'cypress/e2e/**/*.cy.{js,jsx,ts,tsx}',
},
pageLoadTimeout: 300000,
})
32 changes: 32 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,14 @@ module.exports = {
title: 'Adobe Analytics',
path: 'index.md'
},
{
title: 'Get API Key credential',
path: "/getCredential"
},
{
title: 'Get OAuth S2S credential',
path: "/get-credential-oauth"
},
{
title: 'Docs',
menu: [
Expand Down Expand Up @@ -249,9 +259,31 @@ 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,
})
);
app.use("/v1/templates", createProxyMiddleware({
target: "https://stage.adobeioruntime.net/api/v1/web/adp-template-registry-deepeshtest/template-registry-api/",
secure: false,
changeOrigin: true,
}));

app.use("/ims", createProxyMiddleware({
target: "https://ims-na1-stg1.adobelogin.com/ims",
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
132 changes: 132 additions & 0 deletions example/src/pages/credential/GetCredentialApiKey.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
import React from 'react'
import { GetCredential } from '../../../../packages/gatsby-theme-aio/src/components/GetCredential';
import creativeCloud from "../../pages/creative_cloud/images/cc-icon.png";

const GetCredentialApiKey = () => {
return (
<GetCredential className="getCredentialContainer" templateId="664e39607dcc7c0e5a4a035b" >

<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 multiple APIs from your application." className="formClass">

<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 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="Adobe Express Embed SDK" icon={creativeCloud} />
</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="Python" href="https://python.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 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 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'>Express Embed SDK documentation</a>
</div>
</GetCredential.Form.Side>

</GetCredential.Form>

<GetCredential.UnknownError helpLink="https://some_help_link" helpLinkText="Get Help" className="unKnownError" />

<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.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">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'>Express Embed SDK documentation</a>
</div>
</GetCredential.Card.Side>

<GetCredential.Card.Products label="Included products and services">
<GetCredential.Card.Product label="Adobe Express Embed SDK" icon={creativeCloud} />
</GetCredential.Card.Products>

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

<GetCredential.Card.CredentialDetails heading="Credential details">
<GetCredential.Card.CredentialDetails.APIKey heading="API Key" />
<GetCredential.Card.CredentialDetails.AllowedOrigins heading="Allowed domains" />
<GetCredential.Card.CredentialDetails.OrganizationName heading="Organization" />
</GetCredential.Card.CredentialDetails>

</GetCredential.Card>

<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" nextStepsLabel="Next steps" nextStepsHref="/credentials/nextsteps" developerConsoleManage="Manage on Developer console" className="card_developer_console">

<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.APIKey heading="API Key" />
<GetCredential.Return.CredentialDetails.AllowedOrigins heading="Allowed domains" />
<GetCredential.Return.CredentialDetails.OrganizationName heading="Organization" />
</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/projects' />

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

<GetCredential.Return.Products label="Included products and services">
<GetCredential.Return.Product label="Adobe Express Embed SDK" icon={creativeCloud} />
</GetCredential.Return.Products>

</GetCredential.Return>

<GetCredential.RequestAccess
title="Get credentials"
paragraph="Create unique credentials that you will use to call multiple APIs from your application."
>
<GetCredential.RequestAccess.RestrictedAccess
title="Restricted Access"
buttonLabel="Request access"
>
<GetCredential.RequestAccess.RestrictedAccess.RestrictedAccessProducts label="Included products and services">
<GetCredential.RequestAccess.RestrictedAccess.RestrictedAccessProducts.RestrictedAccessProduct label="Adobe Express Embed SDK" icon={creativeCloud} />
</GetCredential.RequestAccess.RestrictedAccess.RestrictedAccessProducts>
</GetCredential.RequestAccess.RestrictedAccess>
<GetCredential.RequestAccess.RequestAccessSide>
<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 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'>Express Embed SDK documentation</a>
</div>
</GetCredential.RequestAccess.RequestAccessSide>
</GetCredential.RequestAccess>

<GetCredential.NoDeveloperAccessError title='Get Credentials' docsLinkText="How do I get developer permissions for the [Firefly - Firefly and Creative Cloud Automation API]?" docsLink="" />

<GetCredential.ErrorCode helpLink="Get help" title="Error code ###" description="Your personal account does not have Developer role permission to access the [Org Name, Inc.] organization in the Adobe Developer Console." buttonLabel="Contact Adobe" buttonLink="https://some_help_link" />

</GetCredential>

)
}

export default GetCredentialApiKey;
62 changes: 0 additions & 62 deletions example/src/pages/credential/GetCredentialExternal.js

This file was deleted.

Loading
Loading