Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Identity] [localhost to cloud proposal] @azure/identity-spa #21028

Closed
wants to merge 14 commits into from
139 changes: 139 additions & 0 deletions common/config/rush/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions rush.json
Expand Up @@ -551,6 +551,11 @@
"projectFolder": "sdk/identity/identity-vscode",
"versionPolicyName": "client"
},
{
"packageName": "@azure/identity-spa",
"projectFolder": "sdk/identity/identity-spa",
"versionPolicyName": "client"
},
{
"packageName": "@azure/identity-cache-persistence",
"projectFolder": "sdk/identity/identity-cache-persistence",
Expand Down
1 change: 1 addition & 0 deletions sdk/core/core-client/review/core-client.api.md
Expand Up @@ -321,6 +321,7 @@ export interface SerializerOptions {
export class ServiceClient {
constructor(options?: ServiceClientOptions);
readonly pipeline: Pipeline;
readonly scopes?: string[];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The authenticate method requires user to pass in the scope

  • this is a way for the user to retrieve the scope from the client.

sendOperationRequest<T>(operationArguments: OperationArguments, operationSpec: OperationSpec): Promise<T>;
sendRequest(request: PipelineRequest): Promise<PipelineResponse>;
}
Expand Down
5 changes: 5 additions & 0 deletions sdk/core/core-client/src/serviceClient.ts
Expand Up @@ -81,6 +81,11 @@ export class ServiceClient {
*/
public readonly pipeline: Pipeline;

/**
* Exposes the scope that should be used when authenticating.
*/
public readonly scopes?: string[];

/**
* The ServiceClient constructor
* @param credential - The credentials used for authentication with the service.
Expand Down
7 changes: 7 additions & 0 deletions sdk/identity/identity-spa/CHANGELOG.md
@@ -0,0 +1,7 @@
# Release History

## 1.0.0-beta.1 (unknown)

### New features

- This release marks the initial beta availability of the `@azure/identity-spa` package. This package provides two credentials for the browser `RedirectCredential` and `PopupCredential`. Both credentials simplify browser authentication with Azure Active Directory.
21 changes: 21 additions & 0 deletions sdk/identity/identity-spa/LICENSE
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2022 Microsoft

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.