SlideShare uma empresa Scribd logo
1 de 14
Mobile Services
Authentication and Push
     Notifications



                                Radu Vunvulea
                         vunvulear@gmail.com
             http://vunvulearadu.blogspot.com
Who am I?
        {
            “name” : “Radu Vunvulea,
            “company” : “iQuest”,
            “userType” : “enthusiastic”
            “technologies” : [ “.NET”, “JS”, “Azure”, “Web”,
                “Mobile”, “SL” ],
            “w8experience” : [ “2 LoB App”, “1 Travel App”],
            “blog” : “vunvulearadu.blogspot.com”,
            “email” : ”vunvulear@gmail.com”,
            “socialMedia” :
                {
                         “twitter” : “@RaduVunvulea”,
                         “fb” : “radu.vunvulea”
                }
        }
Windows Azure Mobile Services
• Authentication
Identify providers supported
How to work with data
• Define custom scripts that check if the given user id has rights to
  access his data
App.MobileService.GetTable<MyEntity>()
• Before this we need to create a table with the same name
• Update: table.UpdateAsync(entity)
• Delete: table.DeleteAsync(entity)
• Insert: table.InsertAsync(entity)
• Fetch with data:
    •   Where
    •   Take
    •   Skip
    •   OrderBy
    •   Select
    •   ThenBy
    •   ToListAsync
Register your application
• Each application need to be register to the identify provider
• Windows Live:
   • http://go.microsoft.com/fwlink/p/?LinkId=262039&clcid=0x409
• Facebook
   • http://go.microsoft.com/fwlink/p/?LinkId=268286&clcid=0x409
• Google
   • http://go.microsoft.com/fwlink/p/?LinkId=268303&clcid=0x409
• Twitter
   • http://go.microsoft.com/fwlink/p/?LinkId=268300&clcid=0x409


• Every identify provider require to specify the URL of our
  mobile service
Configure mobile service identity
• After configuring the identity provider the “Identity” data need to be
  configured on our Mobile Service page
• We can have more than one identify provider active

• All the provider give us similar output:
   • Key/Id
   • Secret token

• After setting the key and secret token your service is ready to use
  authentication
Adding authentication to data
• Change table permissions of each CRUD operation that you need to
  be accessible by authenticate user only to “Only Authenticate Users”

• After this step all the table content on the given CRUD operation will
  be accessible only to authenticated users

• The error that is returned when a user will try to access a specific
  service and is not authenticated will be
    •   401 – Unauthorized
Authentication on the client
• There is a build in control that resolve the authentication problem
• The only think that we need to do is to specify the identify provider
   App.MobileService.LoginAsync(
       MobileServiceAuthenticationProvider.Facebook)
• After this step each time when user will access a table from mobile
  service the user.userId field will contain the user id

• Remarks:
   All users that are login will be able to access any kind of data from
   our table. In this way we didn’t restrict access to specific rows from
   it.
Restrict access to table rows
• We don’t have an our of the box mechanism

• On the INSERT action script we can add a column when we store the
  user id
   function insert(item, user, request) {
     item.userId = user.userId;
     request.execute();
   }
• On the action where we want to control access we need to check the
  userId
   function read(query, user, request) {
     query.where({ userId: user.userId });
     request.execute();
   }
