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

Update version to 3.0.0 to coincide with okta-mobile-swift release #105

Merged
merged 1 commit into from
Jul 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .githooks/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#!/bin/bash
#
# Pre-commit hook used to ensure changes to test configuration files
# are not inadvertently committed.

for argument in $(awk -F= '/E2E_.*=/ { print $2 }' Samples/Shared/TestConfiguration.xcconfig); do
if [[ ! -z $argument ]]; then
cat <<\EOF
Error: Attempt to commit changes to Samples/Shared/TestConfiguration.xcconfig

This can inadvertently leak secrets into the Git revision history. Please
reset this file to prevent submitting updates containing test configuration.
EOF
exit 1
fi
done

function checkPlist() {
local key=$1
local expect=$2
local value=$(plutil -extract "$key" raw -o - Samples/Shared/Okta.plist)

if [[ $value != $expect ]]; then
cat <<\EOF
Error: Attempt to commit changes to Samples/Shared/Okta.plist

This can inadvertently leak secrets into the Git revision history. Please
reset this file to prevent submitting updates containing test configuration.
EOF
exit 1
fi
}

if [[ -f Samples/Shared/Okta.plist ]]; then
checkPlist "clientId" "{clientId}"
checkPlist "issuer" "https://{orgDomain}/oauth2/default"
checkPlist "redirectUri" "{appScheme}:/callback"
checkPlist "logoutRedirectUri" "{appScheme}:/"
fi
4 changes: 2 additions & 2 deletions OktaIdx.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |spec|
spec.name = 'OktaIdx'
spec.version = '3.0.0-BETA'
spec.version = '3.0.0'
spec.summary = 'SDK to easily integrate the Okta Identity Engine'
spec.description = <<-DESC
Integrate your native app with Okta using the Okta Identity Engine library.
Expand All @@ -24,5 +24,5 @@ Integrate your native app with Okta using the Okta Identity Engine library.
spec.source_files = 'Sources/OktaIdx/**/*.swift'
spec.swift_version = "5.5"

spec.dependency "OktaAuthFoundation", "0.5.0"
spec.dependency "OktaAuthFoundation", "1.0.0"
end
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -620,6 +620,20 @@ class LoginManager: InteractionCodeFlowDelegate {

## Development

### Protecting Test Configuration

This repository contains common configuration files within `Samples/Shared` which are used to expose test credentials to automated tests as well as the sample applications.

* [TestConfiguration.xcconfig](Samples/Shared/TestConfiguration.xcconfig)

To protect against accidental changes being introduced to this file, it is recommended that you use the following command after cloning this repository:

```bash
git config core.hooksPath ./.githooks
```

This will run checks before committing changes to ensure confidential test configuration is not altered.

### Running Tests

To perform an end-to-end test, edit the `Samples/Shared/TestCredentials.xcconfig` to match your configuration as specified in the [prerequisites](#prerequisites). Next, you can run the test targets for both `okta-idx-ios` and `EmbeddedAuth` (in the [Samples/EmbeddedAuthWithSDKs](Samples/EmbeddedAuthWithSDKs) directory).
Expand Down