Developing Applications With Azure Active Directory Principles of Authentication and Authorization For Architects and Developers 1st Edition Manas Mayank PDF Download
Developing Applications With Azure Active Directory Principles of Authentication and Authorization For Architects and Developers 1st Edition Manas Mayank PDF Download
https://ebookbell.com/product/developing-applications-with-ibm-
filenet-p8-apis-ibm-redbooks-2100240
Developing Applications With Javatm And Uml 1st Edition Paul R Reed
https://ebookbell.com/product/developing-applications-with-javatm-and-
uml-1st-edition-paul-r-reed-2536430
https://ebookbell.com/product/developing-applications-with-visual-
studio-net-richard-grimes-4099922
https://ebookbell.com/product/developing-applications-with-salesforce-
chatter-rakesh-gupta-4682704
Developing Applications With Enterprise Soa 1st Edition Martin Huvar
https://ebookbell.com/product/developing-applications-with-enterprise-
soa-1st-edition-martin-huvar-6853862
https://ebookbell.com/product/a-practical-guide-to-x-window-
programming-developing-applications-with-the-xt-intrinsics-and-
osfmotif-first-edition-keller-7161400
https://ebookbell.com/product/developing-android-applications-with-
adobe-air-1st-edition-vronique-brossier-2225514
https://ebookbell.com/product/developing-android-applications-with-
flex-45-rich-tretola-2266422
https://ebookbell.com/product/developing-ios-applications-with-
flex-45-rich-tretola-2339714
Developing
Applications with
Azure Active Directory
Principles of Authentication and
Authorization for Architects
and Developers
—
Manas Mayank
Mohit Garg
www.allitebooks.com
Developing
Applications with
Azure Active Directory
Principles of Authentication
and Authorization for
Architects and Developers
Manas Mayank
Mohit Garg
www.allitebooks.com
Developing Applications with Azure Active Directory: Principles of
Authentication and Authorization for Architects and Developers
Manas Mayank Mohit Garg
Hyderabad, India Hyderabad, India
www.allitebooks.com
To my parents, Mrs. Ranjana Poddar and
Mr. B.B. Poddar. No words could do justice
to all that you have done.
To my sisters, Santwana Poddar and
Anima Poddar, you both are the best
that happened to me.
—Manas Mayank
This book is dedicated to my parents,
Pawan Kumar Garg and Saroj Garg.
Without their sacrifices, I wouldn’t have
accomplished whatever I have in my life.
I would also like to dedicate this to my wife,
Samiksha Gupta, who is always standing by
my side and supporting me during tough times.
—Mohit Garg
www.allitebooks.com
Table of Contents
About the Authors��������������������������������������������������������������������������������xi
About the Technical Reviewer�����������������������������������������������������������xiii
Acknowledgments������������������������������������������������������������������������������xv
Introduction��������������������������������������������������������������������������������������xvii
www.allitebooks.com
Table of Contents
vi
Table of Contents
vii
Table of Contents
Android Application�������������������������������������������������������������������������������������������143
Running the Application������������������������������������������������������������������������������144
HTTP Triggered Azure Function Endpoint�����������������������������������������������������144
Android App�������������������������������������������������������������������������������������������������145
Creating an Android App������������������������������������������������������������������������������146
Creating an HTTP Triggered Azure Function������������������������������������������������148
Summary����������������������������������������������������������������������������������������������������������151
viii
Table of Contents
Open Extensions�����������������������������������������������������������������������������������������������183
Create����������������������������������������������������������������������������������������������������������183
Read������������������������������������������������������������������������������������������������������������184
Update���������������������������������������������������������������������������������������������������������185
Delete����������������������������������������������������������������������������������������������������������186
Schema Extensions�������������������������������������������������������������������������������������������187
Adding a Schema����������������������������������������������������������������������������������������188
Add-Update Schema Extension Value����������������������������������������������������������190
Read Schema Extension Value��������������������������������������������������������������������192
Remove Schema Extension Value����������������������������������������������������������������193
Summary����������������������������������������������������������������������������������������������������������194
Chapter 8: Multitenancy�������������������������������������������������������������������219
Multitenancy Models�����������������������������������������������������������������������������������������220
Setting up Our Solution�������������������������������������������������������������������������������������222
Configuring a User from Another AAD Tenant����������������������������������������������223
Configuring an Application to Support Multitenancy�����������������������������������224
ix
Table of Contents
Index�������������������������������������������������������������������������������������������������277
x
About the Authors
Manas Mayank is currently working as a
senior consultant with Microsoft. He has
13 years of experience in designing and
developing software systems. An avid learner,
he loves knowing the hows and whys of a
software’s design. He also likes to explore
the latest technologies. Manas specializes
in end-to-end delivery of cloud-based
applications. More of a software purist, Manas
is a proponent of designing clean, simple, and efficient architecture.
Performance optimizations is one of his fortes. He holds a master’s
degree in information technology from IIIT-Bangalore. Outside of work,
he is a sports enthusiast. Find him at www.linkedin.com/in/manas-
mayank-b966505.
xi
About the Technical Reviewer
Vidya Vrat Agarwal is a software architect,
author, blogger, Microsoft MVP, C# Corner
MVP, speaker, and mentor. He is a TOGAF
certified architect and a Certified Scrum
Master (CSM). He is currently working as a
principal architect at T-Mobile Inc. USA.
He started working on Microsoft .NET with its
first beta release. Vidya is passionate about
people, process, and technology and loves
to contribute to the .NET community.
He lives in Redmond, WA, with his wife,
Rupali, two daughters—Pearly and Arshika, and puppy Angel. He blogs
at www.MyPassionFor.Net and can be reached at [email protected] or
on Twitter @dotnetauthor.
xiii
Acknowledgments
I have to start by thanking my awesome wife, Samiksha Gupta. From the
first day of writing this book till last day, she has supported me very well.
She was as important in getting this book done as I was. Thank you so
much, dear.
I would like to thank Mr. Shrenik Jhaveri, Ranjiv Sharma, and Krishna
Chaitanya Telikicherla for guiding me to learn Azure technologies and
Azure AD. They believed in me and constantly guided me to learn. Without
their support, this book may have not been possible.
I would also like to thank my elder sister Priyanka Garg, my brother-
in-law Satya Kejriwal, my younger brother Sahil Garg, and my best friends,
Deep lal Sharma, Chandra Pratap Singh, Shanshu Garg, and Lucky Garg,
who trusted me and encouraged me to do hard work.
I would also like to thank all the managers at Microsoft—Ashwani
Sharma, Manish Sangha, Anil Emmadi, Naveen Konduri, and Pramod
Walvekar—for always encouraging me to learn new technologies and to
work hard. You all helped me to give a better shape to my career.
I would also like to thank my colleagues at Microsoft: Apoorv Gupta,
Jebarson Jebamony, Piyush Jain, Prasad Ganganagunta, Rishabh Verma,
Sachin Gupta, Kuldeep Singh, Kshitij, and Chaitanya Cheruvu. I have
learned a lot from each and every one of you. Special thanks to Manas
Mayank and Rahul Sawhney for motivating me to write this book.
I would also like to thank my teachers at Chitkara University for
helping me to explore my potential. Thank you very much.
xv
Acknowledgments
xvi
Introduction
Any enterprise application worth its salt will have some kind of
authentication built into it. Azure Active Directory is one of the top
cloud-based identity providers on the market. It goes beyond being a
traditional identity provider. Developers and architects are traditionally
aware of basic authentication mechanisms, like username and password,
certificate-based authentication, and so forth. This tends to influence
decision-making when choosing the most appropriate authentication
mechanisms for their cloud-based applications. The Internet is full of
subject matter, further compounding the understanding needed for
designing authentication.
This book concentrates on concepts using simple examples in its quest
to bridge the distance between developers and IT infra, helping you to
make the right design decisions. It is a one-stop source for getting around
most relevant concepts pertaining to Azure Active Directory.
xvii
CHAPTER 1
Introduction to Azure
Active Directory
The need for centralized management of users and devices over networks
led to the advent of directory services. The users and devices that need
to be authenticated over a network are referred to as resources. Directory
services act as a single point that provides information about all the
resources on a network.
As most of you are aware, Microsoft’s implementation of on-premises
directory services is called Active Directory. In this book, we will use the
abbreviation AD to refer to Active Directory in general.
With the surge of solutions based on cloud-based services, there was a
need for directory services that are accessible over the cloud and that are
not limited to an organization’s network. Microsoft’s offering for identity
and access management over the cloud is called Azure Active Directory
(AAD). The terms Azure AD and AAD are used interchangeably for Azure
Active Directory. Azure AD provides a ready-made solution to handle
authentication for your cloud-based applications or mobile apps.
This book talks about how to develop applications using Azure Active
Directory. In this chapter, we introduce Azure Active Directory and
some key terms related to it. This will help you understand the concepts
necessary for developing an application.
• Authentication
• Authorization
• SPN
• OAuth
• OpenID Connect
• Federated identity
• Single sign-on
• Pass-through authentication
• Tenants
• Multitenancy
• Claims-based authentication
• Azure AD B2B
• Azure AD B2C
Authentication
Authentication is a process for identifying a user’s identity. Authentication
can be divided into two phases.
2
Chapter 1 Introduction to Azure Active Directory
Authorization
Authorization is a process for verifying access permissions or privileges,
and determining the access level that the logged-in identity has access to.
Generally, authorization is the second step after authentication.
After the identity is established, a process fetches the roles/permissions/
privileges related to the established identity and the required content is
3
Chapter 1 Introduction to Azure Active Directory
4
Chapter 1 Introduction to Azure Active Directory
Azure AD are most effective. Before delving deeper into Azure AD, let’s
discuss some key terms related to Azure Active Directory.
Tokens
An online dictionary meaning of a token is “a tangible representation of a
fact.” In the context of authentication, a token represents facts about the
identity of a user or a resource. The set of facts is provided by directory
services, which for us is Azure AD.
Tokens are used for exchanging identity information; they are signed to
make them secure. They are signed using private keys and can be validated by
using public keys. Tokens are valid for only a specific period to avoid misuse.
Tokens can be represented in various industry-wide formats. JSON
Web Token (JWT) and Security Assertion Markup Language (SAML) are the
most commonly used formats for tokens. As soon as user authentication is
successful, the identity provider gives a token in response, which is valid for
a specific time and signed using private keys. That token can be exchanged
with other trusted systems to get access for a specific time.
A JWT token is most commonly used for integration with Azure Active
Directory. As obvious by its name, a JWT token represents the user in JSON
(JavaScript Object Notation) format. Here is a sample JWT token:
"eyJ0eXAiOiJKV1QiLCJhbGciOiJ………………………..71846CA77+9G++/
vUjvv71q77+977+9xrMoDQo="
You must be wondering why this token is in plain string format and
not in a JSON format. It is because the token is transformed using Base64
encoding. You need to do transformation using Base64 to see the actual
JSON format.
After transformation of this token, the retrieved string is divided into
three parts separated by ".". The following is a brief overview of the
various fields within a token. We touch on these fields over the course of
the book.
5
Chapter 1 Introduction to Azure Active Directory
{
"typ": "JWT",
"alg": "RS256",
"x5t": "-sxMJMLCIDWMTPvZyJ6tx-CDxw0",
"kid": "-sxMJMLCIDWMTPvZyJ6tx-CDxw0"
}
{
"aud": "https://your-resource",
"iss": "https://sts.windows.net/72f988bf-86f1-41af-
91ab-2d7cd011db47/",
"iat": 1548737381,
"nbf": 1548737381,
"exp": 1548741279,
"acr": "1",
"aio":"AVQAq/8KAAAA+sqxpQ0JBRhDY9/
dmeELZJlGFvbDbfdGFB7DnFbhx5tgXdEAOxCtjF8k
bYceM1COSkKIfBSNozYM7avIzYz0VaN/OFG22kCroWvC/
il4QcU=",
"amr": [
"wia",
"mfa"
6
Chapter 1 Introduction to Azure Active Directory
],
"appid": "5c6035f3-e94f-4ed3-821c-40870f6cf1f3",
"appidacr": "2",
"family_name": "Scott",
"given_name": "James",
"in_corp": "true",
"ipaddr": "167.220.238.5",
"name": "Mohit Garg",
"oid": "dc5e633a-7058-474c-8f1c-435538e7d290",
"onprem_sid": "S-1-5-21-2146773085-903363285-
719344707-2044714",
"scp": "Employees.Read.All user_impersonation",
"sub": "caF45MyAn57WqX5Omoeh9epNQ6lFKp5_xdVkj0ReGIs",
"tid": "72f988bf-86f1-41af-91ab-2d7cd011db47",
"unique_name": "*****@microsoft.com",
"upn": "*****@microsoft.com",
"uti": "ktKZuwI7pkSYiAtHyiIHAA",
"ver": "1.0"
}
7
Chapter 1 Introduction to Azure Active Directory
8
Chapter 1 Introduction to Azure Active Directory
9
Chapter 1 Introduction to Azure Active Directory
SPN
SPN stands for service principal name. To access any resource that is
secured by Azure Active Directory, you need a security principal. A
security principal defines the permissions and access policies, which
in turn help to enable Azure AD core features like authentication and
authorization. The security principal defined for an application is known
as a service principal. The SPN is required to access resources secured by
Azure AD. Access resources secured by Azure AD using an application
service principal are explained later in this book.
10
Chapter 1 Introduction to Azure Active Directory
O
Auth
OAuth stands for open authorization. It’s an open standard for token-
based authentication and authorization. It allows you to authorize
third-party applications by sharing a token containing logged-in user
information instead of the actual username and password. It was first
released in December 2007 as OAuth Core 1.0.
The second version of the OAuth standard (OAuth 2.0) was released
five years later. It is not backward compatible with OAuth 1.0. OAuth 2.0
has new authorization flows for web applications, mobile applications,
desktop applications, and smart devices.
Please refer to https://oauth.net/2/ to read more about OAuth and
OAuth 2.0.
O
penID Connect
OpenID Connect, also known as OIDC, is built on top of the OAuth 2.0
protocol. It defines standards for authentication based on JSON and HTTP
protocols. It helps verify the identity of the logged-in user compared to the
authorization it has over resources. It can provide basic information about
the logged-in user using the REST API.
OIDC allows different types of clients, including web clients, mobile
clients, and JavaScript clients to perform authentication and to request and
receive information about logged-in users and authenticated sessions.
Please refer to https://openid.net/connect/ to learn more about
OpenID Connect.
F ederated Identity
Consider a scenario where a single user might need to authenticate in
multiple organizations. Each of these organizations has different identity
providers. A user’s credentials are stored in its parent identity management
11
Chapter 1 Introduction to Azure Active Directory
system. Other identity providers can trust the parent identity management
system and allow the user to be validated in multiple organizations. A
federation refers to the protocols used to achieve this scenario. The user
identity provided by such a system is called a federated identity.
Single Sign-On
Single sign-on, or SSO, allows users to use one set of credentials to log
in to multiple applications. After authenticating, users do not need to
reauthenticate for other applications. This streamlines user experiences
and gives administrators better control over user identities. Protocols like
OAuth and OpenID Connect can work on applications in various platforms
to provide a seamless single sign-on experience.
Pass-Through Authentication
Pass-through authentication allows users to authenticate against an on-
prem Active Directory using AAD. Azure AD doesn’t save the username
and password. Whenever a user tries to sign in, Azure AD forwards
the request to an on-prem Active Directory so that the user can be
authenticated.
Tenant
In layman’s terms, tenant means a person who possesses a property or
land from a landlord. Similarly, in the world of identity management, a
tenant is a representation of an organization in the identity management
system. Multiple organizations can register and create their own tenant in
Azure Active Directory. A tenant can have multiple users from the same
organization.
12
Chapter 1 Introduction to Azure Active Directory
M
ultitenancy
Multitenancy refers to a single application consumed by users from
different organizations. One tenant develops the application and can invite
other tenants to use the same application. Multitenancy is a huge topic
that is discussed in a chapter later in this book.
C
laims-Based Authentication
Claims are a set of information that describes a given resource’s identity.
It’s a set of key/value pairs related to the logged-in identity (user or app),
for example, the user’s principal name, email address, groups, first name,
last name, and so forth.
In the context of Azure Active Directory, applications get claims after
successful authentication using OAuth 2.0 and OpenID Connect. In web
applications, claims are stored in a cookie in a secured manner to perform
claims-based authentication for further requests.
Microsoft released claims-based authentication with .NET Framework
3.0. The basic authentication flow shown in Figure 1-2 is for claims-based
authentication using Azure Active Directory.
13
Chapter 1 Introduction to Azure Active Directory
Request
Redirection to login
Request
Response
Azure AD B2B
B2B refers to business to business. If you need to securely share your
company’s applications and services with other companies or guest users,
you can use Azure AD B2B. You have full control over your organization’s
data. You can invite users from another organization, also using Azure
AD. Organizations not using Azure Active Directory can be added as a
guest user in the tenant. Partner users use their own identity management
solution. There is no need for any additional overhead from your
organization to maintain partner users.
14
Chapter 1 Introduction to Azure Active Directory
Invited users are able to use their own credentials to log in to your
application and services. You can customize your solution for inviting
users by using Azure AD B2B invite APIs.
The following are the advantages of using Azure AD B2B collaboration.
• You can invite any user with a valid email address. It is
not mandatory to be an Azure AD user.
Azure AD B2C
B2C stands for business-to-customer collaboration. If you need to create
a customer-facing application, you should use Azure AD B2C. Azure B2C
is based on similar components as AAD, but its core purpose is to provide
identity management for an organization’s customers. Users of Azure AD
B2C are able to log in with an existing identity (from external providers
like Facebook, Twitter, Google, Outlook, LinkedIn, etc.). There is no need
for a separate Azure AD user account; the same identity (username and
password) can be used to log in.
15
Chapter 1 Introduction to Azure Active Directory
Summary
Various Azure services can integrate with Azure AD and use it as an
identity provider. Azure AD is used as an identity provider by Microsoft
SaaS services like Office 365. It can also be integrated with third-party SaaS
solutions like Salesforce. In addition to SaaS solutions, Azure AD can be
used with Azure VMs and various Azure PaaS services. Furthermore, Azure
AD can be synchronized with on-premises Active Directory.
This chapter focused on introducing readers to the fundamentals
of authentication and Azure AD in a simple language. We started
by introducing the meaning of authentication and authorization
to understand the purpose of Azure Active Directory and related
technologies, such as Azure AD B2B and Azure AD B2C. We also touched
on various standards, such OAuth, OpenID, and OpenID Connect. Before
getting deeper into any technology, you should understand its various
standards and protocols.
We shall continue our journey by learning more about OAuth
standards in the next chapter.
16
CHAPTER 2
• OAuth 2.0
• OpenID Connect
• Tokens
• Validating tokens
To integrate applications with Azure AD, you must first understand the
OAuth and OpenID Connect standards.
© Manas Mayank and Mohit Garg 2019 17
M. Mayank and M. Garg, Developing Applications with Azure Active Directory,
https://doi.org/10.1007/978-1-4842-5040-2_2
Chapter 2 OAuth Flows and OpenID Connect
O
Auth 2.0
OAuth 2.0 standards are not backward compatible with OAuth 1.0. The
differences between the two are beyond the scope of this book. We will
concentrate on the latest OAuth 2.0 standards.
To understand the need for OAuth, let’s consider a real-world scenario.
Assume that you work for an organization that provides authorized access
to employees over secured areas. Employees swipe smart cards provided
by the organization’s security team to gain access to secured physical
spaces. When a visitor comes to see an employee, the visitor provides her
information, and the employee provides her credentials (along with the
employee’s smart card) to the representative of the security team. Security
personnel then issue a temporary visiting identity card to the visitor,
allowing her to enter the physical premises for a limited period. This real-
world scenario is roughly represented by the sequence diagram shown in
Figure 2-1.
Security Organization
Visitor Employee
Department Premises
Request to Visit
Employee's Credentials
18
Chapter 2 OAuth Flows and OpenID Connect
The sequence diagram shown in Figure 2-2 depicts the OAuth flow.
19
Chapter 2 OAuth Flows and OpenID Connect
20
Chapter 2 OAuth Flows and OpenID Connect
We will use the basic OAuth flow sequence diagram (see Figure 2-2) as
a reference for explaining each of the steps.
• Authorization code
• Implicit
21
Chapter 2 OAuth Flows and OpenID Connect
• Client credentials
We discuss each of these grant types in this chapter. This chapter also
introduces OAuth 2.0 standards. Azure AD–specific details are covered in
subsequent chapters.
22
Chapter 2 OAuth Flows and OpenID Connect
OAuth 2
OAuth 2 Token
User Native App Authorization Web API
Endpoint
Endpoint
Login Pop Up
Validate
access token
23
Chapter 2 OAuth Flows and OpenID Connect
https://aad-tenant/authorize?
response_type=code
&client_id=client123
&redirect_uri=https%3A%2F%2Ffanyv88.com%3A443%2Fhttps%2Fclient-application%2Fcallback
&scope=read+write
&state=abc
24
Chapter 2 OAuth Flows and OpenID Connect
https:// client-application/callback?
code=xyz123
&state=abc
25
Chapter 2 OAuth Flows and OpenID Connect
https://aad-tenant/token
26
Chapter 2 OAuth Flows and OpenID Connect
27
Chapter 2 OAuth Flows and OpenID Connect
{
"access_token": "abc123",
"token_type": "bearer",
"expires_in": 3600,
"refresh_token": "xyz890",
"scope": "read write"
}
28
Chapter 2 OAuth Flows and OpenID Connect
29
Chapter 2 OAuth Flows and OpenID Connect
Implicit Grant
This flow is typically used by applications implemented using scripting
languages like JavaScript. The secured resource is directly accessed using
the scripting language. An implicit grant is a variant of an authorization
code grant flow. But instead of having separate requests for getting the
authorization code and the access token, the access token is received after
authorizing with the “authorize” endpoint. There is no separate client_id
and client_secret authentication. Since the access token is exposed to the
resource owner and the other application on the client device, an implicit
grant is considered less secure. Since it is less secure, an implicit grant flow
does not use a refresh token.
The following criteria are the general rules for choosing an implicit
grant.
30
Chapter 2 OAuth Flows and OpenID Connect
The diagram shown in Figure 2-6 details the process flow for an
implicit grant. The following are the actors for the implicit grant flow (the
mapping of the actors defined in Figure 2-3 are in parentheses).
&OLHQW 2$XWK$XWKRUL]DWLRQ
8VHU %URZVHU :HE$3,
$SSOLFDWLRQ (QGSRLQW
8VHUEURZVHVWKH
63$
%URZVHUVHQGUHTXHVWWRZHEDSS
5HGLUHFWLRQWRORJLQSDJH
8VHUHQWHUVFUHGHQWLDOV
&UHGHQWLDOVVXEPLWWHGWR2$XWK
$XWKRUL]DWLRQ(QGSRLQW
5HWXUQ,'WRNHQ
DFFHVVWRNHQ
&DOO:HE$3,E\DGGLQJDFFHVV
WRNHQLQDXWKRUL]DWLRQKHDGHU
9DOLGDWH
DFFHVVWRNHQ
5HWXUQWKHGDWD
WRWKHZHEDSS
31
Chapter 2 OAuth Flows and OpenID Connect
https://aad-tenant/authorize?
response_type=token
&client_id=client123
&redirect_uri=https%3A%2F%2Ffanyv88.com%3A443%2Fhttps%2Fclient-application%2Fcallback
&scope=read+write
&state=abc
32
Chapter 2 OAuth Flows and OpenID Connect
https:// client-application/callback#
access_token =xyz123
& token_type =bearer
33
Chapter 2 OAuth Flows and OpenID Connect
&expires_in=3600
&scope= read+write
&state=abc
34
Chapter 2 OAuth Flows and OpenID Connect
The diagram shown in Figure 2-7 details the process flow for a
password grant. The following are the actors for the password grant flow
(the mapping to the actors defined in Figure 2-3 is in parentheses).
35
Random documents with unrelated
content Scribd suggests to you:
been entirely absent since birth. Many little girls and babies have no
hymen. It can be destroyed by accident or injured by operations, or
examinations where the physician did not use the greatest care. In
some women it is easily destroyed; in others it is more difficult. It is
not at all uncommon for a physician to find the hymen unruptured
when he comes to deliver the first born child. All of which goes to
prove that neither its presence nor its absence is necessarily the sign
of virginity.
Now that we have some idea of the situation of the reproductive
organs and their relations to one another we shall be ready to
consider in greater detail the ovule or egg in the ovary.
PUBERTY—PART II.
Beginning with puberty the eggs from the ovary are expelled as they
ripen or mature. This process is called ovulation and occurs about
every twenty-eight days. It is closely related to menstruation, but it
is not menstruation as you will soon learn. Some writers say the egg
is expelled at other times than at the menstrual periods; another
writer asserts that one passes every six hours, alternating male and
female. There are many views and ideas on the subject of ovulation,
but I will tell you of the most generally accepted theory, that the egg
is expelled from the ovary every twenty-eight days.
When the egg ripens, the ovary discharges it and sends it on to find
its way through the tubes to the uterus. Here we find the blood
supply of the uterus greatly increased in preparation for the egg. We
find the inner lining of the uterus becomes very soft and smooth so
that the egg can very easily find a place in which to lodge itself after
it has been fertilized. We also find that the cells swell and multiply,
all in preparation to welcome and nourish the incoming egg or
ovum. If the egg is fertilized by the male, it then remains in the
uterus to develop. If not, it is thrown out, together with all the
preparation made to receive it. The cells burst and discharge their
contents; the mucus, blood, cells and all come away in what is called
the menstrual flow.
At one time woman was thought to be the only creature which
menstruated. But science now tells us that all warm blooded animals
which walk erect menstruate. The discharge is chiefly due to the
position which in standing upright, throws the large part of the
uterus higher than the neck. In animals, such as dogs, cats, etc., the
same process goes on, but the position of these animals keeps the
large part of the uterus lower than the small part, where the blood is
retained and then reabsorbed into the system.
This process goes on every four weeks in girls after they reach the
age of puberty and continues at regular periods as long as the egg is
not fertilized until the reproductive age is over, which is usually
between the forty-fifth and fiftieth year. If, however, the egg is
fertilized the menstrual flow ceases and this blood supply goes to
nourish the new life in the uterus. It does not appear again until
after the birth of the child, and usually ceases while the child
depends upon the milk from the mammal glands.
The age at which this process (menstruation) first takes place in girls
differs in individuals. Climate has some effect upon it, for girls in
warm or Southern climates mature earlier than in colder places. In
this climate the average girl reaches puberty at fourteen years of
age. Some have been known to reach it as early as the eleventh and
others not until the eighteenth year, all in the same place and yet
normal and healthy, which shows there is no reason for anxiety if the
girl does not menstruate at fourteen, provided she is developing
normally and is in good health. During the first few years after its
appearances the periods are likely to be irregular. This is because
the sexual organs are not fully developed. Often the period does not
occur after the first time for three, five, eight months and sometimes
a year. This irregularity continues for two or three years. Cases of
girls coming from Europe have been known where the period was
perfectly established over there, but after arriving in this climate the
menstrual flow did not occur again for a year and over. Usually this
irregularity lasts only a few months, and when once it has become
regular, there should be no worry over its arrival a day or two earlier
or later.
The length of time the period lasts differs in women also. The
average length of time is four or five days, yet there are women in
which it lasts fully a week, and others but a few hours. The length of
time should not be of as much concern as the amount of discharge
which is expelled each time. It is, of course, difficult to estimate this,
but physicians claim that more than three protectives in twenty-four
hours should not be used. In all women the flow is most profuse
during the first two days.
The care of the health should receive more attention during the first
two days than is usually given it. To the girl who has to work from
early morning until late at night, these two days are unusually hard
on her nerves and on her general health, and I regret that I have no
new message for her to help lighten the burden, which under the
present atrocious industrial system makes it so hard for her.
Physicians say there should be no need of interrupting the regular
routine of the day at this time more than any other. There are a few
strong women to whom this period makes no difference, but the
average girl in this country spends two days of pain and discomfort.
Out of 1,000 girls questioned, only 16 per cent. were entirely free
from pain, which proves that the time has come for women to cease
being ashamed of this function, and insisting upon at least one day's
rest at the expense of her employer. Some of the old biblical ideas
instilling into the man's mind, that a woman is unclean at this time
has been the cause of much hardship and many sneers endured by
a woman during these periods. The consequence has been that she
will bear the most intense pain rather than allow the men working
with her to suspect that she is menstruating. It is all nonsense and
wrong, and it is time women should band together in one great
sisterhood to protect one another from being slowly drained and
exhausted of their powers of motherhood for the benefit of their
exploiters. Women who belong to unions should demand that this
day be given them and their sisters. Girls continue to suffer pains in
the abdomen and back, pains running down the limbs, headache,
often nausea, besides being nervous and irritable, yet hang on a
strap in an overcrowded street car, stand or sit all day in the shop or
at the machine and utter no protest. They know, too, they are not
alone in this suffering, for they see about them day after day
hundreds of other women enduring the same pain, yet they remain
silent.
How long will you endure this, working women?
There is one thing to remember, that the greatest strain comes on
the nervous system at this period. One of the best ways to assist in
building up the nerve strength is in sleep and rest and for the girl
who dares not remain away from the shop fearing to lose her “job”
the next best thing is to get to bed early, for there's nothing that
builds up the exhausted nerves like sleep.
Fortunately, the girl at school has some consideration shown her at
this time, and it is well that this is so, for until the period becomes
established there is special danger of overdoing in school work,
which often causes St. Vitus dance and other nervous disorders.
I believe in the regular warm tub bath, or cold sponge followed by a
good rubbing all over the body at this time, together with nine or ten
hours' sleep, and light, nourishing food without stimulant. If the
bowels are active, it often lessens the pain considerably, and it is
very important that every girl attend to this if she has any regard for
her health. There are a few abnormalities of the menstrual function
which I will not take the space to state here. Before leaving the
subject, I wish to impress upon the reader that most abnormalities,
such as too little or too much flow, or very great exhausting pain are
usually caused, not by any disease of the generative organs, but
more often a disturbance of the general health, which can often be
treated and cured by building up the system.
Every girl should learn the laws of menstruation and its hygiene and
have a full understanding of the same. The menstrual function
occurs only in the female at puberty, but at the same time there
comes to both boys and girls, or male and female, a mysterious and
impelling influence, which has great power over the lives of both
during the adolescent period unless they understand and control it.
This is known as the Sexual Impulse.
CHAPTER IV.
SEXUAL IMPULSE—PART I.
The sexual impulse is the strongest force in all living creatures. It is
this that animates the struggle for existence; it is this that attracts
and unites two beings, that they may reproduce their kind; it is this
that inspires man to the highest and noblest thoughts; it is this also
that inspires man to all endeavors and achievements, to all art and
poetry; this impulse is the creative instinct which dominates all living
things and without which life must die. If, then, this force, this
impulse plays so strong a part in our lives, is it not necessary that
we know something about it?
At the time of puberty there comes both to boys and girls, two
impulses—one, the desire to touch or caress; to come in contact
with, to write or to speak to, an individual of the opposite sex. This
impulse is much stronger in girls than in boys. The other is the
impulse that impels the individual to discharge the accumulation of
ripe sex cells, and relieve himself of the nervous tension which this
accumulation produces. This impulse is stronger in boys than in girls.
One writer states that this is an unconscious desire for relief from
physical congestion, not differing greatly from the sense of relief
which the emptying of the bladder or rectum produces.
At the time of puberty, we learned from the last article, that the first
manifestations of sexual maturity in the girl is the appearance of the
menstrual flow. But also at puberty there comes the sexual impulse,
which evidences itself during sleep, in a filmy substance dropping
from the mouth of the uterus. This “detumescence” does not appear
very often in young girls, but later in life when sex instinct becomes
stronger it occurs during sleep, especially in young widows having
experienced sexual relations. They are, however, seldom aware of its
taking place; consequently, it has not the danger which it presents
to the boy.
ebookbell.com