Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
1a1e113
Merge branch 'release-0.1.0' into dev
rayluo Dec 12, 2018
9284277
Simplify the installation method since we released on PyPI already
rayluo Dec 17, 2018
9375dcc
Initial sphinx settings
rayluo Dec 18, 2018
b217236
Compose index.rst to actually provide documentation
rayluo Dec 19, 2018
9ba4c73
Switch to sphinx_rtd_theme
rayluo Dec 20, 2018
0cdaf52
Merge branch 'reference-docs' into dev
rayluo Dec 20, 2018
c2574b5
Document all the APIs
rayluo Dec 20, 2018
8a26485
Use msal.__version__ in doc
rayluo Dec 20, 2018
ad28a6a
Also documenting an info var
rayluo Dec 20, 2018
7fef8f9
Document the possible failure in Device Flow
rayluo Dec 21, 2018
5451d36
Merge pull request #10 from AzureAD/refine-docs
rayluo Jan 15, 2019
17948c1
Update README.md with the latest API reference doc
rayluo Jan 15, 2019
a237756
Assertions on Python 3 are supposed to be in bytes
rayluo Jan 17, 2019
dbf0e10
Merge branch 'dev' of https://bitbucket.org/iceberg/oauth2cli into oa…
rayluo Jan 17, 2019
48faeb7
Merge remote branch 'oauth2' into assertion-in-bytes-in-python3
rayluo Jan 17, 2019
7bc92d3
Use a more precise way to encode SAML assertion
rayluo Jan 17, 2019
5e48dca
Fix a logger issue when using assertions in Python 3
rayluo Jan 18, 2019
dc8f270
Fix logger names
rayluo Jan 18, 2019
329ba0f
Remove the hacky assertion type auto detect
rayluo Jan 24, 2019
53949a9
Merge remote branch
rayluo Jan 24, 2019
726cb41
Merge branch 'oauth2' into assertion-in-bytes-in-python3
rayluo Jan 24, 2019
1552449
Use the underlying encoder rather than ad-hoc one
rayluo Jan 24, 2019
43999a6
Merge pull request #16 from AzureAD/assertion-in-bytes-in-python3
rayluo Jan 25, 2019
2d6c373
Wire up verify and proxies for Authority
rayluo Jan 17, 2019
583adeb
Wire up verify and proxies for mex and wstrust
rayluo Jan 17, 2019
b4e482b
fixup! Wire up verify and proxies for Authority
rayluo Jan 29, 2019
518f112
Merge pull request #17 from AzureAD/full-support-for-verify-and-proxies
rayluo Feb 14, 2019
4f08477
Remove inaccurate RE which came from ADAL Python
rayluo Feb 1, 2019
0b0a583
Handle potential race-condition in RT updating
rayluo Feb 7, 2019
e8e35ba
Per Unified Schema, change target to be an unsorted string
rayluo Feb 9, 2019
4a5255c
Remove optional field client_info
rayluo Feb 15, 2019
63bf224
Add test cases for TokenCache and SerializableTokenCache
rayluo Feb 9, 2019
1d1e1f5
Adding SAML 1.1 token types (#20)
abhidnya13 Feb 22, 2019
a0eab4e
Adjusting IdToken key, RT target behavior, and authority_type value
rayluo Feb 26, 2019
31bc31e
Schema defines cached_at, expires_on, ext_expires_on as string
rayluo Feb 26, 2019
adcb637
Indentation in serialization for easier debugging
rayluo Feb 26, 2019
9110eca
Use case-sensitive scope, reference SerializableTokenCache, and log b…
rayluo Feb 27, 2019
24424c0
Merge branch 'target-in-string' into dev
rayluo Mar 4, 2019
834fe8c
MSAL Python 0.2.0
rayluo Mar 5, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ as applications written using a preview version of library may no longer work.

1. If you haven't already, [install and/or upgrade the pip](https://pip.pypa.io/en/stable/installing/)
of your Python environment to a recent version. We tested with pip 18.1.
2. For now, you can install from our latest dev branch, by `pip install git+https://github.com/AzureAD/microsoft-authentication-library-for-python.git@dev`
2. As usual, just run `pip install msal`.

## Usage

Expand All @@ -45,7 +45,7 @@ Acquiring tokens with MSAL Python need to follow this 3-step pattern.
from msal import PublicClientApplication
app = PublicClientApplication("your_client_id", authority="...")
```

Later, each time you would want an access token, you start by:
```python
result = None # It is just an initial value. Please follow instructions below.
Expand Down Expand Up @@ -97,7 +97,7 @@ and
[Auth protocols](https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-v2-protocols)
are recommended reading.

The API reference of MSAL Python is coming soon.
There is also the [API reference of MSAL Python](https://msal-python.rtfd.io).

You can try [runnable samples in this repo](https://github.com/AzureAD/microsoft-authentication-library-for-python/tree/dev/sample).

Expand Down
19 changes: 19 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
SOURCEDIR = .
BUILDDIR = _build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
179 changes: 179 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,179 @@
# -*- coding: utf-8 -*-
#
# Configuration file for the Sphinx documentation builder.
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# http://www.sphinx-doc.org/en/master/config

# -- Path setup --------------------------------------------------------------

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
# import os
# import sys
# sys.path.insert(0, os.path.abspath('.'))


# -- Project information -----------------------------------------------------

project = u'MSAL Python'
copyright = u'2018, Microsoft'
author = u'Microsoft'

# The short X.Y version
from msal import __version__ as version
# The full version, including alpha/beta/rc tags
release = version


# -- General configuration ---------------------------------------------------

# If your documentation needs a minimal Sphinx version, state it here.
#
# needs_sphinx = '1.0'

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.githubpages',
]

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#
# source_suffix = ['.rst', '.md']
source_suffix = '.rst'

# The master toctree document.
master_doc = 'index'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = [u'_build', 'Thumbs.db', '.DS_Store']

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = None


# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
# html_theme = 'alabaster'
html_theme = 'sphinx_rtd_theme'

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#
# html_theme_options = {}

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']

# Custom sidebar templates, must be a dictionary that maps document names
# to template names.
#
# The default sidebars (for documents that don't match any pattern) are
# defined by theme itself. Builtin themes are using these templates by
# default: ``['localtoc.html', 'relations.html', 'sourcelink.html',
# 'searchbox.html']``.
#
# html_sidebars = {}


# -- Options for HTMLHelp output ---------------------------------------------

# Output file base name for HTML help builder.
htmlhelp_basename = 'MSALPythondoc'


# -- Options for LaTeX output ------------------------------------------------

latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#
# 'papersize': 'letterpaper',

# The font size ('10pt', '11pt' or '12pt').
#
# 'pointsize': '10pt',

# Additional stuff for the LaTeX preamble.
#
# 'preamble': '',

# Latex figure (float) alignment
#
# 'figure_align': 'htbp',
}

# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'MSALPython.tex', u'MSAL Python Documentation',
u'Microsoft', 'manual'),
]


