SlideShare a Scribd company logo
1 of 86
Knowledge Sharing Session on
Push Notification Service
Global Blue Team
February 2016
Push Notification
Push Notification
• Notifies a user by messages or events
• Originates from a server
• The end user must opt-in to receive alerts
Why Push Notifications?
• Timely and relevant
• Easy to access
• Go straight to the details
• Full control
Why Push Notifications?
• Timely and relevant
Why Push Notifications?
• Easy to access
Why Push Notifications?
• Go straight to the details
Why Push Notifications?
• Full Control
Why Push Notifications?
• Full Control
Safari Push Notification
Safari 7 along with OSX Mavericks
Safari Push Notification
Things we will learn-
• Background
• How it works
• Implementation
• Best practices
Safari Push Notification
Background
Safari Push Notification
• Local Web Notifications
Safari Push Notification
Local VS Push Notifications
Safari Push Notification
Local VS Push Notifications
Safari Push Notification
Apps VS Websites Push Notifications
Safari Push Notification
Apps VS Websites Push Notifications
Safari Push Notification
Safari Push Notification
Safari Push Notification
Safari Push Notification
Safari Push Notification
Safari Push Notification
Safari Push Notification
How it works
Safari Push Notification
Safari Push Notification works in two steps-
1. Subscribing
2. Delivering
Safari Push Notification
Subscribing
Safari Push Notification
Subscribing
Safari Push Notification
Subscribing
Safari Push Notification
Subscribing
Safari Push Notification
Subscribing
Safari Push Notification
Subscribing
Safari Push Notification
Subscribing
Safari Push Notification
Subscribing
Safari Push Notification
Subscribing
Safari Push Notification
Subscribing
Safari Push Notification
Delivering
Safari Push Notification
Delivering
Safari Push Notification
Delivering
Safari Push Notification
Delivering
Safari Push Notification
Delivering
Safari Push Notification
DEMO
Safari Push Notification
Implementation
Safari Push Notification
Implementation
1. Get Website Push Certificate
2. Implement Push Notification to your server
Safari Push Notification
Get Website Push Certificate
1. Required to register in the Certificates, Identifiers & Profiles section of
the Member Center
2. Registration requires an iOS developer license or Mac developer license.
Safari Push Notification
Safari Push Notification
When registering, include the following information:
 Identifier –
• Unique reverse-domain string, such as web.com.globalblue (the string must
start with web).
• This is also known as the Website Push ID.
 Website Push ID Description –
