Skip to content

Commit

Permalink
Merge pull request #863 from AzureAD/release/1.0.1
Browse files Browse the repository at this point in the history
Merge release to master
  • Loading branch information
rpdome authored Dec 16, 2019
2 parents 10557b6 + 9b7a1ff commit 9e17b2c
Show file tree
Hide file tree
Showing 144 changed files with 6,818 additions and 1,530 deletions.
47 changes: 47 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
Is your app live and in production or is this a development issue? Provide a clear and concise description of what the bug is.

**Smartphone (please complete the following information):**
- Device: [e.g. Pixel, OnePlus 6, etc]
- Android Version: [e.g. API Level, Build Number]
- Browser [e.g. Chrome, Edge]
- MSAL Version

**Stacktrace**
If a crash occurs, include the stacktrace.

**To Reproduce**
Steps to reproduce the behavior:

If related to user experience, use the format:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

If related to development, please provide relevant configuration details necessary to understand your problem including any relevant traces, logs, or otherwise.

**Expected behavior**
A clear and concise description of what you expected to happen.

**Actual Behavior**
A description of what actually happened.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Additional context**
Add any other context about the problem here.

**Please note: Do not include sensitive information like PII, OII, credentials, secrets, and tokens.**

For **privacy/security** issues please see instructions [here](https://github.com/AzureAD/microsoft-authentication-library-for-android#security-reporting)
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ integration_tests.properties
*.iws
.idea/
/**/*.pom
.settings
.settings
.project
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@ before_script:

script:
- cd $PWD
- travis_wait ./gradlew clean msal:assembleLocal msal:connectedLocalDebugAndroidTest -PdisablePreDex
- travis_wait ./gradlew clean msal:assembleLocal msal:testLocalDebugUnitTest msal:connectedLocalDebugAndroidTest -PdisablePreDex
258 changes: 154 additions & 104 deletions README.md

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions changelog
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
MSAL Wiki : https://github.com/AzureAD/microsoft-authentication-library-for-android/wiki
Version 1.0.1
----------------------------
- Fix issue #785, #786, #805, #806, #807, #816, #828, #855, #859
- Fixed multiple cloud support in MSAL with Broker.
- Added support for client capabilities to config.
- Added Server Side Telemetry to MSAL.
- Added authority to account object.
- Added support to silently acquire token for a another tenant for an already authorized user for different tenant.
- Added Broker BrowserSupport for COBO.
- Enabled MSAL-Broker communication via AccountManager.

Version 1.0.0-hf1
----------------------------
Expand Down
2 changes: 1 addition & 1 deletion common
Submodule common updated 295 files
17 changes: 17 additions & 0 deletions docs/authorities.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Identity Providers & Authorities

## Introduction

> PENDING
## Class Diagram

> PENDING
## Interaction Diagram

> PENDING
## Links to Code

> PENDING
17 changes: 17 additions & 0 deletions docs/authorizationstrategies.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Authorization Strategies

## Introduction

> PENDING
## Class Diagram

> PENDING
## Interaction Diagram

> PENDING
## Links to Code

> PENDING
17 changes: 17 additions & 0 deletions docs/brokerstrategies.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Broker Client Strategies

## Introduction

> PENDING
## Class Diagram

> PENDING
## Interaction Diagram

> PENDING
## Links to Code

> PENDING
24 changes: 24 additions & 0 deletions docs/claimsrequest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Claims Request

## Introduction

You can request specific claims be returned in the id_token and userinfo endpoint responses. In addition the Microsoft identity platform also allows specific claims to be returned in access tokens.

The claims request parameter is described in detail in the following section of the OpenId Connect specification: [Requesting Claims using the "claims" Request Parameter](https://openid.net/specs/openid-connect-core-1_0.html#ClaimsParameter)

MSAL provides objects for creating, searializing and deserializing claims requests.

> Microsoft identity platform Conditional Access results in the possibility of resources (APIs) requesting specific claims in their 401 WWW-Authenticate header/challenge. MSAL provides a helper class from parsing a claims request parameter from the "claims" directive in the WWW-authenticate header value.
## Class Diagram

![Claims Request Parameter](https://www.lucidchart.com/publicSegments/view/99a5cbfd-7b04-4693-bb11-52bb506c6932/image.png)

## Links to Code

### Classes

- [ClaimsRequest](https://github.com/AzureAD/microsoft-authentication-library-for-android/blob/dev/msal/src/main/java/com/microsoft/identity/client/claims/ClaimsRequest.java)
- [RequestedClaim](https://github.com/AzureAD/microsoft-authentication-library-for-android/blob/dev/msal/src/main/java/com/microsoft/identity/client/claims/RequestedClaim.java)
- [RequestedClaimAdditionalInformation](https://github.com/AzureAD/microsoft-authentication-library-for-android/blob/dev/msal/src/main/java/com/microsoft/identity/client/claims/RequestedClaimAdditionalInformation.java)
- [WWWAuthenticateHeader](https://github.com/AzureAD/microsoft-authentication-library-for-android/blob/dev/msal/src/main/java/com/microsoft/identity/client/claims/WWWAuthenticateHeader.java)
75 changes: 75 additions & 0 deletions docs/commands.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# Commands & Command Dispatcher

## Introduction

MSAL uses the model view controller pattern for separating the UX (public API service) from the business logic (controller) used to service the API call. In addition MSAL wraps up each API call as a command in order to facilitate parallel execution and command result caching to ensure that clients are not in a position to accidentally hammer the service with too much load by making the same request over and over again.

## Class Diagrams

### Controllers

The MSAL controllers address two different scenarios:

- Broker Not Installed on Device or App Not Eligible to use broker
- LocalMSALController
- Broker installed on device and app eligible to use broker
- BrokerMsalController

>Note: In the case of silent requests it's possible for the command to attempt to leverage both controllers when attempting to service the request.
![Controller Class Diagram](https://www.lucidchart.com/publicSegments/view/8dd3ceb4-d209-4f23-9713-34ed80011cf6/image.png)

### Commands

The MSAL commands include the following:

- Controller or Controllers invoked to execute the command
- The parameters specific to the command
- The callback to notify of the command result
- An indicator of whether the command is eligible for caching

> The hashCode of the command is used from within the CommandResultCache. Ensure that any changes to the attributes of the command object are reflected in the calculation of getHashCode
![Commands Class Diagram](https://www.lucidchart.com/publicSegments/view/5593d30e-e10e-4e4d-8c34-c69b3479a25f/image.png)

### Operation Parameters

Operation parameters are provided via the public API and are passed to the controller by the command. These parameters inherit from OperationParameters; subtypes include:

- AcquireTokenSilentOperationParameters
- AcquireTokenInteractiveOperationParameters
- This includes the Android UI specific parameters include Activity

![Operation Parameters Class Diagram](https://www.lucidchart.com/publicSegments/view/0aaf4dd3-b8ab-49cc-96e8-af9f977a545a/image.png)

### Command Dispatcher & Command Cache

The command dispatcher is responsible for:

- Determining if the command is already executing and throwing a duplicate command exception if so
- Executing the command in a specific thread pool appropriate for the type of command. For example: Interactive commands are serialized. Silent commands are run in parallel.
- Check a command result cache which keeps command results from prior executions for up to 30 seconds
- Cache command results
- Notify via the callback provided to the command the result of the command

![Command dispatcher class diagram](https://www.lucidchart.com/publicSegments/view/5895956d-b887-42dc-8603-26aff8f59489/image.png)

## Interaction Diagram

Below is an example of the public client application making a silent token request to the command dispatcher.

### Calling Dispatcher

![calling command dispatcher](https://www.lucidchart.com/publicSegments/view/01e3ec3a-6b84-4c1b-8c7d-49d02a892dca/image.png)

## Links to Code

### Classes

- [CommandDispatcher](https://github.com/AzureAD/microsoft-authentication-library-common-for-android/blob/dev/common/src/main/java/com/microsoft/identity/common/internal/controllers/CommandDispatcher.java)
- [BaseCommand](https://github.com/AzureAD/microsoft-authentication-library-common-for-android/blob/dev/common/src/main/java/com/microsoft/identity/common/internal/controllers/BaseCommand.java)
- [BaseController](https://github.com/AzureAD/microsoft-authentication-library-common-for-android/blob/dev/common/src/main/java/com/microsoft/identity/common/internal/controllers/BaseController.java)
- [CommandResult](https://github.com/AzureAD/microsoft-authentication-library-common-for-android/blob/dev/common/src/main/java/com/microsoft/identity/common/internal/controllers/CommandResult.java)
- [CommandResultCacheItem](https://github.com/AzureAD/microsoft-authentication-library-common-for-android/blob/dev/common/src/main/java/com/microsoft/identity/common/internal/controllers/CommandResultCacheItem.java)
- [CommandResultCache](https://github.com/AzureAD/microsoft-authentication-library-common-for-android/blob/dev/common/src/main/java/com/microsoft/identity/common/internal/controllers/CommandResultCache.java)
- [TokenCommand](https://github.com/AzureAD/microsoft-authentication-library-common-for-android/blob/dev/common/src/main/java/com/microsoft/identity/common/internal/controllers/TokenCommand.java)
17 changes: 17 additions & 0 deletions docs/configuration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Public Client Application Configuration

## Introduction

> PENDING
## Class Diagram

> PENDING
## Interaction Diagram

> PENDING
## Links to Code

> PENDING
17 changes: 17 additions & 0 deletions docs/controllers.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Controllers

## Introduction

> PENDING
## Class Diagram

> PENDING
## Interaction Diagram

> PENDING
## Links to Code

> PENDING
43 changes: 43 additions & 0 deletions docs/home.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Design documentation for the Microsoft Authentication Library (MSAL) and Common library

## Introduction

This documentation provides orientation for new contributors to understand the design and design goals of the MSAL and the Common library supporting both MSAL and the Microsoft authentication broker libraries.

> NOTE: The Microsoft authentication broker library is currently private.
## Android Libraries

MSAL consists of 2 Android Libraries/Packages:

- com.microsoft.identity.client.msal
- github: [https://github.com/AzureAD/microsoft-authentication-library-for-android](https://github.com/AzureAD/microsoft-authentication-library-for-android)
- com.microsoft.identity.common
- github: [https://github.com/AzureAD/microsoft-authentication-library-common-for-android](https://github.com/AzureAD/microsoft-authentication-library-common-for-android)

Where MSAL depends on common for definition of abstractions and of the identity provider specific implementation.

## Component Overview Diagram

The following component diagram illustrates the components of the library and the dependencies between them. Abstract components are marked as with the "abstract" annotation. Each component and group of components will be covered in more detail in separate documents linked below.

![MSAL Component Diagram](https://www.lucidchart.com/publicSegments/view/88a1bca3-18ab-4eac-aa4f-ba85d4d214f6/image.png)

## Component Detailed Documentation

### MSAL & Common

- [Public Client Application Configuration](configuration.md)
- [PublicClientApplication Factory Methods & Subtypes](publicclientapplication.md)
- [MsalException & Subtypes](msalexception.md)
- [Parameters and Command Parameter Adapters](parameters.md)
- [Commands & Command Dispatcher & Throttling](commands.md)
- [Controllers](controllers.md)
- [Identity Providers & Authorities](authorities.md)
- [OAuth2 Strategies](oauth2strategies.md)
- [Authorization Strategies](authorizationstrategies.md)
- [Broker Client Strategies](brokerstrategies.md)
- [Token Cache](tokencache.md)
- [Logging](logging.md)
- [Telemetry](telemetry.md)
- [Unit and Integration Tests with Robolectric](testing.md)
Binary file added docs/images/MSAL_Components.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions docs/logging.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Logging

## Introduction

> PENDING
## Class Diagram

> PENDING
## Interaction Diagram

> PENDING
## Links to Code

> PENDING
17 changes: 17 additions & 0 deletions docs/msalexception.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# MsalException & Sub-types

## Introduction

> PENDING
## Class Diagram

> PENDING
## Interaction Diagram

> PENDING
## Links to Code

> PENDING
17 changes: 17 additions & 0 deletions docs/oauth2strategies.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# OAuth2 Strategies

## Introduction

> PENDING
## Class Diagram

> PENDING
## Interaction Diagram

> PENDING
## Links to Code

> PENDING
Loading

0 comments on commit 9e17b2c

Please sign in to comment.