# -- Options for manual page output ------------------------------------------

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'msalpython', u'MSAL Python Documentation',
[author], 1)
]


# -- Options for Texinfo output ----------------------------------------------

# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'MSALPython', u'MSAL Python Documentation',
author, 'MSALPython', 'One line description of project.',
'Miscellaneous'),
]


# -- Options for Epub output -------------------------------------------------

# Bibliographic Dublin Core info.
epub_title = project

# The unique identifier of the text. This can be a ISBN number
# or the project homepage.
#
# epub_identifier = ''

# A unique identification for the text.
#
# epub_uid = ''

# A list of files that should not be packed into the epub file.
epub_exclude_files = ['search.html']


# -- Extension configuration -------------------------------------------------
81 changes: 81 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
.. MSAL Python documentation master file, created by
sphinx-quickstart on Tue Dec 18 10:53:22 2018.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.

.. This file is also inspired by
https://pythonhosted.org/an_example_pypi_project/sphinx.html#full-code-example

Welcome to MSAL Python's documentation!
=======================================

.. toctree::
:maxdepth: 2
:caption: Contents:

You can find high level conceptual documentations in the project
`README <https://github.com/AzureAD/microsoft-authentication-library-for-python>`_
and
`workable samples inside the project code base
<https://github.com/AzureAD/microsoft-authentication-library-for-python/tree/dev/sample>`_
.

The documentation hosted here is for API Reference.


PublicClientApplication and ConfidentialClientApplication
=========================================================

MSAL proposes a clean separation between
`public client applications and confidential client applications
<https://tools.ietf.org/html/rfc6749#section-2.1>`_.

They are implemented as two separated classes,
with different methods for different authentication scenarios.

PublicClientApplication
-----------------------
.. autoclass:: msal.PublicClientApplication
:members:

ConfidentialClientApplication
-----------------------------
.. autoclass:: msal.ConfidentialClientApplication
:members:


Shared Methods
--------------
Both PublicClientApplication and ConfidentialClientApplication
have following methods inherited from their base class.
You typically do not need to initiate this base class, though.

.. autoclass:: msal.ClientApplication
:members:

.. automethod:: __init__


TokenCache
==========

One of the parameter accepted by
both `PublicClientApplication` and `ConfidentialClientApplication`
is the `TokenCache`.

.. autoclass:: msal.TokenCache
:members:

You can subclass it to add new behavior, such as, token serialization.
See `SerializableTokenCache` for example.

.. autoclass:: msal.SerializableTokenCache
:members:


Indices and tables
==================

* :ref:`genindex`
* :ref:`search`

35 changes: 35 additions & 0 deletions docs/make.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@ECHO OFF

pushd %~dp0

REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=.
set BUILDDIR=_build

if "%1" == "" goto help

%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.http://sphinx-doc.org/
exit /b 1
)

%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
goto end

:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%

:end
popd
Loading