• This is the name used throughout the Provisioning Portal to refer to your
website.
• Use it for your own benefit to label your Website Push IDs into a more human-
readable format.
Safari Push Notification
• After providing the necessary informations the
becomes available to download.
• Push Certificate must be coverted to .p12 format.
Safari Push Notification
Implement Push Notification to
the server
Safari Push Notification
Implement Push Notification to the server
• Ask On Your Website
• Write Web Service Backend
• Send Push Notifications
Safari Push Notification
Ask on Your Website: Query Permission
var result = window.safari.pushNotification.permission(
websitePushID
);
Three types of permissions –
result.permissions
1. "default"
2. "denied"
3. "granted"
Safari Push Notification
Ask on Your Website: Query Permission
1. result.permissions == “default”
– The user hasn’t yet been asked his or her
permission.
2. result.permissions == “denied”
– The user denied permission for the website to send
push notifications.
3. result.permissions == “granted”
– The user has allowed permission for the website to
send push notifications.
Safari Push Notification
Ask on Your Website: Query Permission
When permission is granted
result.deviceToken = "96385da7....88aaebaf"
Safari Push Notification
Ask on Your Website: Request Permission
window.safari.pushNotification.requestPermission(
webServiceURL,
websitePushID,
userInfo,
callback
);
Safari Push Notification
Ask on Your Website: Request Permission
webServiceURL
– Base URL to your web service
– Must be https
websitePushID
– Unique identity of your website
userInfo
– How your website passes information to your web service
– Dictionary of strings
Safari Push Notification
Ask on Your Website: Request Permission
Callback
– When user confirms
callback({
permission: "granted",
deviceToken: "96385da7....88aaebaf"
});
– When user denies
callback({
permission: "denied"
});
Safari Push Notification
Write Web Service Back End
Safari Push Notification
Write Web Service Back End: Return push package
• POST /v1/pushPackages/<websitePushID>
• HTTP body is userInfo serialized as query string
window.safari.pushNotification.requestPermission(
webServiceURL,
websitePushID,
userInfo,
callback
);
Safari Push Notification
Write Web Service Back End: Return push
package
• POST /v1/pushPackages/<websitePushID>
• HTTP body is userInfo serialized as query string
{
“email": “me@cefalo.com",
“empId": “123456"
}
Safari Push Notification
Write Web Service Back End: Return push
package
• POST /v1/pushPackages/<websitePushID>
• HTTP body is userInfo serialized as query string
{
“email": “me@cefalo.com",
“empId": “123456"
}
• Serialized Info:
email=me@cefalo.com&empId=123456
Safari Push Notification
Write Web Service Back End
Push Package DIR Structure:
GlobalBlue.pushpackage/
icon.iconset/
icon_16x16.png
icon_16x16@2x.png
icon_32x32.png
icon_32x32@2x.png
icon_128x128.png
icon_128x128@2x.png
website.json
manifest.json
signature
Safari Push Notification
Write Web Service Back End
Push Package DIR Structure:
GlobalBlue.pushpackage/
icon.iconset/
icon_16x16.png
icon_16x16@2x.png
icon_32x32.png
icon_32x32@2x.png
icon_128x128.png
icon_128x128@2x.png
website.json
manifest.json
signature
Icons –
• Used in notifications
• Notification Center
• Safari Browser
• System Preferences
Safari Push Notification
• Defines website
• Checked during validation
• Used in notifications and
• Notification Centre
Write Web Service Back End
Push Package DIR Structure:
GlobalBlue.pushpackage/
icon.iconset/
icon_16x16.png
icon_16x16@2x.png
icon_32x32.png
icon_32x32@2x.png
icon_128x128.png
icon_128x128@2x.png
website.json
manifest.json
signature
Safari Push Notification
{
"webServiceURL": "https://globalblue.com/ws",
"websitePushID": "web.com.globalblue",
"websiteName": "Global Blue",
"allowedDomains": ["http://globalblue.com"],
"authenticationToken": "1e3f7d98ac417df",
"urlFormatString":
"http://globalblue.com/%@?articleId=%@"
}
Write Web Service Back End
Push Package DIR Structure:
GlobalBlue.pushpackage/
icon.iconset/
icon_16x16.png
icon_16x16@2x.png
icon_32x32.png
icon_32x32@2x.png
icon_128x128.png
icon_128x128@2x.png
website.json
manifest.json
signature
Safari Push Notification
JSON dictionary of SHA1 checksums
Write Web Service Back End
Push Package DIR Structure:
GlobalBlue.pushpackage/
icon.iconset/
icon_16x16.png
icon_16x16@2x.png
icon_32x32.png
icon_32x32@2x.png
icon_128x128.png
icon_128x128@2x.png
website.json
manifest.json
signature
Safari Push Notification
{
"icon.iconset/icon_16x16.png": "865f...17e1",
"icon.iconset/icon_16x16@2x.png": "1a47...35ca",
"icon.iconset/icon_32x32.png": "aa75...fbb6",
"icon.iconset/icon_32x32@2x.png": "88e8...351d",
"icon.iconset/icon_128x128.png": "0509...6228",
"icon.iconset/icon_128x128@2x.png": "e956...6611",
"website.json": "9683...b3a8"
}
Write Web Service Back End
Push Package DIR Structure:
GlobalBlue.pushpackage/
icon.iconset/
icon_16x16.png
icon_16x16@2x.png
icon_32x32.png
icon_32x32@2x.png
icon_128x128.png
icon_128x128@2x.png
website.json
manifest.json
signature
Safari Push Notification
Write Web Service Back End
Push Package DIR Structure:
GlobalBlue.pushpackage/
icon.iconset/
icon_16x16.png
icon_16x16@2x.png
icon_32x32.png
icon_32x32@2x.png
icon_128x128.png
icon_128x128@2x.png
website.json
manifest.json
signature Signature of manifest.json
Safari Push Notification
Write Web Service Back End
Logging errors
• POST /v1/log
• HTTP Body
{"logs": ["Referrer URL http://globalblue.com/ is not in the list of allowed
domains."]}
Safari Push Notification
Push Notification Dialog
Push Package
Icons
websiteName
Safari Push Notification
Write Web Service Back End
Register user’s device token
• POST
/v1/devices/<deviceToken>/registrations/<websitePushID>
• HTTP Authorize header field
ApplePushNotifications <authenticationToken>
Safari Push Notification
Write Web Service Back End
Unregister user’s device token
• DELETE
/v1/devices/<deviceToken>/registrations/<websitePushID>
• HTTP Authorize header field
ApplePushNotifications <authenticationToken>
Safari Push Notification
Send Push Notifications
Safari Push Notification
Send Push Notifications
Safari Push Notification
Provider-to-APNs Connection Trust
Safari Push Notification
APNs-to-Device Connection Trust
Safari Push Notification
Device Token Generation
Safari Push Notification
Send Push Notifications
Push Payload
{
"aps": {
"alert": {
"title": “Nike Milan",
"body": “50% off for all Nike products.",
"action": "View"
},
"url-args": [“milan", “532401"]
}
}
Safari Push Notification
Send Push Notifications
Push Payload
{
"aps": {
"alert": {
"title": “Nike Milan",
"body": “50% off for all Nike products.",
"action": "View"
},
"url-args": [“milan", “532401"]
}
}
Safari Push Notification
Send Push Notifications
Push Payload
{
"aps": {
"alert": {
"title": “Nike Milan",
"body": “50% off for all Nike products.",
"action": "View"
},
"url-args": [“milan", “532401"]
}
}
Safari Push Notification
Send Push Notifications
Push Payload
{
"aps": {
"alert": {
"title": “Nike Milan",
"body": “50% off for all Nike products.",
"action": "View"
},
"url-args": [“milan", “532401"]
}
}
• Maximum size for message payload is 256 bytes.
• Always connect to Production Environment
Safari Push Notification
Push Notifications and Notification Center
Push Package
Icons
websiteName
urlFormatString
Notification
Payload
title
action
body
url-args
Safari Push Notification
Push Notifications and Notification Center
Push Package
Icons
websiteName
urlFormatString
Notification
Payload
title
action
body
url-args
Safari Push Notification
Push Notifications and Notification Center
http://globalblue.com/%@?articleId=%@ [“milan", " 532401 "]
Push Package
Icons
websiteName
urlFormatString
Notification
Payload
title
action
body
url-args
Safari Push Notification
Push Notifications and Notification Center
http://globalblue.com/milan?articleId=532401
Push Package
Icons
websiteName
urlFormatString
Notification
Payload
title
action
body
url-args
Safari Push Notification
Best Practice
• Think about what notifications are most useful
• Use notifications as an additional, not primary means of communication
• Take advantage of the URL format string
• Strip whitespace from your JSON payload
• You can use URL shortener to keep the payload size in limit.
Push Package urlFormatString: http://%@
Website.json
Payload
url-args: ["globalblue.com/brands/specials/boggi/boggi-milan/"]
Safari Push Notification
Questions?
Safari Push Notification
Thank You

More Related Content

What's hot

AWS Black Belt Techシリーズ AWS Storage Gateway
AWS Black Belt Techシリーズ  AWS Storage GatewayAWS Black Belt Techシリーズ  AWS Storage Gateway
AWS Black Belt Techシリーズ AWS Storage GatewayAmazon Web Services Japan
 
CodeBuildを身近にするためのはじめの一歩
CodeBuildを身近にするためのはじめの一歩CodeBuildを身近にするためのはじめの一歩
CodeBuildを身近にするためのはじめの一歩淳 千葉
 
AWS Black Belt Online Seminar 2016 AWS上でのActive Directory構築
AWS Black Belt Online Seminar 2016 AWS上でのActive Directory構築AWS Black Belt Online Seminar 2016 AWS上でのActive Directory構築
AWS Black Belt Online Seminar 2016 AWS上でのActive Directory構築Amazon Web Services Japan
 
Java EEを補完する仕様 MicroProfile
Java EEを補完する仕様 MicroProfileJava EEを補完する仕様 MicroProfile
Java EEを補完する仕様 MicroProfileNorito Agetsuma
 
[Aurora事例祭り]Amazon Aurora を使いこなすためのベストプラクティス
[Aurora事例祭り]Amazon Aurora を使いこなすためのベストプラクティス[Aurora事例祭り]Amazon Aurora を使いこなすためのベストプラクティス
[Aurora事例祭り]Amazon Aurora を使いこなすためのベストプラクティスAmazon Web Services Japan
 
怖くないSpring Bootのオートコンフィグレーション
怖くないSpring Bootのオートコンフィグレーション怖くないSpring Bootのオートコンフィグレーション
怖くないSpring Bootのオートコンフィグレーション土岐 孝平
 
OpenAPI 3.0でmicroserviceのAPI定義を試みてハマった話
OpenAPI 3.0でmicroserviceのAPI定義を試みてハマった話OpenAPI 3.0でmicroserviceのAPI定義を試みてハマった話
OpenAPI 3.0でmicroserviceのAPI定義を試みてハマった話Daichi Koike
 
PowerShellを使用したWindows Serverの管理
PowerShellを使用したWindows Serverの管理PowerShellを使用したWindows Serverの管理
PowerShellを使用したWindows Serverの管理junichi anno
 
AWS Black Belt Online Seminar 2018 AWS Well-Architected Framework
AWS Black Belt Online Seminar 2018 AWS Well-Architected FrameworkAWS Black Belt Online Seminar 2018 AWS Well-Architected Framework
AWS Black Belt Online Seminar 2018 AWS Well-Architected FrameworkAmazon Web Services Japan
 
ログ管理のベストプラクティス
ログ管理のベストプラクティスログ管理のベストプラクティス
ログ管理のベストプラクティスAkihiro Kuwano
 
Route53 で親子同居
Route53 で親子同居Route53 で親子同居
Route53 で親子同居@ otsuka752
 
Amazon Aurora - Auroraの止まらない進化とその中身
Amazon Aurora - Auroraの止まらない進化とその中身Amazon Aurora - Auroraの止まらない進化とその中身
Amazon Aurora - Auroraの止まらない進化とその中身Amazon Web Services Japan
 
Snipe itで始めるit資産管理
Snipe itで始めるit資産管理Snipe itで始めるit資産管理
Snipe itで始めるit資産管理Nozue Tomohiko
 
AWSメンテナンス ElastiCache編
AWSメンテナンス ElastiCache編AWSメンテナンス ElastiCache編
AWSメンテナンス ElastiCache編Serverworks Co.,Ltd.
 
20191023 AWS Black Belt Online Seminar Amazon EMR
20191023 AWS Black Belt Online Seminar Amazon EMR20191023 AWS Black Belt Online Seminar Amazon EMR
20191023 AWS Black Belt Online Seminar Amazon EMRAmazon Web Services Japan
 
Amazon S3による静的Webサイトホスティング
Amazon S3による静的WebサイトホスティングAmazon S3による静的Webサイトホスティング
Amazon S3による静的WebサイトホスティングYasuhiro Horiuchi
 
쿠알못이 Amazon EKS로 안정적인 서비스 운영하기 - 최용호(넥슨코리아) :: AWS Community Day 2020
쿠알못이 Amazon EKS로 안정적인 서비스 운영하기 - 최용호(넥슨코리아) :: AWS Community Day 2020쿠알못이 Amazon EKS로 안정적인 서비스 운영하기 - 최용호(넥슨코리아) :: AWS Community Day 2020
쿠알못이 Amazon EKS로 안정적인 서비스 운영하기 - 최용호(넥슨코리아) :: AWS Community Day 2020AWSKRUG - AWS한국사용자모임
 
PHPのセッション管理にDynamoDBを使う
PHPのセッション管理にDynamoDBを使うPHPのセッション管理にDynamoDBを使う
PHPのセッション管理にDynamoDBを使うTaiji INOUE
 

What's hot (20)

AWS Black Belt Techシリーズ AWS Storage Gateway
AWS Black Belt Techシリーズ  AWS Storage GatewayAWS Black Belt Techシリーズ  AWS Storage Gateway
AWS Black Belt Techシリーズ AWS Storage Gateway
 
CodeBuildを身近にするためのはじめの一歩
CodeBuildを身近にするためのはじめの一歩CodeBuildを身近にするためのはじめの一歩
CodeBuildを身近にするためのはじめの一歩
 
AWS Black Belt Online Seminar 2016 AWS上でのActive Directory構築
AWS Black Belt Online Seminar 2016 AWS上でのActive Directory構築AWS Black Belt Online Seminar 2016 AWS上でのActive Directory構築
AWS Black Belt Online Seminar 2016 AWS上でのActive Directory構築
 
Java EEを補完する仕様 MicroProfile
Java EEを補完する仕様 MicroProfileJava EEを補完する仕様 MicroProfile
Java EEを補完する仕様 MicroProfile
 
[Aurora事例祭り]Amazon Aurora を使いこなすためのベストプラクティス
[Aurora事例祭り]Amazon Aurora を使いこなすためのベストプラクティス[Aurora事例祭り]Amazon Aurora を使いこなすためのベストプラクティス
[Aurora事例祭り]Amazon Aurora を使いこなすためのベストプラクティス
 
Vue.js で XSS
Vue.js で XSSVue.js で XSS
Vue.js で XSS
 
怖くないSpring Bootのオートコンフィグレーション
怖くないSpring Bootのオートコンフィグレーション怖くないSpring Bootのオートコンフィグレーション
怖くないSpring Bootのオートコンフィグレーション
 
OpenAPI 3.0でmicroserviceのAPI定義を試みてハマった話
OpenAPI 3.0でmicroserviceのAPI定義を試みてハマった話OpenAPI 3.0でmicroserviceのAPI定義を試みてハマった話
OpenAPI 3.0でmicroserviceのAPI定義を試みてハマった話
 
Amazon ElastiCacheのはじめ方
Amazon ElastiCacheのはじめ方Amazon ElastiCacheのはじめ方
Amazon ElastiCacheのはじめ方
 
PowerShellを使用したWindows Serverの管理
PowerShellを使用したWindows Serverの管理PowerShellを使用したWindows Serverの管理
PowerShellを使用したWindows Serverの管理
 
AWS Black Belt Online Seminar 2018 AWS Well-Architected Framework
AWS Black Belt Online Seminar 2018 AWS Well-Architected FrameworkAWS Black Belt Online Seminar 2018 AWS Well-Architected Framework
AWS Black Belt Online Seminar 2018 AWS Well-Architected Framework
 
ログ管理のベストプラクティス
ログ管理のベストプラクティスログ管理のベストプラクティス
ログ管理のベストプラクティス
 
Route53 で親子同居
Route53 で親子同居Route53 で親子同居
Route53 で親子同居
 
Amazon Aurora - Auroraの止まらない進化とその中身
Amazon Aurora - Auroraの止まらない進化とその中身Amazon Aurora - Auroraの止まらない進化とその中身
Amazon Aurora - Auroraの止まらない進化とその中身
 
Snipe itで始めるit資産管理
Snipe itで始めるit資産管理Snipe itで始めるit資産管理
Snipe itで始めるit資産管理
 
AWSメンテナンス ElastiCache編
AWSメンテナンス ElastiCache編AWSメンテナンス ElastiCache編
AWSメンテナンス ElastiCache編
 
20191023 AWS Black Belt Online Seminar Amazon EMR
20191023 AWS Black Belt Online Seminar Amazon EMR20191023 AWS Black Belt Online Seminar Amazon EMR
20191023 AWS Black Belt Online Seminar Amazon EMR
 
Amazon S3による静的Webサイトホスティング
Amazon S3による静的WebサイトホスティングAmazon S3による静的Webサイトホスティング
Amazon S3による静的Webサイトホスティング
 
쿠알못이 Amazon EKS로 안정적인 서비스 운영하기 - 최용호(넥슨코리아) :: AWS Community Day 2020
쿠알못이 Amazon EKS로 안정적인 서비스 운영하기 - 최용호(넥슨코리아) :: AWS Community Day 2020쿠알못이 Amazon EKS로 안정적인 서비스 운영하기 - 최용호(넥슨코리아) :: AWS Community Day 2020
쿠알못이 Amazon EKS로 안정적인 서비스 운영하기 - 최용호(넥슨코리아) :: AWS Community Day 2020
 
PHPのセッション管理にDynamoDBを使う
PHPのセッション管理にDynamoDBを使うPHPのセッション管理にDynamoDBを使う
PHPのセッション管理にDynamoDBを使う
 

Similar to Safari Push Notification

SenchaCon 2016: A Look Ahead: Survey Next-Gen Modern Browser APIs - Shikhir S...
SenchaCon 2016: A Look Ahead: Survey Next-Gen Modern Browser APIs - Shikhir S...SenchaCon 2016: A Look Ahead: Survey Next-Gen Modern Browser APIs - Shikhir S...
SenchaCon 2016: A Look Ahead: Survey Next-Gen Modern Browser APIs - Shikhir S...Sencha
 
Progressive Web Apps by Millicent Convento
Progressive Web Apps by Millicent ConventoProgressive Web Apps by Millicent Convento
Progressive Web Apps by Millicent ConventoDEVCON
 
Building a WiFi Hotspot with NodeJS: Cisco Meraki - ExCap API
Building a WiFi Hotspot with NodeJS: Cisco Meraki - ExCap APIBuilding a WiFi Hotspot with NodeJS: Cisco Meraki - ExCap API
Building a WiFi Hotspot with NodeJS: Cisco Meraki - ExCap APICisco DevNet
 
Security Presentation for Boulder WordPress Meetup
Security Presentation for Boulder WordPress MeetupSecurity Presentation for Boulder WordPress Meetup
Security Presentation for Boulder WordPress MeetupAngela Bowman
 
Sencha Roadshow 2017: Build Progressive Web Apps with Ext JS and Cmd
Sencha Roadshow 2017: Build Progressive Web Apps with Ext JS and Cmd Sencha Roadshow 2017: Build Progressive Web Apps with Ext JS and Cmd
Sencha Roadshow 2017: Build Progressive Web Apps with Ext JS and Cmd Sencha
 
Web APIs & Apps - Mozilla
Web APIs & Apps - MozillaWeb APIs & Apps - Mozilla
Web APIs & Apps - MozillaRobert Nyman
 
Workshop KrakYourNet2016 - Web applications hacking Ruby on Rails example
Workshop KrakYourNet2016 - Web applications hacking Ruby on Rails example Workshop KrakYourNet2016 - Web applications hacking Ruby on Rails example
Workshop KrakYourNet2016 - Web applications hacking Ruby on Rails example Anna Klepacka
 
Making WordPress Your CMS and Automatically Updating a Self Hosted WordPress ...
Making WordPress Your CMS and Automatically Updating a Self Hosted WordPress ...Making WordPress Your CMS and Automatically Updating a Self Hosted WordPress ...
Making WordPress Your CMS and Automatically Updating a Self Hosted WordPress ...cehwitham
 
The top 10 security issues in web applications
The top 10 security issues in web applicationsThe top 10 security issues in web applications
The top 10 security issues in web applicationsDevnology
 
RoR Workshop - Web applications hacking - Ruby on Rails example
RoR Workshop - Web applications hacking - Ruby on Rails exampleRoR Workshop - Web applications hacking - Ruby on Rails example
RoR Workshop - Web applications hacking - Ruby on Rails exampleRailwaymen
 
How to run a Bitcoin or altcoin cryptocurrency faucet on WordPress
How to run a Bitcoin or altcoin cryptocurrency faucet on WordPressHow to run a Bitcoin or altcoin cryptocurrency faucet on WordPress
How to run a Bitcoin or altcoin cryptocurrency faucet on WordPressdashed-slug.net
 
WebAPIs & Apps - Mozilla London
WebAPIs & Apps - Mozilla LondonWebAPIs & Apps - Mozilla London
WebAPIs & Apps - Mozilla LondonRobert Nyman
 
Araport Workshop Tutorial 2: Authentication and the Agave Profiles Service
Araport Workshop Tutorial 2: Authentication and the Agave Profiles ServiceAraport Workshop Tutorial 2: Authentication and the Agave Profiles Service
Araport Workshop Tutorial 2: Authentication and the Agave Profiles Servicestevemock
 
Hackazon realistic e-commerce Hack platform
Hackazon realistic e-commerce Hack platformHackazon realistic e-commerce Hack platform
Hackazon realistic e-commerce Hack platformIhor Uzhvenko
 
DVWA BruCON Workshop
DVWA BruCON WorkshopDVWA BruCON Workshop
DVWA BruCON Workshoptestuser1223
 
The Future of the Web - Cold Front conference 2016
The Future of the Web - Cold Front conference 2016The Future of the Web - Cold Front conference 2016
The Future of the Web - Cold Front conference 2016Robert Nyman
 
Analytics, Authentication and Data with AWS Amplify - MBL403 - re:Invent 2017
Analytics, Authentication and Data with  AWS Amplify - MBL403 - re:Invent 2017Analytics, Authentication and Data with  AWS Amplify - MBL403 - re:Invent 2017
Analytics, Authentication and Data with AWS Amplify - MBL403 - re:Invent 2017Amazon Web Services
 

Similar to Safari Push Notification (20)

SenchaCon 2016: A Look Ahead: Survey Next-Gen Modern Browser APIs - Shikhir S...
SenchaCon 2016: A Look Ahead: Survey Next-Gen Modern Browser APIs - Shikhir S...SenchaCon 2016: A Look Ahead: Survey Next-Gen Modern Browser APIs - Shikhir S...
SenchaCon 2016: A Look Ahead: Survey Next-Gen Modern Browser APIs - Shikhir S...
 
Progressive Web Apps by Millicent Convento
Progressive Web Apps by Millicent ConventoProgressive Web Apps by Millicent Convento
Progressive Web Apps by Millicent Convento
 
Building a WiFi Hotspot with NodeJS: Cisco Meraki - ExCap API
Building a WiFi Hotspot with NodeJS: Cisco Meraki - ExCap APIBuilding a WiFi Hotspot with NodeJS: Cisco Meraki - ExCap API
Building a WiFi Hotspot with NodeJS: Cisco Meraki - ExCap API
 
Security Presentation for Boulder WordPress Meetup
Security Presentation for Boulder WordPress MeetupSecurity Presentation for Boulder WordPress Meetup
Security Presentation for Boulder WordPress Meetup
 
Sencha Roadshow 2017: Build Progressive Web Apps with Ext JS and Cmd
Sencha Roadshow 2017: Build Progressive Web Apps with Ext JS and Cmd Sencha Roadshow 2017: Build Progressive Web Apps with Ext JS and Cmd
Sencha Roadshow 2017: Build Progressive Web Apps with Ext JS and Cmd
 
Web APIs & Apps - Mozilla
Web APIs & Apps - MozillaWeb APIs & Apps - Mozilla
Web APIs & Apps - Mozilla
 
Workshop KrakYourNet2016 - Web applications hacking Ruby on Rails example
Workshop KrakYourNet2016 - Web applications hacking Ruby on Rails example Workshop KrakYourNet2016 - Web applications hacking Ruby on Rails example
Workshop KrakYourNet2016 - Web applications hacking Ruby on Rails example
 
Making WordPress Your CMS and Automatically Updating a Self Hosted WordPress ...
Making WordPress Your CMS and Automatically Updating a Self Hosted WordPress ...Making WordPress Your CMS and Automatically Updating a Self Hosted WordPress ...
Making WordPress Your CMS and Automatically Updating a Self Hosted WordPress ...
 
The top 10 security issues in web applications
The top 10 security issues in web applicationsThe top 10 security issues in web applications
The top 10 security issues in web applications
 
2023-May.pptx
2023-May.pptx2023-May.pptx
2023-May.pptx
 
RoR Workshop - Web applications hacking - Ruby on Rails example
RoR Workshop - Web applications hacking - Ruby on Rails exampleRoR Workshop - Web applications hacking - Ruby on Rails example
RoR Workshop - Web applications hacking - Ruby on Rails example
 
How to run a Bitcoin or altcoin cryptocurrency faucet on WordPress
How to run a Bitcoin or altcoin cryptocurrency faucet on WordPressHow to run a Bitcoin or altcoin cryptocurrency faucet on WordPress
How to run a Bitcoin or altcoin cryptocurrency faucet on WordPress
 
WebAPIs & Apps - Mozilla London
WebAPIs & Apps - Mozilla LondonWebAPIs & Apps - Mozilla London
WebAPIs & Apps - Mozilla London
 
Araport Workshop Tutorial 2: Authentication and the Agave Profiles Service
Araport Workshop Tutorial 2: Authentication and the Agave Profiles ServiceAraport Workshop Tutorial 2: Authentication and the Agave Profiles Service
Araport Workshop Tutorial 2: Authentication and the Agave Profiles Service
 
Hackazon realistic e-commerce Hack platform
Hackazon realistic e-commerce Hack platformHackazon realistic e-commerce Hack platform
Hackazon realistic e-commerce Hack platform
 
DVWA BruCON Workshop
DVWA BruCON WorkshopDVWA BruCON Workshop
DVWA BruCON Workshop
 
Shopify
ShopifyShopify
Shopify
 
The Future of the Web - Cold Front conference 2016
The Future of the Web - Cold Front conference 2016The Future of the Web - Cold Front conference 2016
The Future of the Web - Cold Front conference 2016
 
Analytics, Authentication and Data with AWS Amplify - MBL403 - re:Invent 2017
Analytics, Authentication and Data with  AWS Amplify - MBL403 - re:Invent 2017Analytics, Authentication and Data with  AWS Amplify - MBL403 - re:Invent 2017
Analytics, Authentication and Data with AWS Amplify - MBL403 - re:Invent 2017
 
Monkey man
Monkey manMonkey man
Monkey man
 

Recently uploaded

Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
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
 
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
 
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
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
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
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
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
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
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
 
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
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 

Recently uploaded (20)

Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
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
 
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...
 
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
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
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
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
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
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
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
 
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
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 

Safari Push Notification

Editor's Notes

  1. From Certificates, Identifiers & Profiles section Website Push Certificate can be obtained First Register the Website Push ID Create certificate by following the instructions in the developers portal iOS developer license or Mac developer license : Used by the developers to develop, sign, and distribute your apps.
  2. Description: Within the developer portal this can be visible User, Safari or the server wont be able to see it Web Push ID will be used in the code to identify the website
  3. .p12: Personal Infomation Exchange bundle a private key with its X.509 certificate or to bundle all the members of a chain of trust. Contains the private key to sign the Push Package and Certificate to connect to the APNs
  4. 1. userInfo could peice of information to keep track of the user
  5. 1. Every arrow initiating from the Safari means safari is requesting to the webservice endpoints
  6. webServiceURL: the web service, which must start with https. The web server does not need to be the same domain as the website requesting permission. websitePushID: The Website Push ID, which must start with web.. userInfo: An object to pass to the server. Include any data in this object that helps you identify the user requesting permission. Callback: A callback function, which is invoked upon completion. 
  7. A zipped archieve Has a defined directory structure
  8. displayed to the user in the permission prompt 2. Notification Center and 3. the notification itself 4. All six images must be in the iconset for it to be considered valid.
  9. webServiceURL: The location used to make requests to your web service websitePushID: he Website Push ID, as specified in your registration with the Member Center. websiteName: This is the heading used in Notification Center allowedDomains: An array of websites that are allowed to request permission from the user urlFormatString: Use %@ as a placeholder for arguments authenticationToken: A string that helps you identify the user. Must be 16 char length or greater
  10. contains an entry for each file where the local file path is the entry’s key and the file’s SHA1 checksum is the entry’s value Every file in the package must appear in the manifest, except for the manifest itself and the signature The manifest must strictly conform to RFC 4627.
  11. A PKCS #7 detached signature of the manifest file Sign the manifest file with the private key associated with your web push certificate If the contents of your push package ever change, you’ll need to recompute your signature. The iconsets and the website.json describe the website Both manifest.json and signature validates the websites identity
  12. Push Notification Confirmation Dialog
  13. Notification Packet = Payload + DeviceToken
  14. Each provider must have a unique provider certificate and private cryptographic key Used to validate the provider’s connection with APNs Provider establishes connection trust with APNs through TLS peer-to-peer authentication You initiate a TLS connection, get the server certificate from APNs Validate the APNs certificate from the provider end Then Provider send your provider certificate to APNs, which validates that certificate on its end Once this procedure is complete, a secure TLS connection is established APNs is now satisfied that the connection has been made by a legitimate provider.
  15. Each device has a device certificate and private cryptographic key Used to validate the device’s connection with APNs The device obtains its certificate and key at device activation time and stores them in the keychain. TLS peer-to-peer authentication the device initiates a TLS connection with APNs, which returns its server certificate The device validates this certificate and then sends its device certificate to APNs, which validates that certificate.
  16. A website must register with the system to receive remote notifications Upon receiving push package and validating it the device forward the request APNs APNs generates token using the device certificate After creation the token is encrypted using a token key The the device token is retuned to the device The device token is then provided to the Push Server/Provider for registration Without device token no one can send push notification
  17. Title: Required. The title of the notification Body: Required. The body of the notification. Action: Optional. The label of the action button, if the user sets the notifications to appear as alerts. This label should be succinct, such as “Details” or “Read more”. If omitted, the default value is “Show”.
  18. The url-args key specifies an array of values that are paired with the placeholders inside the urlFormatString The url-args key must be included.