Skip to content

Commit 23bedd8

Browse files
committed
Add Sso Oidc Client
1 parent d11b2c3 commit 23bedd8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+1488
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ See full documentation on [https://async-aws.com](https://async-aws.com).
4646
| [async-aws/sqs](https://github.com/async-aws/sqs) | [![Latest Stable Version](https://poser.pugx.org/async-aws/sqs/v/stable)](https://packagist.org/packages/async-aws/sqs) [![Total Downloads](https://poser.pugx.org/async-aws/sqs/downloads)](https://packagist.org/packages/async-aws/sqs) | [![](https://github.com/async-aws/sqs/workflows/BC%20Check/badge.svg?branch=master)](https://github.com/async-aws/sqs/actions) | [![](https://async-aws-pr.github.io/commits-since-release-counter/sqs.svg)](https://github.com/async-aws/sqs/releases) |
4747
| [async-aws/ssm](https://github.com/async-aws/ssm) | [![Latest Stable Version](https://poser.pugx.org/async-aws/ssm/v/stable)](https://packagist.org/packages/async-aws/ssm) [![Total Downloads](https://poser.pugx.org/async-aws/ssm/downloads)](https://packagist.org/packages/async-aws/ssm) | [![](https://github.com/async-aws/ssm/workflows/BC%20Check/badge.svg?branch=master)](https://github.com/async-aws/ssm/actions) | [![](https://async-aws-pr.github.io/commits-since-release-counter/ssm.svg)](https://github.com/async-aws/ssm/releases) |
4848
| [async-aws/sso](https://github.com/async-aws/sso) | [![Latest Stable Version](https://poser.pugx.org/async-aws/sso/v/stable)](https://packagist.org/packages/async-aws/sso) [![Total Downloads](https://poser.pugx.org/async-aws/sso/downloads)](https://packagist.org/packages/async-aws/sso) | [![](https://github.com/async-aws/sso/workflows/BC%20Check/badge.svg?branch=master)](https://github.com/async-aws/sso/actions) | [![](https://async-aws-pr.github.io/commits-since-release-counter/sso.svg)](https://github.com/async-aws/sso/releases) |
49+
| [async-aws/sso-oidc](https://github.com/async-aws/sso-oidc) | [![Latest Stable Version](https://poser.pugx.org/async-aws/sso-oidc/v/stable)](https://packagist.org/packages/async-aws/sso-oidc) [![Total Downloads](https://poser.pugx.org/async-aws/sso-oidc/downloads)](https://packagist.org/packages/async-aws/sso-oidc) | [![](https://github.com/async-aws/sso-oidc/workflows/BC%20Check/badge.svg?branch=master)](https://github.com/async-aws/sso-oidc/actions) | [![](https://async-aws-pr.github.io/commits-since-release-counter/sso-oidc.svg)](https://github.com/async-aws/sso-oidc/releases) |
4950
| [async-aws/step-functions](https://github.com/async-aws/step-functions) | [![Latest Stable Version](https://poser.pugx.org/async-aws/step-functions/v/stable)](https://packagist.org/packages/async-aws/step-functions) [![Total Downloads](https://poser.pugx.org/async-aws/step-functions/downloads)](https://packagist.org/packages/async-aws/step-functions) | [![](https://github.com/async-aws/step-functions/workflows/BC%20Check/badge.svg?branch=master)](https://github.com/async-aws/step-functions/actions) | [![](https://async-aws-pr.github.io/commits-since-release-counter/step-functions.svg)](https://github.com/async-aws/step-functions/releases) |
5051
| [async-aws/timestream-query](https://github.com/async-aws/timestream-query) | [![Latest Stable Version](https://poser.pugx.org/async-aws/timestream-query/v/stable)](https://packagist.org/packages/async-aws/timestream-query) [![Total Downloads](https://poser.pugx.org/async-aws/timestream-query/downloads)](https://packagist.org/packages/async-aws/timestream-query) | [![](https://github.com/async-aws/timestream-query/workflows/BC%20Check/badge.svg?branch=master)](https://github.com/async-aws/timestream-query/actions) | [![](https://async-aws-pr.github.io/commits-since-release-counter/timestream-query.svg)](https://github.com/async-aws/timestream-query/releases) |
5152
| [async-aws/timestream-write](https://github.com/async-aws/timestream-write) | [![Latest Stable Version](https://poser.pugx.org/async-aws/timestream-write/v/stable)](https://packagist.org/packages/async-aws/timestream-write) [![Total Downloads](https://poser.pugx.org/async-aws/timestream-write/downloads)](https://packagist.org/packages/async-aws/timestream-write) | [![](https://github.com/async-aws/timestream-write/workflows/BC%20Check/badge.svg?branch=master)](https://github.com/async-aws/timestream-write/actions) | [![](https://async-aws-pr.github.io/commits-since-release-counter/timestream-write.svg)](https://github.com/async-aws/timestream-write/releases) |

composer.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@
8989
"AsyncAws\\Sqs\\": "src/Service/Sqs/src",
9090
"AsyncAws\\Ssm\\": "src/Service/Ssm/src",
9191
"AsyncAws\\Sso\\": "src/Service/Sso/src",
92+
"AsyncAws\\SsoOidc\\": "src/Service/SsoOidc/src",
9293
"AsyncAws\\StepFunctions\\": "src/Service/StepFunctions/src",
9394
"AsyncAws\\Symfony\\Bundle\\": "src/Integration/Symfony/Bundle/src",
9495
"AsyncAws\\TimestreamQuery\\": "src/Service/TimestreamQuery/src",
@@ -140,6 +141,7 @@
140141
"AsyncAws\\Sqs\\Tests\\": "src/Service/Sqs/tests",
141142
"AsyncAws\\Ssm\\Tests\\": "src/Service/Ssm/tests",
142143
"AsyncAws\\Sso\\Tests\\": "src/Service/Sso/tests",
144+
"AsyncAws\\SsoOidc\\Tests\\": "src/Service/SsoOidc/tests",
143145
"AsyncAws\\StepFunctions\\Tests\\": "src/Service/StepFunctions/tests",
144146
"AsyncAws\\Symfony\\Bundle\\Tests\\": "src/Integration/Symfony/Bundle/tests",
145147
"AsyncAws\\Test\\": "tests",

couscous.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,9 @@ menu:
136136
sso:
137137
text: SSO
138138
url: /clients/sso.html
139+
sso-oidc:
140+
text: SSOOIDC
141+
url: /clients/sso-oidc.html
139142
sts:
140143
text: STS
141144
url: /clients/sts.html

docs/clients/index.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ for more information.
150150
| [Comprehend](./comprehend.md) | [async-aws/comprehend](https://packagist.org/packages/async-aws/comprehend) |
151151
| [DynamoDb](./dynamodb.md) | [async-aws/dynamo-db](https://packagist.org/packages/async-aws/dynamo-db) |
152152
| [ECR](./ecr.md) | [async-aws/ecr](https://packagist.org/packages/async-aws/ecr) |
153-
| [ElastiCache](./elasti-cache.md) | [async-aws/elasti-cache](https://packagist.org/packages/async-aws/elasti-cache) |
153+
| [ElastiCache](./elasti-cache.md) | [async-aws/elasti-cache](https://packagist.org/packages/async-aws/elasti-cache) |
154154
| [EventBridge](./event-bridge.md) | [async-aws/event-bridge](https://packagist.org/packages/async-aws/event-bridge) |
155155
| [Firehose](./firehose.md) | [async-aws/event-bridge](https://packagist.org/packages/async-aws/firehose) |
156156
| [IAM](./iam.md) | [async-aws/iam](https://packagist.org/packages/async-aws/iam) |
@@ -172,6 +172,7 @@ for more information.
172172
| [SQS](./sqs.md) | [async-aws/sqs](https://packagist.org/packages/async-aws/sqs) |
173173
| [SSM](./ssm.md) | [async-aws/ssm](https://packagist.org/packages/async-aws/ssm) |
174174
| [SSO](./sso.md) | [async-aws/sso](https://packagist.org/packages/async-aws/sso) |
175+
| [SSOOIDC](./sso-oidc.md) | [async-aws/sso-oidc](https://packagist.org/packages/async-aws/sso-oidc) |
175176
| [STS](./sts.md) | [async-aws/core](https://packagist.org/packages/async-aws/core) |
176177
| [StepFunctions](./step-functions.md) | [async-aws/step-functions](https://packagist.org/packages/async-aws/step-functions) |
177178
| [TimestreamQuery](./timestream-query.md) | [async-aws/timestream-query](https://packagist.org/packages/async-aws/timestream-query) |

docs/clients/sso-oidc.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
layout: client
3+
category: clients
4+
name: SSOOIDC
5+
package: async-aws/sso-oidc
6+
fqcn: AsyncAws\Sso\SsoOidcClient
7+
---
8+
9+
## Usage
10+
11+
### Create a token
12+
13+
```php
14+
use AsyncAws\SsoOidc\Input\CreateToken;
15+
use AsyncAws\SsoOidc\SsoOidcClient;
16+
17+
$client = new SsoOidcClient();
18+
19+
$result = $client->createToken(new CreateToken([
20+
'clientId' => 'YourClientId',
21+
'clientSecret' => 'YourClientSecret',
22+
'grantType' => 'authorization_code',
23+
]));
24+
25+
echo 'AccessToken:' . $result->getAccessToken().PHP_EOL;
26+
echo 'Expiration:' . $result->getExpiresIn().PHP_EOL;
27+
```

manifest.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -692,11 +692,22 @@
692692
"source": "https://raw.githubusercontent.com/aws/aws-sdk-php/${LATEST}/src/data/sso/2019-06-10/api-2.json",
693693
"documentation": "https://raw.githubusercontent.com/aws/aws-sdk-php/${LATEST}/src/data/sso/2019-06-10/docs-2.json",
694694
"pagination": "https://raw.githubusercontent.com/aws/aws-sdk-php/${LATEST}/src/data/sso/2019-06-10/paginators-1.json",
695+
"example": "https://raw.githubusercontent.com/aws/aws-sdk-php/${LATEST}/src/data/sso/2019-06-10/examples-1.json",
695696
"api-reference": "https://docs.aws.amazon.com/singlesignon/latest/PortalAPIReference",
696697
"methods": [
697698
"GetRoleCredentials"
698699
]
699700
},
701+
"SsoOidc": {
702+
"source": "https://raw.githubusercontent.com/aws/aws-sdk-php/${LATEST}/src/data/sso-oidc/2019-06-10/api-2.json",
703+
"documentation": "https://raw.githubusercontent.com/aws/aws-sdk-php/${LATEST}/src/data/sso-oidc/2019-06-10/docs-2.json",
704+
"pagination": "https://raw.githubusercontent.com/aws/aws-sdk-php/${LATEST}/src/data/sso-oidc/2019-06-10/paginators-1.json",
705+
"example": "https://raw.githubusercontent.com/aws/aws-sdk-php/${LATEST}/src/data/sso-oidc/2019-06-10/examples-1.json",
706+
"api-reference": "https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference",
707+
"methods": [
708+
"CreateToken"
709+
]
710+
},
700711
"Sts": {
701712
"source": "https://raw.githubusercontent.com/aws/aws-sdk-php/${LATEST}/src/data/sts/2011-06-15/api-2.json",
702713
"documentation": "https://raw.githubusercontent.com/aws/aws-sdk-php/${LATEST}/src/data/sts/2011-06-15/docs-2.json",

src/Core/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## NOT RELEASED
44

5+
### Added
6+
7+
- Support for SsoOidc
8+
59
### Changed
610

711
- AWS enhancement: Documentation updates.

src/Core/src/AwsClientFactory.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
use AsyncAws\Sqs\SqsClient;
4646
use AsyncAws\Ssm\SsmClient;
4747
use AsyncAws\Sso\SsoClient;
48+
use AsyncAws\SsoOidc\SsoOidcClient;
4849
use AsyncAws\StepFunctions\StepFunctionsClient;
4950
use AsyncAws\TimestreamQuery\TimestreamQueryClient;
5051
use AsyncAws\TimestreamWrite\TimestreamWriteClient;
@@ -533,6 +534,19 @@ public function sso(): SsoClient
533534
return $this->serviceCache[__METHOD__];
534535
}
535536

537+
public function ssoOidc(): SsoClient
538+
{
539+
if (!class_exists(SsoClient::class)) {
540+
throw MissingDependency::create('async-aws/sso', 'Sso');
541+
}
542+
543+
if (!isset($this->serviceCache[__METHOD__])) {
544+
$this->serviceCache[__METHOD__] = new SsoOidcClient($this->configuration, $this->credentialProvider, $this->httpClient, $this->logger);
545+
}
546+
547+
return $this->serviceCache[__METHOD__];
548+
}
549+
536550
public function sts(): StsClient
537551
{
538552
if (!isset($this->serviceCache[__METHOD__])) {

src/Integration/Symfony/Bundle/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## NOT RELEASED
44

5+
### Added
6+
7+
- Support for SSOOIDC
8+
59
## 1.12.3
610

711
### Changed

src/Integration/Symfony/Bundle/src/DependencyInjection/AwsPackagesProvider.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,10 @@ public static function getAllServices(): array
158158
'class' => \AsyncAws\Sso\SsoClient::class,
159159
'package' => 'async-aws/sso',
160160
],
161+
'sso_oidc' => [
162+
'class' => \AsyncAws\SsoOidc\SsoOidcClient::class,
163+
'package' => 'async-aws/sso-oidc',
164+
],
161165
'sts' => [
162166
'class' => \AsyncAws\Core\Sts\StsClient::class,
163167
'package' => 'async-aws/core',

0 commit comments

Comments
 (0)