Skip to content

Commit

Permalink
Merge pull request yourkarma#244 from lolgear/cleanup/spm/folders
Browse files Browse the repository at this point in the history
Cleanup. SPM. Folders.
  • Loading branch information
lolgear authored Feb 6, 2022
2 parents f991725 + eed5c21 commit 8414caf
Show file tree
Hide file tree
Showing 96 changed files with 254 additions and 296 deletions.
18 changes: 18 additions & 0 deletions Example/JWTSwiftUI/JWTSwiftUI.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
0A883ADD266E192500DAF016 /* HeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0A76C88322ABD2F200B8A43A /* HeaderView.swift */; };
0A883ADE266E192500DAF016 /* BottomView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0A76C88722ABE51800B8A43A /* BottomView.swift */; };
0A883ADF266E192500DAF016 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0A76C87322ABD2AF00B8A43A /* ContentView.swift */; };
0AABB95827A6A3C0006718A0 /* JWTDesktopSwiftToolkit in Frameworks */ = {isa = PBXBuildFile; productRef = 0AABB95727A6A3C0006718A0 /* JWTDesktopSwiftToolkit */; };
0AABB95A27A6A3C4006718A0 /* JWTDesktopSwiftToolkit in Frameworks */ = {isa = PBXBuildFile; productRef = 0AABB95927A6A3C4006718A0 /* JWTDesktopSwiftToolkit */; };
0AC002762786598E002167AD /* JWTDesktopSwiftToolkit in Frameworks */ = {isa = PBXBuildFile; productRef = 0AC002752786598E002167AD /* JWTDesktopSwiftToolkit */; };
/* End PBXBuildFile section */

Expand Down Expand Up @@ -89,13 +91,15 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
0AABB95A27A6A3C4006718A0 /* JWTDesktopSwiftToolkit in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
0A883AC9266E191700DAF016 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
0AABB95827A6A3C0006718A0 /* JWTDesktopSwiftToolkit in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -236,6 +240,9 @@
dependencies = (
);
name = iOSJWTSwiftUI;
packageProductDependencies = (
0AABB95927A6A3C4006718A0 /* JWTDesktopSwiftToolkit */,
);
productName = iOSJWTSwiftUI;
productReference = 0A883AB5266E166600DAF016 /* iOSJWTSwiftUI.app */;
productType = "com.apple.product-type.application";
Expand All @@ -253,6 +260,9 @@
dependencies = (
);
name = MacJWTSwiftUI;
packageProductDependencies = (
0AABB95727A6A3C0006718A0 /* JWTDesktopSwiftToolkit */,
);
productName = MacJWTSwiftUI;
productReference = 0A883ACC266E191700DAF016 /* MacJWTSwiftUI.app */;
productType = "com.apple.product-type.application";
Expand Down Expand Up @@ -667,6 +677,14 @@
/* End XCConfigurationList section */