Push notifications
  • Register your application
  • Associate your application from VS with your app from Store
  • Save your Client Secret key and Package Security Identifier from
    My Apps tab
  • Add Client Secret key and Package Security Identified to your
    Mobile Service (under Push tab)
  • Use “PushNotificationChannelManager” to register to push
    notifications

  • Data can be pushed even from CRUD script of Mobile Services
    tables:
      push.wns.sendToastText04(item.channel, {
               title: item.text
            }
Demo
THE END




                        Radu Vunvulea
                 vunvulear@gmail.com
     http://vunvulearadu.blogspot.com

Mais conteúdo relacionado

Mais procurados

Антон Бойко (Microsoft Azure MVP, Ukrainian Azure Community Founder) «Azure M...
Антон Бойко (Microsoft Azure MVP, Ukrainian Azure Community Founder) «Azure M...Антон Бойко (Microsoft Azure MVP, Ukrainian Azure Community Founder) «Azure M...
Антон Бойко (Microsoft Azure MVP, Ukrainian Azure Community Founder) «Azure M...DataArt
 
Authentication and Authorization in Asp.Net
Authentication and Authorization in Asp.NetAuthentication and Authorization in Asp.Net
Authentication and Authorization in Asp.NetShivanand Arur
 
Integrating Visual Studio Team Services with Active Directory Federation Ser...
Integrating Visual Studio Team Services with  Active Directory Federation Ser...Integrating Visual Studio Team Services with  Active Directory Federation Ser...
Integrating Visual Studio Team Services with Active Directory Federation Ser...Suman Singh
 
OAuth in the new .NET world (OWIN)
OAuth in the new .NET world (OWIN)OAuth in the new .NET world (OWIN)
OAuth in the new .NET world (OWIN)Emad Alashi
 
Microsoft Azure Identity and O365
Microsoft Azure Identity and O365Microsoft Azure Identity and O365
Microsoft Azure Identity and O365Kris Wagner
 
Web Service Connection - using Login Operation
Web Service Connection - using Login OperationWeb Service Connection - using Login Operation
Web Service Connection - using Login OperationDatagaps Inc
 
Azure AD Presentation - @ BITPro - Ajay
Azure AD Presentation - @ BITPro - AjayAzure AD Presentation - @ BITPro - Ajay
Azure AD Presentation - @ BITPro - AjayAnoop Nair
 
Abap web servicepublishing-191017-1015-11758
Abap web servicepublishing-191017-1015-11758Abap web servicepublishing-191017-1015-11758
Abap web servicepublishing-191017-1015-11758asangays
 

Mais procurados (8)

Антон Бойко (Microsoft Azure MVP, Ukrainian Azure Community Founder) «Azure M...
Антон Бойко (Microsoft Azure MVP, Ukrainian Azure Community Founder) «Azure M...Антон Бойко (Microsoft Azure MVP, Ukrainian Azure Community Founder) «Azure M...
Антон Бойко (Microsoft Azure MVP, Ukrainian Azure Community Founder) «Azure M...
 
Authentication and Authorization in Asp.Net
Authentication and Authorization in Asp.NetAuthentication and Authorization in Asp.Net
Authentication and Authorization in Asp.Net
 
Integrating Visual Studio Team Services with Active Directory Federation Ser...
Integrating Visual Studio Team Services with  Active Directory Federation Ser...Integrating Visual Studio Team Services with  Active Directory Federation Ser...
Integrating Visual Studio Team Services with Active Directory Federation Ser...
 
OAuth in the new .NET world (OWIN)
OAuth in the new .NET world (OWIN)OAuth in the new .NET world (OWIN)
OAuth in the new .NET world (OWIN)
 
Microsoft Azure Identity and O365
Microsoft Azure Identity and O365Microsoft Azure Identity and O365
Microsoft Azure Identity and O365
 
Web Service Connection - using Login Operation
Web Service Connection - using Login OperationWeb Service Connection - using Login Operation
Web Service Connection - using Login Operation
 
Azure AD Presentation - @ BITPro - Ajay
Azure AD Presentation - @ BITPro - AjayAzure AD Presentation - @ BITPro - Ajay
Azure AD Presentation - @ BITPro - Ajay
 
Abap web servicepublishing-191017-1015-11758
Abap web servicepublishing-191017-1015-11758Abap web servicepublishing-191017-1015-11758
Abap web servicepublishing-191017-1015-11758
 

Semelhante a Mobile services on windows azure (part3)

Mobile services on windows azure (part2)
Mobile services on windows azure (part2)Mobile services on windows azure (part2)
Mobile services on windows azure (part2)Radu Vunvulea
 
Codemotion Berlin-Mobile Services
Codemotion Berlin-Mobile ServicesCodemotion Berlin-Mobile Services
Codemotion Berlin-Mobile ServicesMike Benkovich
 
Terence Barr - beyond smartphones - 24mai2011
Terence Barr  - beyond smartphones - 24mai2011Terence Barr  - beyond smartphones - 24mai2011
Terence Barr - beyond smartphones - 24mai2011Agora Group
 
Windows Azure mobile services - Kolkata - 28 June 2015
Windows Azure mobile services - Kolkata - 28 June 2015Windows Azure mobile services - Kolkata - 28 June 2015
Windows Azure mobile services - Kolkata - 28 June 2015Kunal Chowdhury
 
2015.04.23 Azure Mobile Services
2015.04.23 Azure Mobile Services2015.04.23 Azure Mobile Services
2015.04.23 Azure Mobile ServicesMarco Parenzan
 
MongoDB.local Sydney: Evolving your Data Access with MongoDB Stitch
MongoDB.local Sydney: Evolving your Data Access with MongoDB StitchMongoDB.local Sydney: Evolving your Data Access with MongoDB Stitch
MongoDB.local Sydney: Evolving your Data Access with MongoDB StitchMongoDB
 
Implementing open authentication_in_your_app
Implementing open authentication_in_your_appImplementing open authentication_in_your_app
Implementing open authentication_in_your_appNuhil Mehdy
 
Stateless Auth using OAUTH2 & JWT
Stateless Auth using OAUTH2 & JWTStateless Auth using OAUTH2 & JWT
Stateless Auth using OAUTH2 & JWTMobiliya
 
Complex architectures for authentication and authorization on AWS
Complex architectures for authentication and authorization on AWSComplex architectures for authentication and authorization on AWS
Complex architectures for authentication and authorization on AWSBoyan Dimitrov
 
Building Your First App with MongoDB Stitch
Building Your First App with MongoDB StitchBuilding Your First App with MongoDB Stitch
Building Your First App with MongoDB StitchMongoDB
 
Windows Azure Mobile Services - The Perfect Partner
Windows Azure Mobile Services - The Perfect PartnerWindows Azure Mobile Services - The Perfect Partner
Windows Azure Mobile Services - The Perfect PartnerMichael Collier
 
Intro to OAuth2 and OpenID Connect
Intro to OAuth2 and OpenID ConnectIntro to OAuth2 and OpenID Connect
Intro to OAuth2 and OpenID ConnectLiamWadman
 
Simplify user application authentication using Microsoft Identity Platform
Simplify user application authentication using  Microsoft Identity PlatformSimplify user application authentication using  Microsoft Identity Platform
Simplify user application authentication using Microsoft Identity PlatformManoj Mittal
 
Stateless Auth using OAuth2 & JWT
Stateless Auth using OAuth2 & JWTStateless Auth using OAuth2 & JWT
Stateless Auth using OAuth2 & JWTGaurav Roy
 
Community call: Develop multi tenant apps with the Microsoft identity platform
Community call: Develop multi tenant apps with the Microsoft identity platformCommunity call: Develop multi tenant apps with the Microsoft identity platform
Community call: Develop multi tenant apps with the Microsoft identity platformMicrosoft 365 Developer
 
Mobile Authentication - Onboarding, best practices & anti-patterns
Mobile Authentication - Onboarding, best practices & anti-patternsMobile Authentication - Onboarding, best practices & anti-patterns
Mobile Authentication - Onboarding, best practices & anti-patternsPieter Ennes
 
Introduction to Azure AD and Azure AD B2C
Introduction to Azure AD and Azure AD B2CIntroduction to Azure AD and Azure AD B2C
Introduction to Azure AD and Azure AD B2CJoonas Westlin
 

Semelhante a Mobile services on windows azure (part3) (20)

Mobile services on windows azure (part2)
Mobile services on windows azure (part2)Mobile services on windows azure (part2)
Mobile services on windows azure (part2)
 
Codemotion Berlin-Mobile Services
Codemotion Berlin-Mobile ServicesCodemotion Berlin-Mobile Services
Codemotion Berlin-Mobile Services
 
Terence Barr - beyond smartphones - 24mai2011
Terence Barr  - beyond smartphones - 24mai2011Terence Barr  - beyond smartphones - 24mai2011
Terence Barr - beyond smartphones - 24mai2011
 
Windows Azure mobile services - Kolkata - 28 June 2015
Windows Azure mobile services - Kolkata - 28 June 2015Windows Azure mobile services - Kolkata - 28 June 2015
Windows Azure mobile services - Kolkata - 28 June 2015
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
2015.04.23 Azure Mobile Services
2015.04.23 Azure Mobile Services2015.04.23 Azure Mobile Services
2015.04.23 Azure Mobile Services
 
MongoDB.local Sydney: Evolving your Data Access with MongoDB Stitch
MongoDB.local Sydney: Evolving your Data Access with MongoDB StitchMongoDB.local Sydney: Evolving your Data Access with MongoDB Stitch
MongoDB.local Sydney: Evolving your Data Access with MongoDB Stitch
 
Implementing open authentication_in_your_app
Implementing open authentication_in_your_appImplementing open authentication_in_your_app
Implementing open authentication_in_your_app
 
Building mobile apps on aws
Building mobile apps on awsBuilding mobile apps on aws
Building mobile apps on aws
 
Building mobile apps on AWS
Building mobile apps on AWSBuilding mobile apps on AWS
Building mobile apps on AWS
 
Stateless Auth using OAUTH2 & JWT
Stateless Auth using OAUTH2 & JWTStateless Auth using OAUTH2 & JWT
Stateless Auth using OAUTH2 & JWT
 
Complex architectures for authentication and authorization on AWS
Complex architectures for authentication and authorization on AWSComplex architectures for authentication and authorization on AWS
Complex architectures for authentication and authorization on AWS
 
Building Your First App with MongoDB Stitch
Building Your First App with MongoDB StitchBuilding Your First App with MongoDB Stitch
Building Your First App with MongoDB Stitch
 
Windows Azure Mobile Services - The Perfect Partner
Windows Azure Mobile Services - The Perfect PartnerWindows Azure Mobile Services - The Perfect Partner
Windows Azure Mobile Services - The Perfect Partner
 
Intro to OAuth2 and OpenID Connect
Intro to OAuth2 and OpenID ConnectIntro to OAuth2 and OpenID Connect
Intro to OAuth2 and OpenID Connect
 
Simplify user application authentication using Microsoft Identity Platform
Simplify user application authentication using  Microsoft Identity PlatformSimplify user application authentication using  Microsoft Identity Platform
Simplify user application authentication using Microsoft Identity Platform
 
Stateless Auth using OAuth2 & JWT
Stateless Auth using OAuth2 & JWTStateless Auth using OAuth2 & JWT
Stateless Auth using OAuth2 & JWT
 
Community call: Develop multi tenant apps with the Microsoft identity platform
Community call: Develop multi tenant apps with the Microsoft identity platformCommunity call: Develop multi tenant apps with the Microsoft identity platform
Community call: Develop multi tenant apps with the Microsoft identity platform
 
Mobile Authentication - Onboarding, best practices & anti-patterns
Mobile Authentication - Onboarding, best practices & anti-patternsMobile Authentication - Onboarding, best practices & anti-patterns
Mobile Authentication - Onboarding, best practices & anti-patterns
 
Introduction to Azure AD and Azure AD B2C
Introduction to Azure AD and Azure AD B2CIntroduction to Azure AD and Azure AD B2C
Introduction to Azure AD and Azure AD B2C
 

Último

Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 

Último (20)

Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 

Mobile services on windows azure (part3)

  • 1. Mobile Services Authentication and Push Notifications Radu Vunvulea vunvulear@gmail.com http://vunvulearadu.blogspot.com
  • 2. Who am I? { “name” : “Radu Vunvulea, “company” : “iQuest”, “userType” : “enthusiastic” “technologies” : [ “.NET”, “JS”, “Azure”, “Web”, “Mobile”, “SL” ], “w8experience” : [ “2 LoB App”, “1 Travel App”], “blog” : “vunvulearadu.blogspot.com”, “email” : ”vunvulear@gmail.com”, “socialMedia” : { “twitter” : “@RaduVunvulea”, “fb” : “radu.vunvulea” } }
  • 3. Windows Azure Mobile Services • Authentication
  • 5. How to work with data • Define custom scripts that check if the given user id has rights to access his data App.MobileService.GetTable<MyEntity>() • Before this we need to create a table with the same name • Update: table.UpdateAsync(entity) • Delete: table.DeleteAsync(entity) • Insert: table.InsertAsync(entity) • Fetch with data: • Where • Take • Skip • OrderBy • Select • ThenBy • ToListAsync
  • 6. Register your application • Each application need to be register to the identify provider • Windows Live: • http://go.microsoft.com/fwlink/p/?LinkId=262039&clcid=0x409 • Facebook • http://go.microsoft.com/fwlink/p/?LinkId=268286&clcid=0x409 • Google • http://go.microsoft.com/fwlink/p/?LinkId=268303&clcid=0x409 • Twitter • http://go.microsoft.com/fwlink/p/?LinkId=268300&clcid=0x409 • Every identify provider require to specify the URL of our mobile service
  • 7. Configure mobile service identity • After configuring the identity provider the “Identity” data need to be configured on our Mobile Service page • We can have more than one identify provider active • All the provider give us similar output: • Key/Id • Secret token • After setting the key and secret token your service is ready to use authentication
  • 8. Adding authentication to data • Change table permissions of each CRUD operation that you need to be accessible by authenticate user only to “Only Authenticate Users” • After this step all the table content on the given CRUD operation will be accessible only to authenticated users • The error that is returned when a user will try to access a specific service and is not authenticated will be • 401 – Unauthorized
  • 9. Authentication on the client • There is a build in control that resolve the authentication problem • The only think that we need to do is to specify the identify provider App.MobileService.LoginAsync( MobileServiceAuthenticationProvider.Facebook) • After this step each time when user will access a table from mobile service the user.userId field will contain the user id • Remarks: All users that are login will be able to access any kind of data from our table. In this way we didn’t restrict access to specific rows from it.
  • 10. Restrict access to table rows • We don’t have an our of the box mechanism • On the INSERT action script we can add a column when we store the user id function insert(item, user, request) { item.userId = user.userId; request.execute(); } • On the action where we want to control access we need to check the userId function read(query, user, request) { query.where({ userId: user.userId }); request.execute(); }
  • 11. Push notifications • Register your application • Associate your application from VS with your app from Store • Save your Client Secret key and Package Security Identifier from My Apps tab • Add Client Secret key and Package Security Identified to your Mobile Service (under Push tab) • Use “PushNotificationChannelManager” to register to push notifications • Data can be pushed even from CRUD script of Mobile Services tables: push.wns.sendToastText04(item.channel, { title: item.text }
  • 12. Demo
  • 13.
  • 14. THE END Radu Vunvulea vunvulear@gmail.com http://vunvulearadu.blogspot.com

Notas do Editor

  1. COM
  2. COM
  3. COM
  4. COM
  5. COM
  6. COM
  7. COM
  8. COM
  9. COM
  10. COM