Научная статья на тему 'The new Google sign-in for your application'

The new Google sign-in for your application Текст научной статьи по специальности «Компьютерные и информационные науки»

CC BY
108
20
i Надоели баннеры? Вы всегда можете отключить рекламу.
Ключевые слова
СЛУЖБА / SERVICE / УСТРОЙСТВО / DEVICE / ВОПРОС / QUESTION / ПРИЛОЖЕНИЕ / APP / КЛИЕНТ / CLIENT / ДАННЫЕ / DATA

Аннотация научной статьи по компьютерным и информационным наукам, автор научной работы — Quynh Ho Van, Thao Le Duc, Hieu Le Van, Khoe Nguyen Huu, Thuong Tran Thi Mai

Google Sign-In is a technology that allows you to attract users to your application quickly and safely with minimal time spent. With this API, your user entered through your account on a single device to log in to all devices at once. So you can integrate Google services in your websites and applications, and include over-the-air installation of Android applications when users come to your site. In this article you will learn how to create the possibility for the user to enter in your Android application using Google Sign-In.

i Надоели баннеры? Вы всегда можете отключить рекламу.
iНе можете найти то, что вам нужно? Попробуйте сервис подбора литературы.
i Надоели баннеры? Вы всегда можете отключить рекламу.

Текст научной работы на тему «The new Google sign-in for your application»

3. Чернавский С. А. Проектирование механических передач. М.: Машиностроение, 1988.

4. АнурьевВ. И. Справочник конструктора-машиностроителя. М.: Машиностроение, 1982.

THE NEW GOOGLE SIGN-IN FOR YOUR APPLICATION Quynh H. H. V.1, Thao L. D.2, Hieu L. V.3, Khoe N. H.4, Thuong T. T. M.5, Uyen V. T. P.6 Email: Quynh1132@scientifictext.ru

'Quynh Ho Van - Master's Degree student, DEPARTMENT OF COMPUTER SCIENCE AND CONTROL SYSTEMS, FACULTY OF CONTROL SYSTEMS AND ROBOTICS; 2Thao Le Duc — Student,

DEPARTMENT OF GEOINFORMATIONSYSTEMS, FACULTY OFINFOCOMMUNICATION TECHNOLOGIES;

3Hieu Le Van — Student; 4Khoe Nguyen Huu — Student, DEPARTMENT OF SECURE INFORMATION TECHNOLOGIES, FACULTY OF INFORMATION SECURITY AND COMPUTER TECHNOLOGIES; 5Thuong Tran Thi Mai — Student, DEPARTMENT OF COMPUTER SYSTEM DESIGN AND SECURITY, FACULTY OF INFORMATION SECURITY AND COMPUTER TECHNOLOGIES; 6Uyen Vu Thi Phuong — Student, DEPARTMENT OF IT IN THE FUEL AND ENERGY INDUSTRY, FACULTY OF LASER AND LIGHT ENGINEERING ST. PETERSBURG NATIONAL RESEARCH UNIVERSITY OF INFORMATION TECHNOLOGIES,

MECHANICS AND OPTICS, SAINT PETERSBURG

Abstract: Google Sign-In is a technology that allows you to attract users to your application quickly and safely with minimal time spent. With this API, your user entered through your account on a single device to log in to all devices at once. So you can integrate Google services in your websites and applications, and include over-the-air installation of Android applications when users come to your site. In this article you will learn how to create the possibility for the user to enter in your Android application using Google Sign-In. Keywords: service, device, question, app, client, data.

НОВЫЙ GOOGLE SIGN-IN ДЛЯ ВАШЕГО ПРИЛОЖЕНИЯ Куинь Х. В.1, Тхао Л. Д.2, Хиеу Л. В.3, Кхое Н. Х.4, Тхыонг Ч. Т. М.5,

Уиен В. Т. Ф.6

'Куинь Хо Ван — магистрант, кафедра систем управления и информатики, факультет систем управления и робототехники;

2Тхао Ле Дык — студент, кафедра геоинформационных систем, факультет инфокоммуникационных технологий;

3Хиеу Ле Ван — студент; 4Кхое Нгуен Хыу — студент, кафедра безопасных информационных технологий, факультет информационной безопасности и компьютерных технологий; 5Тхыонг Чан Тхи Май — студент, кафедра проектирования и безопасности компьютерных систем, факультет информационной безопасности и компьютерных технологий; 6Уиен Ву Тхи Фыонг — студент, кафедра информационных технологий топливно-энергетического комплекса, факультет лазерной и световой инженерии, Санкт-Петербургский национальный исследовательский университет информационных технологий,

