Skip to content

Commit

Permalink
Merge branch 'main' into release/1.0.x
Browse files Browse the repository at this point in the history
  • Loading branch information
kober32 committed Oct 25, 2021
2 parents 7543f15 + cb46f7f commit b79806d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# PowerAuth Networking for Apple platforms.

[![build](https://github.com/wultra/networking-apple/actions/workflows/build.yml/badge.svg)](https://github.com/wultra/networking-apple/actions/workflows/build.yml) [![pod](https://img.shields.io/cocoapods/v/WultraPowerAuthNetworking)](https://cocoapods.org/pods/WultraMobileTokenSDK) ![date](https://img.shields.io/github/release-date/wultra/networking-apple) ![platform](https://img.shields.io/cocoapods/p/WultraPowerAuthNetworking) [![license](https://img.shields.io/github/license/wultra/networking-apple)](LICENSE)

A high-level networking SDK for PowerAuth-based endpoints.

Proper documentation will be added later. You can visit our [Mobile Token SDK for iOS](https://github.com/wultra/mtoken-sdk-ios) for reference implementation.
2 changes: 1 addition & 1 deletion WultraPowerAuthNetworking.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@
DC53E60B26DFD8520076AAFF /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1250;
LastUpgradeCheck = 1300;
TargetAttributes = {
DC53E61326DFD8520076AAFF = {
CreatedOnToolsVersion = 12.5;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1250"
LastUpgradeVersion = "1300"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
4 changes: 4 additions & 0 deletions WultraPowerauthNetworking/WPNHttpRequest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ class WPNHttpRequest<TRequest: WPNRequestBase, TResponse: WPNResponseBase> {
if let encryptor = encryptor {
if let cryptorgram = encryptor.encryptRequest(data) {
data = try? jsonEncoder.encode(E2EERequest(cryptogram: cryptorgram))
// Only add E2EE headers when the endpoint is not signed
if !needsSignature, let metadata = encryptor.associatedMetaData {
request.addValue(metadata.httpHeaderValue, forHTTPHeaderField: metadata.httpHeaderKey)
}
} else {
D.error("Failed to encrypt request with encryptor.")
}
Expand Down

0 comments on commit b79806d

Please sign in to comment.