-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add servicenow oauth app integration
Signed-off-by: Nick Hale <[email protected]>
- Loading branch information
Showing
6 changed files
with
87 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { z } from "zod"; | ||
|
||
import { | ||
OAuthAppSpec, | ||
OAuthFormStep, | ||
getOAuthLinks, | ||
} from "~/lib/model/oauthApps/oauth-helpers"; | ||
|
||
const schema = z.object({ | ||
clientID: z.string().min(1, "Client ID is required"), | ||
clientSecret: z.string().min(1, "Client Secret is required"), | ||
instanceURL: z.string().min(1, "Instance URL is required"), | ||
}); | ||
|
||
const steps: OAuthFormStep<typeof schema.shape>[] = [ | ||
// TODO(njhale): Add instructions for how to set up the OAuth App in ServiceNow and get | ||
// the required values below. | ||
{ type: "input", input: "clientID", label: "Consumer Key" }, | ||
{ | ||
type: "input", | ||
input: "clientSecret", | ||
label: "Consumer Secret", | ||
inputType: "password", | ||
}, | ||
{ type: "input", input: "instanceURL", label: "Instance URL" }, | ||
]; | ||
|
||
export const ServiceNowOAuthApp = { | ||
schema, | ||
alias: "servicenow", | ||
type: "servicenow", | ||
displayName: "ServiceNow", | ||
steps: steps, | ||
noGatewayIntegration: true, | ||
} satisfies OAuthAppSpec; |