механики и оптики, г. Санкт-Петербург

Аннотация: Google Sign-In - это технология, которая позволяет вам привлекать пользователей в ваше приложение быстро и безопасно с минимальными временными затратами. С помощью этого API ваш пользователь, войдя через свой аккаунт на одном устройстве, может авторизоваться на всех устройствах сразу. Так же вы сможете интегрировать сервисы Google в ваши сайты и приложения и включить over-the-air установку Android приложений, когда пользователи входят на ваш сайт. В этой статье вы узнаете, как создать возможность для пользователя входить в ваше Android приложение с помощью Google Sign-In.

Ключевые слова: служба, устройство, вопрос, приложение, клиент, данные.

YffK 004.4.2

If you've been playing around with Google's new sign-in library, you might have a few follow-up questions, like can you use this to identify the user to your server? How do you use it to authorize services like Google Drive? And what's up with this disconnect call anyway? Well, let's see if we can answer some of these questions for you in this article. And let's get into a little Google sign-in Q&A, shall we? All right, we'll start with a simple one. Question number one, how can I tell if my user has actually signed in? Well, this one's pretty straightforward. Just check and see if the GIDsignin.shared instance.currentuserobject exists. If it does, then your user has signed in, and if it doesn't, then, no, they haven't. That was kind of a warm-up question. Let's move on to something a little more complicated. Question number two, can I use the new Google sign-in library for things like authorizing my app to use other Google services like Google Drive? The new Google sign-in library still uses OAuth 2.0. Meaning that you can use to not only identify the user, but your user can also use it to authorize your app to use a number of different Google services on their behalf. How you do this depends a bit on the other Google libraries you're using, but for many of these libraries you're going to need to do two things. First, add the scopes you're requesting to the scopes array that's part of the Google sign-in singleton instance. You can request things like seeing what files are in your user's Google Drive folder, asking for their Google+ profile information, viewing what events are on their calendar, and much, much more. Now after a user has signed in, you'll need to pass their OAuth information to the library that you are using. In Google Drive's case, you can grab your OAuth 2 authorizer by calling authentication. Fetcherauthorizer on your current user, and then pass that along to your Google Drive service. At this point, your Google Drive library is now properly authorized, and you can use it to access your user's drive folder, list files there, or do whatever else your user has given you permission to do. Question number three, how do I send my user's ID to my server? So once a user is signed into Google, you get back their user ID, which you're free to use on the client to identify them [1]. Now, you might think that you could use this ID to send information about your user to the server. An evil-doer could very easily hack your client or create a fake client to send down a similar request, but use somebody else's user ID. Now if your server were to trust that user ID blindly, you could end up leaking a whole bunch of sensitive information. That's bad. So instead, you'll notice that in addition to the user ID. Google sign-in also provides a giant string known as an ID token. This giant string, which contains three sections. You've got a small header, some data about the user, which includes things like your user's ID, the application that this ID token is for, and a signature provided by Google servers. You can basically think of this signature as a hash that confirms that everything in the data portion here is accurate. If an evil hacker tried to change this data, the signature wouldn't match up, and the token would be invalid. So here's how this would work. Your app would send this ID token down to your server. Your server would then verify that this ID token looks legit, and there are two ways of doing this. You can pass it along to Google to verify for you, which is easy to do, but takes a bit of time, because it involves a network call, or you can verify it yourself on your own servers, which is a whole lot faster, but requires a little more code. Don't try and reinvent the wheel yourself, particularly where security is involved. Either way, once you've verified that this ID token is, in fact, legit, and it's intended for your app, and it was issued somewhat recently, you can then extract the user's ID from ID token and feel confident that your user is really who they say they are. Now, at this point, I'd probably have your server generate its own random string to send back to your client, and maybe you can use that as a way to identify your user, rather than verifying this ID token every single call. Question number four, what's up with these access token methods? Back before you could easily get the fetcher authorizer object to do things like enable the Google Drive service, like I talked about in question two, you might have used these calls to manually authorize the Google Drive service on your own. But now you don't even need them for that anymore. So the best answer is don't worry about these calls. Question number five, what's the difference between sign-out and disconnect? So you know that if I sign the user out by calling GIDsignin.shared instance.signout. A typical situation might be where you've got where you're managing sign-in some other way. Maybe you have your own account system, but you're still using Google sign-in so that you can, for example, get access to your user's Google Drive content [2]. Well, this user might want to say, hey, you know, I'd like to stay signed into your app. I just don't want to give you access to my Google account anymore. So we want to wipe out the stuff associated with the Google account. And for that you're going to want to add a disconnect feature. This is typically something you might put in a My Account screen somewhere. So disconnect is a way for a user to break the ties between your app and their Google account.