/* Begin XCSwiftPackageProductDependency section */
0AABB95727A6A3C0006718A0 /* JWTDesktopSwiftToolkit */ = {
isa = XCSwiftPackageProductDependency;
productName = JWTDesktopSwiftToolkit;
};
0AABB95927A6A3C4006718A0 /* JWTDesktopSwiftToolkit */ = {
isa = XCSwiftPackageProductDependency;
productName = JWTDesktopSwiftToolkit;
};
0AC002752786598E002167AD /* JWTDesktopSwiftToolkit */ = {
isa = XCSwiftPackageProductDependency;
productName = JWTDesktopSwiftToolkit;
Expand Down
3 changes: 1 addition & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ let package = Package(
// Targets can depend on other targets in this package, and on products in packages which this package depends on.
.target(
name: "JWT",
dependencies: ["Base64"],
exclude: ["FrameworkSupplement"]
dependencies: ["Base64"]
),
.testTarget(
name: "JWTTests",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright © 2018 JWTIO. All rights reserved.
//

#import <JWT/JWTAlgorithmErrorDescription+Subclass.h>
#import "JWTAlgorithmErrorDescription+Subclass.h"

@implementation JWTAlgorithmErrorDescription (Subclass)
+ (NSString *)errorDomain {
Expand Down
4 changes: 2 additions & 2 deletions Sources/JWT/Algorithms/Base/JWTAlgorithmErrorDescription.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
// Copyright © 2018 JWTIO. All rights reserved.
//

#import <JWT/JWTAlgorithmErrorDescription.h>
#import <JWT/JWTAlgorithmErrorDescription+Subclass.h>
#import "JWTAlgorithmErrorDescription.h"
#import "JWTAlgorithmErrorDescription+Subclass.h"

@interface JWTAlgorithmErrorDescription (Keys)
+ (NSString *)currentErrorDescriptionKey;
Expand Down
12 changes: 6 additions & 6 deletions Sources/JWT/Algorithms/Base/JWTAlgorithmFactory.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
// Copyright © 2015 Karma. All rights reserved.
//

#import <JWT/JWTAlgorithmFactory.h>
#import <JWT/JWTAlgorithmHSBase.h>
#import <JWT/JWTAlgorithmRSBase.h>
#import <JWT/JWTAlgorithmNone.h>
#import <JWT/JWTAlgorithmAsymmetricBase.h>
#import <JWT/JWTBase64Coder.h>
#import "JWTAlgorithmFactory.h"
#import "JWTAlgorithmHSBase.h"
#import "JWTAlgorithmRSBase.h"
#import "JWTAlgorithmNone.h"
#import "JWTAlgorithmAsymmetricBase.h"
#import "JWTBase64Coder.h"

// not implemented.
// ES still not implemented. Look at implementation and readme in future releases.
Expand Down
2 changes: 1 addition & 1 deletion Sources/JWT/Algorithms/Base/JWTAlgorithmNone.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright © 2015 Karma. All rights reserved.
//

#import <JWT/JWTAlgorithmNone.h>
#import "JWTAlgorithmNone.h"
NSString *const JWTAlgorithmNameNone = @"none";

@implementation JWTAlgorithmNone
Expand Down
12 changes: 6 additions & 6 deletions Sources/JWT/Algorithms/ESFamily/JWTAlgorithmAsymmetricBase.m
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
// Created by Lobanov Dmitry on 12.03.2018.
//

#import <JWT/JWTAlgorithmAsymmetricBase.h>
#import <JWT/JWTBase64Coder.h>
#import <JWT/JWTCryptoSecurity.h>
#import <JWT/JWTCryptoKeyExtractor.h>
#import <JWT/JWTCryptoKey.h>
#import <JWT/JWTAlgorithmFactory.h>
#import "JWTAlgorithmAsymmetricBase.h"
#import "JWTBase64Coder.h"
#import "JWTCryptoSecurity.h"
#import "JWTCryptoKeyExtractor.h"
#import "JWTCryptoKey.h"
#import "JWTAlgorithmFactory.h"
#import <Availability.h>

#ifndef IPHONE_SDK_VERSION_GREATER_THAN_10
Expand Down
2 changes: 1 addition & 1 deletion Sources/JWT/Algorithms/ESFamily/JWTAlgorithmESBase.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//
//

#import <JWT/JWTAlgorithmESBase.h>
#import "JWTAlgorithmESBase.h"
#import <CommonCrypto/CommonCryptor.h>
NSString *const JWTAlgorithmNameES256 = @"ES256";
NSString *const JWTAlgorithmNameES384 = @"ES384";
Expand Down
4 changes: 2 additions & 2 deletions Sources/JWT/Algorithms/HSFamily/JWTAlgorithmHSBase.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
// Copyright © 2016 Karma. All rights reserved.
//

#import <JWT/JWTAlgorithmHSBase.h>
#import <JWT/JWTBase64Coder.h>
#import "JWTAlgorithmHSBase.h"
#import "JWTBase64Coder.h"
#import <CommonCrypto/CommonCrypto.h>
#import <CommonCrypto/CommonHMAC.h>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright © 2019 JWTIO. All rights reserved.
//

#import <JWT/JWTAlgorithmDataHolder+FluentStyle.h>
#import "JWTAlgorithmDataHolder+FluentStyle.h"

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wobjc-property-implementation"
Expand Down
16 changes: 8 additions & 8 deletions Sources/JWT/Algorithms/Holders/JWTAlgorithmDataHolder.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
// Copyright © 2016 Karma. All rights reserved.
//

#import <JWT/JWTAlgorithmDataHolder.h>
#import <JWT/JWTAlgorithmFactory.h>
#import <JWT/JWTAlgorithmNone.h>
#import <JWT/JWTRSAlgorithm.h>
#import <JWT/JWTAlgorithmHSBase.h>
#import <JWT/JWTAlgorithmRSBase.h>
#import <JWT/JWTBase64Coder.h>
#import <JWT/JWTCryptoKey.h>
#import "JWTAlgorithmDataHolder.h"
#import "JWTAlgorithmFactory.h"
#import "JWTAlgorithmNone.h"
#import "JWTRSAlgorithm.h"
#import "JWTAlgorithmHSBase.h"
#import "JWTAlgorithmRSBase.h"
#import "JWTBase64Coder.h"
#import "JWTCryptoKey.h"

@interface JWTAlgorithmBaseDataHolder()
// not needed by algorithm adoption.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright © 2016 Karma. All rights reserved.
//

#import <JWT/JWTAlgorithmDataHolderChain.h>
#import "JWTAlgorithmDataHolderChain.h"

@interface JWTAlgorithmDataHolderChain()

Expand Down
14 changes: 7 additions & 7 deletions Sources/JWT/Algorithms/RSFamily/JWTAlgorithmRSBase.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
// Copyright © 2016 Karma. All rights reserved.
//

#import <JWT/JWTAlgorithmRSBase.h>
#import <JWT/JWTBase64Coder.h>
#import <JWT/JWTCryptoSecurity.h>
#import <JWT/JWTCryptoKeyExtractor.h>
#import <JWT/JWTCryptoKey.h>
#import <JWT/JWTAlgorithmFactory.h>
#import "JWTAlgorithmRSBase.h"
#import "JWTBase64Coder.h"
#import "JWTCryptoSecurity.h"
#import "JWTCryptoKeyExtractor.h"
#import "JWTCryptoKey.h"
#import "JWTAlgorithmFactory.h"
#import <CommonCrypto/CommonCrypto.h>

#import <JWT/JWTAlgorithmErrorDescription+Subclass.h>
#import "JWTAlgorithmErrorDescription+Subclass.h"
NSString *const JWTAlgorithmRSFamilyErrorDomain = @"io.jwt.jwa.rs";

@implementation JWTAlgorithmRSFamilyErrorDescription
Expand Down
12 changes: 6 additions & 6 deletions Sources/JWT/Algorithms/RSFamily/RSKeys/JWTCryptoKey.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
// Copyright © 2017 JWTIO. All rights reserved.
//

#import <JWT/JWTCryptoKey.h>
#import <JWT/JWTCryptoSecurity.h>
#import <JWT/JWTCryptoSecurity+Extraction.h>
#import <JWT/JWTCryptoSecurity+ExternalRepresentation.h>
#import <JWT/JWTCryptoSecurity+ErrorHandling.h>
#import <JWT/JWTBase64Coder.h>
#import "JWTCryptoKey.h"
#import "JWTCryptoSecurity.h"
#import "JWTCryptoSecurity+Extraction.h"
#import "JWTCryptoSecurity+ExternalRepresentation.h"
#import "JWTCryptoSecurity+ErrorHandling.h"
#import "JWTBase64Coder.h"
@interface JWTCryptoKeyBuilder()
+ (NSString *)keyTypeRSA;
+ (NSString *)keyTypeEC;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright © 2019 JWTIO. All rights reserved.
//

#import <JWT/JWTCryptoKeyExtractor+FluentStyle.h>
#import "JWTCryptoKeyExtractor+FluentStyle.h"

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wobjc-property-implementation"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
// Copyright © 2017 JWTIO. All rights reserved.
//

#import <JWT/JWTCryptoKeyExtractor.h>
#import <JWT/JWTCryptoKey.h>
#import <JWT/JWTBase64Coder.h>
#import "JWTCryptoKeyExtractor.h"
#import "JWTCryptoKey.h"
#import "JWTBase64Coder.h"

@interface JWTCryptoKeyExtractor ()
@property (strong, nonatomic, readwrite) JWTCryptoKeyBuilder *internalKeyBuilder;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
// Copyright © 2018 JWTIO. All rights reserved.
//

#import <JWT/JWTCryptoSecurity+ErrorHandling.h>
#import <JWT/JWTDeprecations.h>
#import "JWTCryptoSecurity+ErrorHandling.h"
#import "JWTDeprecations.h"

@implementation JWTCryptoSecurity (ErrorHandling)
+ (NSError *)securityErrorWithOSStatus:(OSStatus)status {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright © 2018 JWTIO. All rights reserved.
//

#import <JWT/JWTCryptoSecurity+ExternalRepresentation.h>
#import "JWTCryptoSecurity+ExternalRepresentation.h"

@implementation JWTCryptoSecurity (ExternalRepresentation)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright © 2018 JWTIO. All rights reserved.
//

#import <JWT/JWTCryptoSecurity+Extraction.h>
#import "JWTCryptoSecurity+Extraction.h"
@implementation JWTCryptoSecurityComponent
- (instancetype)initWithContent:(NSString *)content type:(NSString *)type {
if (type == nil || content == nil) {
Expand Down
8 changes: 4 additions & 4 deletions Sources/JWT/Algorithms/RSFamily/RSKeys/JWTCryptoSecurity.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
// Copyright © 2017 JWTIO. All rights reserved.
//

#import <JWT/JWTCryptoSecurity.h>
#import <JWT/JWTCryptoSecurity+ErrorHandling.h>
#import <JWT/JWTErrorDescription.h>
#import <JWT/JWTDeprecations.h>
#import "JWTCryptoSecurity.h"
#import "JWTCryptoSecurity+ErrorHandling.h"
#import "JWTErrorDescription.h"
#import "JWTDeprecations.h"

@interface JWTMemoryLayout : NSObject
+ (NSString *)typeUInt8;
Expand Down
2 changes: 1 addition & 1 deletion Sources/JWT/ClaimSet/JWTClaim.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright © 2016 Karma. All rights reserved.
//

#import <JWT/JWTClaim.h>
#import "JWTClaim.h"

// TODO(3.0): Claim aud should check include in collection?
// Add claims specification tests.
Expand Down
2 changes: 1 addition & 1 deletion Sources/JWT/ClaimSet/JWTClaimBase.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright © 2020 JWTIO. All rights reserved.
//

#import <JWT/JWTClaimBase.h>
#import "JWTClaimBase.h"

@interface JWTClaimBase ()
@property (nonatomic, readwrite) NSObject *value;
Expand Down
2 changes: 1 addition & 1 deletion Sources/JWT/ClaimSet/JWTClaimSerializerBase.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright © 2021 JWTIO. All rights reserved.
//

#import <JWT/JWTClaimSerializerBase.h>
#import "JWTClaimSerializerBase.h"

@implementation JWTClaimSerializerBase

Expand Down
2 changes: 1 addition & 1 deletion Sources/JWT/ClaimSet/JWTClaimSerializerVariations.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright © 2021 JWTIO. All rights reserved.
//

#import <JWT/JWTClaimSerializerVariations.h>
#import "JWTClaimSerializerVariations.h"

@implementation JWTClaimSerializerVariations
+ (id<JWTClaimSerializerProtocol>)dateAndTimestampTransform {
Expand Down
2 changes: 1 addition & 1 deletion Sources/JWT/ClaimSet/JWTClaimVariations.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright © 2020 JWTIO. All rights reserved.
//

#import <JWT/JWTClaimVariations.h>
#import "JWTClaimVariations.h"

NSString *JWTRegisteredClaimNameIssuer = @"iss";
NSString *JWTRegisteredClaimNameSubject = @"sub";
Expand Down
2 changes: 1 addition & 1 deletion Sources/JWT/ClaimSet/JWTClaimVerifierBase.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright © 2021 JWTIO. All rights reserved.
//

#import <JWT/JWTClaimVerifierBase.h>
#import "JWTClaimVerifierBase.h"

@implementation JWTClaimVerifierBase
- (BOOL)verifyValue:(NSObject *)value withTrustedValue:(NSObject *)trustedValue {
Expand Down
2 changes: 1 addition & 1 deletion Sources/JWT/ClaimSet/JWTClaimVerifierVariations.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright © 2021 JWTIO. All rights reserved.
//

#import <JWT/JWTClaimVerifierVariations.h>
#import "JWTClaimVerifierVariations.h"

@implementation JWTClaimVerifierVariations
+ (id<JWTClaimVerifierProtocol>)issuer {
Expand Down
4 changes: 2 additions & 2 deletions Sources/JWT/ClaimSet/JWTClaimsProviderBase.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
// Copyright © 2021 JWTIO. All rights reserved.
//

#import <JWT/JWTClaimsProviderBase.h>
#import <JWT/JWTClaimVariations.h>
#import "JWTClaimsProviderBase.h"
#import "JWTClaimVariations.h"

@interface JWTClaimsProviderBase ()
@property (strong, nonatomic, readwrite) NSMutableDictionary <NSString *, id<JWTClaimProtocol>> *claimsAndNames;
Expand Down
2 changes: 1 addition & 1 deletion Sources/JWT/ClaimSet/JWTClaimsSet.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright (c) 2013 Karma. All rights reserved.
//

#import <JWT/JWTClaimsSet.h>
#import "JWTClaimsSet.h"

@implementation JWTClaimsSet

Expand Down
4 changes: 2 additions & 2 deletions Sources/JWT/ClaimSet/JWTClaimsSetBase.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
// Copyright © 2020 JWTIO. All rights reserved.
//

#import <JWT/JWTClaimsSetBase.h>
#import <JWT/JWTClaimVariations.h>
#import "JWTClaimsSetBase.h"
#import "JWTClaimVariations.h"

@interface JWTClaimsSetBase ()
@property (strong, nonatomic, readwrite) NSMutableDictionary <NSString *, id<JWTClaimProtocol>> *namesAndClaims;
Expand Down
Loading

0 comments on commit 8414caf

Please sign in to comment.