-
Notifications
You must be signed in to change notification settings - Fork 329
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added basic support for OpenID Connect. (#756)
- Loading branch information
Showing
6 changed files
with
184 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
export interface OpenIdConnectMetadata { | ||
/** | ||
* e.g. "https://sts.windows.net/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx". | ||
*/ | ||
issuer: string; | ||
|
||
/** | ||
* e.g. "https://login.microsoftonline.com/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/oauth2/v2.0/authorize". | ||
*/ | ||
authorization_endpoint: string; | ||
|
||
/** | ||
* e.g. "https://login.microsoftonline.com/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/oauth2/token". | ||
*/ | ||
token_endpoint: string; | ||
|
||
/** | ||
* e.g. "openid". | ||
*/ | ||
scopes_supported: string[]; | ||
|
||
/** | ||
* e.g. "code", "id_token", "code id_token", "token id_token", "token". | ||
*/ | ||
response_types_supported: string[]; | ||
|
||
/** | ||
* e.g. "query", "fragment", "form_post". | ||
*/ | ||
response_modes_supported: string[]; | ||
|
||
/** | ||
* e.g. "authorization_code", "implicit". | ||
*/ | ||
grant_types_supported: string[]; | ||
|
||
/** | ||
* e.g. "client_secret_post", "private_key_jwt", "client_secret_basic". | ||
*/ | ||
token_endpoint_auth_methods_supported: string[]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { ArmResource } from "./armResource"; | ||
|
||
/** | ||
* OpenId Connect Provider details. | ||
*/ | ||
export interface OpenIdConnectProviderContract extends ArmResource { | ||
properties: OpenIdConnectProviderProperties; | ||
} | ||
|
||
export interface OpenIdConnectProviderProperties { | ||
/** | ||
* User-friendly OpenID Connect Provider name. | ||
*/ | ||
displayName: string; | ||
|
||
/** | ||
* User-friendly description of OpenID Connect Provider. | ||
*/ | ||
description: string; | ||
|
||
/** | ||
* Metadata endpoint URI. | ||
*/ | ||
metadataEndpoint: string; | ||
|
||
/** | ||
* Client ID of developer console which is the client application. | ||
*/ | ||
clientId: string; | ||
|
||
/** | ||
* Client Secret of developer console which is the client application. | ||
*/ | ||
clientSecret: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import { OpenIdConnectProviderContract } from "../contracts/openIdConnectProvider"; | ||
|
||
export class OpenIdConnectProvider { | ||
constructor(contract: OpenIdConnectProviderContract) { | ||
this.name = contract.name; | ||
this.displayName = contract.properties.displayName; | ||
this.description = contract.properties.description; | ||
this.clientId = contract.properties.clientId; | ||
this.metadataEndpoint = contract.properties.metadataEndpoint; | ||
} | ||
|
||
/** | ||
* Resource name. | ||
*/ | ||
public name: string; | ||
|
||
/** | ||
* User-friendly OpenID Connect Provider name. | ||
*/ | ||
public displayName: string; | ||
|
||
/** | ||
* User-friendly description of OpenID Connect Provider. | ||
*/ | ||
public description: string; | ||
|
||
/** | ||
* Metadata endpoint URI. | ||
*/ | ||
public metadataEndpoint: string; | ||
|
||
/** | ||
* Client ID of developer console which is the client application. | ||
*/ | ||
|
||
public clientId: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters