Pages

Showing posts with label Azure Functions. Show all posts
Showing posts with label Azure Functions. Show all posts

Wednesday, June 21, 2017

Calling Azure functions from C# with security enabled

Azure functions allow us to run server-less code. We will see how, and in the interest of this sample we will simulate the problem of having to run some code when a payment is done, the code to do it will be on azure and the call would come from our C# payment app.
So to ensure we don't get unauthorized calls, we will activate security on our Azure function and I will show you how to make a secure call and review the azure logs for those calls. So lets begin.

Part 1 - Azure function

In order to create our azure function lets head to:
portal.azure.com
and enter your credentials, if you dont have an azure account, you can get a trial account for free.

Once inside the portal click on the new button '+' then on 'Compute' and on the FuctionApp option.



Then we will set the name of our new function as  ‘licensefunctions’ and click on ‘Create’ (If the name is not available just choose one you see fit)


Tuesday, June 20, 2017

Usar Azure functions en C# con seguridad Activada

Azure functions nos permiten correr codigo 'sin-servidor'. Veremos como, y para este ejemplo simularemos el problema de tener que correr codigo cuando un pago es hecho por un cliente, el cdigo para hacerlo esta en Azure y la llamada vendria de nuestra aplicacion de pago.
Asi que para asegurarnos de no recibir llamadas fraudulentas , vamos a activar la seguridad de nuestra Azure function y te mostrare como hacer una llamada segura y revisar el log de Azure de esas llamadas. Asi que, comencemos.

Parte 1 - Azure function

Para crear nuestra funcion azure dirigete a:
portal.azure.com
e ingresa tus credenciales, si no tienes una cuenta azure, puedes obtener una cuenta de prueba gratis.

Una vez dentro del porta; haz click en el botón '+' y luego en 'Compute' y en la opción FuctionApp.



Ahora pondremos el nombre de nuestra nueva función  ‘licensefunctions’ y hacemos click en ‘Create’ (Si el nombre no esta disponible, escoge uno que veas conveniente)