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
trigger: | |
- none | |
pool: | |
vmImage: ubuntu-latest | |
steps: | |
- checkout: self | |
fetchDepth: 0 | |
fetchTags: true | |
persistCredentials: true | |
- task: CmdLine@2 |
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
# Maven | |
# Build your Java project and run tests with Apache Maven. | |
# Add steps that analyze code, save build artifacts, deploy, and more: | |
# https://docs.microsoft.com/azure/devops/pipelines/languages/java | |
trigger: | |
- main | |
pool: | |
vmImage: ubuntu-latest |
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
#r "Newtonsoft.Json" | |
using System.Net; | |
using Microsoft.AspNetCore.Mvc; | |
using Microsoft.Extensions.Primitives; | |
using Newtonsoft.Json; | |
public static async Task<IActionResult> Run(HttpRequest req, ILogger log) | |
{ | |
return new OkObjectResult("Hello World!"); |
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
cognitoIDTokenBlackListTableName: CognitoIDTokenBlackList-#{AWS::AccountId}-${self:custom.currentStage} | |
cognitoIDTokenBlackListTable: | |
Type: AWS::DynamoDB::Table | |
Properties: | |
TableName: ${self:custom.cognitoIDTokenBlackListTableName} | |
AttributeDefinitions: | |
- AttributeName: CognitoTokenID | |
AttributeType: S | |
KeySchema: |
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
AWSTemplateFormatVersion: 2010-09-09 | |
Description: The CloudFormation template for the Private & Public Subnets with RDS Database. | |
Parameters: | |
Stage: | |
Type: String | |
Default: dev | |
Resources: | |
# ======================= Private VPC Configuration ==================== |
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
# Copyright 2017-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file | |
# except in compliance with the License. A copy of the License is located at | |
# | |
# http://aws.amazon.com/apache2.0/ | |
# | |
# or in the "license" file accompanying this file. This file is distributed on an "AS IS" | |
# BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | |
# License for the specific language governing permissions and limitations under the License. |
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
using System; | |
using System.IO; | |
namespace SignImages | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
const string PrivateKeryCertName = "PrivateKeyCert.pfx"; |
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
/// <summary> | |
/// Retrieve the image data from the signed xml document | |
/// </summary> | |
/// <param name="xmlFilePath">Path to the signed xml image document</param> | |
/// <returns>Byte[] of the image</returns> | |
public static byte[] GetImage(string xmlFilePath) | |
{ | |
var unsignedXMLDocument = UnsignXMLDocument(xmlFilePath); | |
return DeserializeXMLToImage(unsignedXMLDocument); |
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
/// <summary> | |
/// Deserialize the unsigned xml document and retrieve the image | |
/// </summary> | |
/// <param name="xmlDocument">Unsigned XmlDocument</param> | |
/// <returns>Byte[] of the image</returns> | |
private static byte[] DeserializeXMLToImage(XmlDocument xmlDocument) | |
{ | |
StringWriter stringWriter = new StringWriter(); | |
XmlTextWriter xmlTextWriter = new XmlTextWriter(stringWriter); |
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
/// <summary> | |
/// Remove the Signature from signed XML document | |
/// </summary> | |
/// <param name="xmlFilePath">Path to the signed xml document</param> | |
/// <returns>The unsigned xml document</returns> | |
private static XmlDocument UnsignXMLDocument(string xmlFilePath) | |
{ | |
var xmlDocument = ReadXMLDocumentFromPath(xmlFilePath); | |
var nodeList = xmlDocument.GetElementsByTagName("Signature"); |
NewerOlder