pulumi-fusionauth
Version:
A Pulumi package for managing FusionAuth instances.
117 lines • 6.31 kB
JavaScript
;
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.FusionAuthIdpApple = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* ## # Apple Identity Provider Resource
*
* The Apple identity provider type will use the Sign in with Apple APIs and will provide a Sign with Apple button on FusionAuth’s login page that will either redirect to an Apple sign in page or leverage native controls when using Safari on macOS or iOS. Additionally, this identity provider will call Apple’s /auth/token API to load additional details about the user and store them in FusionAuth.
*
* FusionAuth will also store the Apple refreshToken that is returned from the /auth/token endpoint in the UserRegistration object inside the tokens Map. This Map stores the tokens from the various identity providers so that you can use them in your application to call their APIs.
*
* [Apple Identity Providers API](https://fusionauth.io/docs/v1/tech/apis/identity-providers/apple/#create-the-apple-identity-provider)
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as fusionauth from "pulumi-fusionauth";
*
* const apple = new fusionauth.FusionAuthIdpApple("apple", {
* applicationConfigurations: [{
* applicationId: "1c212e59-0d0e-6b1a-ad48-f4f92793be32",
* createRegistration: true,
* enabled: true,
* }],
* buttonText: "Sign in with Apple",
* debug: false,
* enabled: true,
* keyId: "2f81529c-4d39-4ce2-982e-cf5fbb1325f6",
* scope: "email name",
* servicesId: "com.piedpiper.webapp",
* teamId: "R4NQ1P4UEB",
* });
* ```
*/
class FusionAuthIdpApple extends pulumi.CustomResource {
/**
* Get an existing FusionAuthIdpApple resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name, id, state, opts) {
return new FusionAuthIdpApple(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of FusionAuthIdpApple. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj) {
if (obj === undefined || obj === null) {
return false;
}
return obj['__pulumiType'] === FusionAuthIdpApple.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["applicationConfigurations"] = state ? state.applicationConfigurations : undefined;
resourceInputs["bundleId"] = state ? state.bundleId : undefined;
resourceInputs["buttonText"] = state ? state.buttonText : undefined;
resourceInputs["debug"] = state ? state.debug : undefined;
resourceInputs["enabled"] = state ? state.enabled : undefined;
resourceInputs["keyId"] = state ? state.keyId : undefined;
resourceInputs["lambdaReconcileId"] = state ? state.lambdaReconcileId : undefined;
resourceInputs["linkingStrategy"] = state ? state.linkingStrategy : undefined;
resourceInputs["scope"] = state ? state.scope : undefined;
resourceInputs["servicesId"] = state ? state.servicesId : undefined;
resourceInputs["teamId"] = state ? state.teamId : undefined;
resourceInputs["tenantConfigurations"] = state ? state.tenantConfigurations : undefined;
}
else {
const args = argsOrState;
if ((!args || args.bundleId === undefined) && !opts.urn) {
throw new Error("Missing required property 'bundleId'");
}
if ((!args || args.buttonText === undefined) && !opts.urn) {
throw new Error("Missing required property 'buttonText'");
}
if ((!args || args.keyId === undefined) && !opts.urn) {
throw new Error("Missing required property 'keyId'");
}
if ((!args || args.servicesId === undefined) && !opts.urn) {
throw new Error("Missing required property 'servicesId'");
}
if ((!args || args.teamId === undefined) && !opts.urn) {
throw new Error("Missing required property 'teamId'");
}
resourceInputs["applicationConfigurations"] = args ? args.applicationConfigurations : undefined;
resourceInputs["bundleId"] = args ? args.bundleId : undefined;
resourceInputs["buttonText"] = args ? args.buttonText : undefined;
resourceInputs["debug"] = args ? args.debug : undefined;
resourceInputs["enabled"] = args ? args.enabled : undefined;
resourceInputs["keyId"] = args ? args.keyId : undefined;
resourceInputs["lambdaReconcileId"] = args ? args.lambdaReconcileId : undefined;
resourceInputs["linkingStrategy"] = args ? args.linkingStrategy : undefined;
resourceInputs["scope"] = args ? args.scope : undefined;
resourceInputs["servicesId"] = args ? args.servicesId : undefined;
resourceInputs["teamId"] = args ? args.teamId : undefined;
resourceInputs["tenantConfigurations"] = args ? args.tenantConfigurations : undefined;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(FusionAuthIdpApple.__pulumiType, name, resourceInputs, opts);
}
}
exports.FusionAuthIdpApple = FusionAuthIdpApple;
/** @internal */
FusionAuthIdpApple.__pulumiType = 'fusionauth:index/fusionAuthIdpApple:FusionAuthIdpApple';
//# sourceMappingURL=fusionAuthIdpApple.js.map