Skip to content

Commit

Permalink
Merge branch '1-0-0' into 'main'
Browse files Browse the repository at this point in the history
1 0 0

See merge request fluxlabs/flux-eco/open-api-client!5
  • Loading branch information
mstuder committed Apr 26, 2022
2 parents cc65bfa + 12a4ee5 commit dc91906
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# CHANGELOG

## [1.0.2]
* change: env uses password secret file

## [1.0.1]
* updated tags

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "flux-eco/open-api-client",
"description": "Assists in querying openapis",
"version": "1.0.1",
"version": "1.0.2",
"type": "flux-app",
"keywords": [
"flux-eco",
Expand Down
5 changes: 3 additions & 2 deletions src/Env.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
class Env
{
public const OPEN_API_CLIENT_ID='OPEN_API_CLIENT_ID';
public const OPEN_API_SECRET='OPEN_API_SECRET';
public const OPEN_API_SECRET_FILE='OPEN_API_SECRET_FILE';
public const OPEN_API_SCOPE='OPEN_API_SCOPE';
public const OPEN_API_API_URL='OPEN_API_API_URL';
public const OPEN_API_AUTHENTICATION_URL='OPEN_API_AUTHENTICATION_URL';
Expand All @@ -28,7 +28,8 @@ public function getOpenApiClientId(): string {
}

public function getOpenApiSecret(): string {
return getenv($this->envPrefix.self::OPEN_API_SECRET);
$secretFile = getenv($this->envPrefix . self::OPEN_API_SECRET_FILE);
return filter_var(file_get_contents($secretFile), FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW);
}

public function getOpenApiScope(): string {
Expand Down

0 comments on commit dc91906

Please sign in to comment.