UNPKG

pulumi-fusionauth

Version:

A Pulumi package for managing FusionAuth instances.

120 lines 6.42 kB
"use strict"; // *** 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.FusionAuthIdpLinkedIn = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * ## # LinkedIn Identity Provider Resource * * The LinkedIn identity provider type will use OAuth 2.0 to authenticate a user with LinkedIn. It will also provide a * `Login with LinkedIn` button on FusionAuth’s login page that will direct a user to the LinkedIn login page. * Additionally, after successful user authentication, this identity provider will call LinkedIn’s `/v2/me` and * `/v2/emailAddress` APIs to load additional details about the user and store them in FusionAuth. * * The email address returned by the LinkedIn `/v2/emailAddress` API will be used to create or look up the existing user. * Additional claims returned by LinkedIn can be used to reconcile the User to FusionAuth by using a LinkedIn Reconcile * lambda. Unless you assign a reconcile lambda to this provider, only the email address will be used from the available * claims returned by LinkedIn. * * FusionAuth will also store the LinkedIn `accessToken` returned from the login endpoint in the `identityProviderLink` * object. This object is accessible using the Link API. * * The `identityProviderLink` object stores the token so that you can use it in your application to call LinkedIn APIs on * behalf of the user if desired. * * [LinkedIn Identity Providers API](https://fusionauth.io/docs/v1/tech/apis/identity-providers/linkedin) * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as fusionauth from "pulumi-fusionauth"; * * const linkedin = new fusionauth.FusionAuthIdpLinkedIn("linkedin", { * applicationConfigurations: [{ * applicationId: fusionauth_application.myapp.id, * createRegistration: true, * enabled: true, * }], * buttonText: "Login with LinkedIn", * debug: false, * enabled: true, * clientId: "9876543210", * clientSecret: "716a572f917640698cdb99e9d7e64115", * scope: "r_emailaddress r_liteprofile", * }); * ``` */ class FusionAuthIdpLinkedIn extends pulumi.CustomResource { /** * Get an existing FusionAuthIdpLinkedIn 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 FusionAuthIdpLinkedIn(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of FusionAuthIdpLinkedIn. 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'] === FusionAuthIdpLinkedIn.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["applicationConfigurations"] = state ? state.applicationConfigurations : undefined; resourceInputs["buttonText"] = state ? state.buttonText : undefined; resourceInputs["clientId"] = state ? state.clientId : undefined; resourceInputs["clientSecret"] = state ? state.clientSecret : undefined; resourceInputs["debug"] = state ? state.debug : undefined; resourceInputs["enabled"] = state ? state.enabled : undefined; resourceInputs["lambdaReconcileId"] = state ? state.lambdaReconcileId : undefined; resourceInputs["linkingStrategy"] = state ? state.linkingStrategy : undefined; resourceInputs["scope"] = state ? state.scope : undefined; resourceInputs["tenantConfigurations"] = state ? state.tenantConfigurations : undefined; } else { const args = argsOrState; if ((!args || args.buttonText === undefined) && !opts.urn) { throw new Error("Missing required property 'buttonText'"); } if ((!args || args.clientId === undefined) && !opts.urn) { throw new Error("Missing required property 'clientId'"); } if ((!args || args.clientSecret === undefined) && !opts.urn) { throw new Error("Missing required property 'clientSecret'"); } resourceInputs["applicationConfigurations"] = args ? args.applicationConfigurations : undefined; resourceInputs["buttonText"] = args ? args.buttonText : undefined; resourceInputs["clientId"] = args ? args.clientId : undefined; resourceInputs["clientSecret"] = (args === null || args === void 0 ? void 0 : args.clientSecret) ? pulumi.secret(args.clientSecret) : undefined; resourceInputs["debug"] = args ? args.debug : undefined; resourceInputs["enabled"] = args ? args.enabled : undefined; resourceInputs["lambdaReconcileId"] = args ? args.lambdaReconcileId : undefined; resourceInputs["linkingStrategy"] = args ? args.linkingStrategy : undefined; resourceInputs["scope"] = args ? args.scope : undefined; resourceInputs["tenantConfigurations"] = args ? args.tenantConfigurations : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); const secretOpts = { additionalSecretOutputs: ["clientSecret"] }; opts = pulumi.mergeOptions(opts, secretOpts); super(FusionAuthIdpLinkedIn.__pulumiType, name, resourceInputs, opts); } } exports.FusionAuthIdpLinkedIn = FusionAuthIdpLinkedIn; /** @internal */ FusionAuthIdpLinkedIn.__pulumiType = 'fusionauth:index/fusionAuthIdpLinkedIn:FusionAuthIdpLinkedIn'; //# sourceMappingURL=fusionAuthIdpLinkedIn.js.map