References

1. Integrating Google Sign-In into your web app [Electronic resource]. URL: https://developers.google.com/identity/sign-in/web/sign-in/ (date of access: 25.01.2017).

2. Integrating Google Sign-In into your iOS app [Electronic resource]. URL: https://developers.google.com/identity/sign-in/ios/sign-in/ (date of access: 24.10.2016).

ТЕХНОЛОГИЯ БЛОКЧЕЙН И ЕЕ ПРАКТИЧЕСКОЕ ПРИМЕНЕНИЕ Мащенко П. Л.1, Пилипенко М. О.2 Email: Mashchenko1132@scientifictext.ru

'Мащенко Полина Леонидовна — студент;

2Пилипенко Мария Олеговна — студент, кафедра инновационных технологий в государственном управлении, Московский технологический университет, г. Москва

Аннотация: технология блокчейн (blockchain) появилась не так давно, но уже набрала популярность и обладает потенциально большой значимостью для проведения различных операций благодаря своей защищенности и надежности. Основная сфера ее применения — экономика, в частности, криптовалюта, но потенциально технология полезна для самых разных отраслей, и большинство ее возможностей только предстоит использовать на практике. Статья посвящена краткому обзору технологии, принципов ее работы и возможным применениям в разных сферах экономики. Ключевые слова: блокчейн, технологии будущего, информационные технологии.

THE BLOCKHCAIN TECHNOLOGY AND ITS PRACTICAL USE Mashchenko P.1, Pilipenko M.2

'Mashchenko Polina — student;

2Pilipenko Maria - student, INNOVATION TECHNOLOGIES IN PUBLIC ADMINISTRATION DEPARTMENT, MOSCOW TECHNOLOGICAL UNIVERSITY, MOSCOW

Abstract: the blockchain technology appeared not so long ago but it has already become very popular and potentially significant for carrying out various operations because of its reliability and security. Nowadays blochain technology is mostly used in economiс fields such as cryptocurrency. Nevertheless blockchain technology is potentially useful for many various fields. This article is devoted to short overwiew of the blockchain technology itself, its work principles and its possible use in various economic fields. Keywords: blockchain, future technologies, information technologies.

УДК 004

Введение.

В последнее время в мире и в экономике стали набирать популярность технологии блокчейн (Blockchain), которые становятся все более популярными, охватывая все новые сферы. Можно смело сказать, что перед ними лежит огромное будущее. Первое, что приходит в голову при упоминании технологии блокчейн - это криптовалюта (Биткоин, Ванкоин и прочее). Криптовалюта - это разновидность цифровой валюты, создание и контроль за которой базируются на криптографических методах и схеме доказательства выполнения какой-то деятельности. Криптовалюта очень популярна в данный момент, однако не является главным и основным направлением разработки в блокчейн, несмотря на то, что находится на слуху. Очень скоро все потенциальные пользователи оценят преимущества данной технологии и начнут вводить в ее работу. Но в чем же особенность блокчейна и почему эксперты всего мира верят в их перспективность?

1. Что такое блокчейн.

В общем и целом, технология блокчейн представляет собой распределенную систему записей, которые связаны между собой, подтверждены и могут легко быть проверены. Описывать эти записи могут все, что угодно - от денежных переводов до заключенных контрактов. Главное, что информация в этих записях должна быть подтвержденной, проверенной и попросту надежной.

Суть технологии заключается в том, что блокчейн - это огромная распределенная база данных общего пользования [1]. В ней нет центрального руководства, проверкой транзакций занимается остобая категория пользователей, называемая майнерами. Майнеры подтверждают подлинность совершенных транзакций и формируют из них блоки, которые выстраиваются в цепочки. Построение основано на том, что каждый последующий блок содержит информацию о предыдущем. В отсутствии посредников кроется основное преимущество технологии. В настоящий момент все операции с деньгами, документами и прочими данными требуют наличия посредников, проверяющих подлинность проведенных операций. В блокчейне

i Надоели баннеры? Вы всегда можете отключить рекламу.