예제 #1
0
        /// <summary>
        /// Operations to be performed during the upgrade process.
        /// </summary>
        public override void Up()
        {
            RockMigrationHelper.AddDefinedType(
                "Global",
                "JSON Web Token Configuration",
                "These values represent validation parameters for JSON Web Tokens.  The actual defined value is an OpenID configuration URL.  An example value if you are using Auth0 would be https://xxxxxx.auth0.com/.well-known/openid-configuration.  Attributes for these defined values define additional parameters for token verification and then Person Search Key association.",
                SystemGuid.DefinedType.JWT_CONFIGURATION,
                "");

            RockMigrationHelper.AddDefinedTypeAttribute(
                SystemGuid.DefinedType.JWT_CONFIGURATION,
                "59D5A94C-94A0-4630-B80A-BB25697D74C7",
                "Person Search Key",
                "PersonSearchTypeValue",
                "The person search keys to use when looking for the bearer of a token using a person search key",
                1037,
                "",
                Rock.SystemGuid.Attribute.DEFINED_VALUE_JWT_SEARCH_KEY);

            RockMigrationHelper.AddDefinedTypeAttribute(SystemGuid.DefinedType.JWT_CONFIGURATION, "9C204CD0-1233-41C5-818A-C5DA439445AA", "Audience", "Audience", "The Audience for the JSON Web Token", 1034, "", SystemGuid.Attribute.DEFINED_VALUE_JWT_AUDIENCE);
            RockMigrationHelper.AddDefinedTypeAttribute(SystemGuid.DefinedType.JWT_CONFIGURATION, "9C204CD0-1233-41C5-818A-C5DA439445AA", "Issuer", "Issuer", "The Issuer for the JSON Web Token", 1035, "", SystemGuid.Attribute.DEFINED_VALUE_JWT_ISSUER);
            RockMigrationHelper.AddDefinedTypeAttributeQualifier(SystemGuid.Attribute.DEFINED_VALUE_JWT_SEARCH_KEY, SystemGuid.DefinedType.PERSON_SEARCH_KEYS, "E1F99CD5-881D-485F-87F1-E74E713D43A1");
        }