pulumi-fusionauth
Version:
A Pulumi package for managing FusionAuth instances.
108 lines • 5.9 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.FusionAuthIdpXBox = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* ## # Xbox Identity Provider Resource
*
* The Xbox identity provider type will use the Xbox OAuth v2.0 login API. It will also provide a Login with Xbox button on FusionAuth’s login page that will direct a user to the Xbox login page.
*
* This identity provider will call Xbox’s API to load the user’s email and gtg (Gamer Tag) and use those as email and username to lookup or create a user in FusionAuth depending on the linking strategy configured for this identity provider. Additional claims returned by Xbox can be used to reconcile the user to FusionAuth by using an Xbox Reconcile Lambda.
*
* FusionAuth will also store the Xbox refreshToken returned from the Xbox API in the link between the user and the identity provider. This token can be used by an application to make further requests to Xbox APIs on behalf of the user.
*
* [Xbox Identity Provider APIs](https://fusionauth.io/docs/v1/tech/apis/identity-providers/xbox/)
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as fusionauth from "pulumi-fusionauth";
*
* const xbox = new fusionauth.FusionAuthIdpXBox("xbox", {
* applicationConfigurations: [{
* applicationId: fusionauth_application.GPS_Insight.id,
* createRegistration: true,
* enabled: true,
* }],
* buttonText: "Login with Xbox",
* clientId: "0eb1ce3c-2fb1-4ae9-b361-d49fc6e764cc",
* clientSecret: "693s000cbn66k0mxtqzr_c_NfLy3~6_SEA",
* scope: "Xboxlive.signin Xboxlive.offline_access",
* });
* ```
*/
class FusionAuthIdpXBox extends pulumi.CustomResource {
/**
* Get an existing FusionAuthIdpXBox 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 FusionAuthIdpXBox(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of FusionAuthIdpXBox. 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'] === FusionAuthIdpXBox.__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["idpId"] = state ? state.idpId : 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 ? args.clientSecret : undefined;
resourceInputs["debug"] = args ? args.debug : undefined;
resourceInputs["enabled"] = args ? args.enabled : undefined;
resourceInputs["idpId"] = args ? args.idpId : 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);
super(FusionAuthIdpXBox.__pulumiType, name, resourceInputs, opts);
}
}
exports.FusionAuthIdpXBox = FusionAuthIdpXBox;
/** @internal */
FusionAuthIdpXBox.__pulumiType = 'fusionauth:index/fusionAuthIdpXBox:FusionAuthIdpXBox';
//# sourceMappingURL=fusionAuthIdpXBox.js.map