Skip to content

Commit

Permalink
Remove support for macOS 32-bit Applications
Browse files Browse the repository at this point in the history
– Revert 8e4af3f.
– Remove code to support 32-bit macOS from newer classes.

32-bit support is being discontinued by Apple ("At our Worldwide Developers Conference in 2017, Apple informed developers that macOS High Sierra would be the last version of macOS to run 32-bit apps without compromise.") https://support.apple.com/en-us/HT208436. 32-bit support places a burden on AppAuth maintainers to continue supporting it, and given it has no future there's little reason to continue maintaining that code. Developers who need 32-bit support may continue to use the last version of AppAuth which included 32-bit support.
  • Loading branch information
WilliamDenniss committed Jul 13, 2018
1 parent b8c893f commit eb59c89
Show file tree
Hide file tree
Showing 43 changed files with 94 additions and 349 deletions.
4 changes: 0 additions & 4 deletions AppAuth.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1908,7 +1908,6 @@
340DAE551D58216A00EC285B /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
CLANG_ANALYZER_NONNULL = YES;
CODE_SIGN_IDENTITY = "-";
EXECUTABLE_PREFIX = lib;
Expand All @@ -1921,7 +1920,6 @@
340DAE561D58216A00EC285B /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
CLANG_ANALYZER_NONNULL = YES;
CODE_SIGN_IDENTITY = "-";
EXECUTABLE_PREFIX = lib;
Expand Down Expand Up @@ -2398,7 +2396,6 @@
343AAAD41E8348AA00F9D36E /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
CLANG_ANALYZER_NONNULL = YES;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CODE_SIGN_IDENTITY = "-";
Expand All @@ -2424,7 +2421,6 @@
343AAAD51E8348AA00F9D36E /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
CLANG_ANALYZER_NONNULL = YES;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CODE_SIGN_IDENTITY = "-";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,6 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 7FF583C8F7036437BE8875B3 /* Pods-Example-macOS.debug.xcconfig */;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
COMBINE_HIDPI_IMAGES = YES;
INFOPLIST_FILE = "$(SRCROOT)/Source/Info.plist";
Expand All @@ -456,7 +455,6 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 60553B3AB5BA3E1BB259E487 /* Pods-Example-macOS.release.xcconfig */;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
COMBINE_HIDPI_IMAGES = YES;
INFOPLIST_FILE = "$(SRCROOT)/Source/Info.plist";
Expand All @@ -476,7 +474,6 @@
341AA4C81E7F2E5000FCA5C6 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
F6016E6B1D2AC11E003497D7 /* Build configuration list for PBXProject "Example-macOS" */ = {
isa = XCConfigurationList;
Expand Down
16 changes: 1 addition & 15 deletions Examples/Example-macOS/Source/AppAuthExampleViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,26 +20,12 @@
@class AppDelegate;
@class OIDAuthState;
@class OIDServiceConfiguration;
@class OIDRedirectHTTPHandler;

NS_ASSUME_NONNULL_BEGIN

/*! @brief The example application's view controller.
*/
@interface AppAuthExampleViewController : NSViewController {
// private variables
OIDRedirectHTTPHandler *_redirectHTTPHandler;
// property variables
NSButton *_authAutoButton;
NSButton *_authManual;
NSButton *_authAutoHTTPButton;
NSButton *_codeExchangeButton;
NSButton *_userinfoButton;
NSButton *_clearAuthStateButton;
NSTextView *_logTextView;
__weak AppDelegate *_appDelegate;
OIDAuthState *_authState;
}
@interface AppAuthExampleViewController : NSViewController

@property(nullable) IBOutlet NSButton *authAutoButton;
@property(nullable) IBOutlet NSButton *authManual;
Expand Down
14 changes: 3 additions & 11 deletions Examples/Example-macOS/Source/AppAuthExampleViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -60,17 +60,9 @@
@interface AppAuthExampleViewController () <OIDAuthStateChangeDelegate, OIDAuthStateErrorDelegate>
@end

@implementation AppAuthExampleViewController

@synthesize authAutoButton = _authAutoButton;
@synthesize authManual = _authManual;
@synthesize authAutoHTTPButton = _authAutoHTTPButton;
@synthesize codeExchangeButton = _codeExchangeButton;
@synthesize userinfoButton = _userinfoButton;
@synthesize clearAuthStateButton = _clearAuthStateButton;
@synthesize logTextView = _logTextView;
@synthesize appDelegate = _appDelegate;
@synthesize authState = _authState;
@implementation AppAuthExampleViewController {
OIDRedirectHTTPHandler *_redirectHTTPHandler;
}

- (void)viewDidLoad {
[super viewDidLoad];
Expand Down
8 changes: 1 addition & 7 deletions Examples/Example-macOS/Source/AppDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,7 @@ NS_ASSUME_NONNULL_BEGIN
/*! @class AppDelegate
@brief The example application's delegate.
*/
@interface AppDelegate : NSObject <NSApplicationDelegate> {
// property variables
NSWindow *_window;
id<OIDExternalUserAgentSession> _currentAuthorizationFlow;
}
@interface AppDelegate : NSObject <NSApplicationDelegate>

/*! @property currentAuthorizationFlow
@brief The authorization flow session which receives the return URL from the browser.
Expand All @@ -38,8 +34,6 @@ NS_ASSUME_NONNULL_BEGIN
*/
@property(nonatomic, strong, nullable) id<OIDExternalUserAgentSession> currentAuthorizationFlow;

@property(nullable) IBOutlet NSWindow *window;

@end

NS_ASSUME_NONNULL_END
7 changes: 4 additions & 3 deletions Examples/Example-macOS/Source/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@

NS_ASSUME_NONNULL_BEGIN

@implementation AppDelegate
@interface AppDelegate ()
@property(nullable) IBOutlet NSWindow *window;
@end

@synthesize window = _window;
@synthesize currentAuthorizationFlow = _currentAuthorizationFlow;
@implementation AppDelegate

- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
_window.title = @"AppAuth Example for macOS";
Expand Down
25 changes: 1 addition & 24 deletions Source/OIDAuthState.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,30 +51,7 @@ typedef void (^OIDAuthStateAuthorizationCallback)(OIDAuthState *_Nullable authSt
/*! @brief A convenience class that retains the auth state between @c OIDAuthorizationResponse%s
and @c OIDTokenResponse%s.
*/
@interface OIDAuthState : NSObject <NSSecureCoding> {
// private variables
/*! @brief Array of pending actions (use @c _pendingActionsSyncObject to synchronize access).
*/
NSMutableArray *_pendingActions;

/*! @brief Object for synchronizing access to @c pendingActions.
*/
id _pendingActionsSyncObject;

/*! @brief If YES, tokens will be refreshed on the next API call regardless of expiry.
*/
BOOL _needsTokenRefresh;

// property variables
NSString *_refreshToken;
NSString *_scope;
OIDAuthorizationResponse *_lastAuthorizationResponse;
OIDTokenResponse *_lastTokenResponse;
OIDRegistrationResponse *_lastRegistrationResponse;
NSError *_authorizationError;
__weak id<OIDAuthStateChangeDelegate> _stateChangeDelegate;
__weak id<OIDAuthStateErrorDelegate> _errorDelegate;
}
@interface OIDAuthState : NSObject <NSSecureCoding>

/*! @brief The most recent refresh token received from the server.
@discussion Rather than using this property directly, you should call
Expand Down
23 changes: 13 additions & 10 deletions Source/OIDAuthState.m
Original file line number Diff line number Diff line change
Expand Up @@ -92,16 +92,19 @@ - (void)didChangeState;
@end


@implementation OIDAuthState

@synthesize refreshToken = _refreshToken;
@synthesize scope = _scope;
@synthesize lastAuthorizationResponse = _lastAuthorizationResponse;
@synthesize lastTokenResponse = _lastTokenResponse;
@synthesize lastRegistrationResponse = _lastRegistrationResponse;
@synthesize authorizationError = _authorizationError;
@synthesize stateChangeDelegate = _stateChangeDelegate;
@synthesize errorDelegate = _errorDelegate;
@implementation OIDAuthState {
/*! @brief Array of pending actions (use @c _pendingActionsSyncObject to synchronize access).
*/
NSMutableArray *_pendingActions;

/*! @brief Object for synchronizing access to @c pendingActions.
*/
id _pendingActionsSyncObject;

/*! @brief If YES, tokens will be refreshed on the next API call regardless of expiry.
*/
BOOL _needsTokenRefresh;
}

#pragma mark - Convenience initializers

Expand Down
17 changes: 2 additions & 15 deletions Source/OIDAuthorizationRequest.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,21 +38,8 @@ extern NSString *const OIDOAuthorizationRequestCodeChallengeMethodS256;
@see https://tools.ietf.org/html/rfc6749#section-4
@see https://tools.ietf.org/html/rfc6749#section-4.1.1
*/
@interface OIDAuthorizationRequest : NSObject <NSCopying, NSSecureCoding, OIDExternalUserAgentRequest> {
// property variables
OIDServiceConfiguration *_configuration;
NSString *_responseType;
NSString *_clientID;
NSString *_clientSecret;
NSString *_scope;
NSURL *_redirectURL;
NSString *_state;
NSString *_nonce;
NSString *_codeVerifier;
NSString *_codeChallenge;
NSString *_codeChallengeMethod;
NSDictionary<NSString *, NSString *> *_additionalParameters;
}
@interface OIDAuthorizationRequest :
NSObject<NSCopying, NSSecureCoding, OIDExternalUserAgentRequest>

/*! @brief The service's configuration.
@remarks This configuration specifies how to connect to a particular OAuth provider.
Expand Down
13 changes: 0 additions & 13 deletions Source/OIDAuthorizationRequest.m
Original file line number Diff line number Diff line change
Expand Up @@ -95,19 +95,6 @@

@implementation OIDAuthorizationRequest

@synthesize configuration = _configuration;
@synthesize responseType = _responseType;
@synthesize clientID = _clientID;
@synthesize clientSecret = _clientSecret;
@synthesize scope = _scope;
@synthesize redirectURL = _redirectURL;
@synthesize state = _state;
@synthesize nonce = _nonce;
@synthesize codeVerifier = _codeVerifier;
@synthesize codeChallenge = _codeChallenge;
@synthesize codeChallengeMethod = _codeChallengeMethod;
@synthesize additionalParameters = _additionalParameters;

- (instancetype)init
OID_UNAVAILABLE_USE_INITIALIZER(
@selector(initWithConfiguration:
Expand Down
13 changes: 1 addition & 12 deletions Source/OIDAuthorizationResponse.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,7 @@ NS_ASSUME_NONNULL_BEGIN
@see https://tools.ietf.org/html/rfc6749#section-5.1
@see http://openid.net/specs/openid-connect-core-1_0.html#ImplicitAuthResponse
*/
@interface OIDAuthorizationResponse : NSObject <NSCopying, NSSecureCoding> {
// property variables
OIDAuthorizationRequest *_request;
NSString *_authorizationCode;
NSString *_state;
NSString *_accessToken;
NSDate *_accessTokenExpirationDate;
NSString *_tokenType;
NSString *_idToken;
NSString *_scope;
NSDictionary<NSString *, NSObject<NSCopying> *> *_additionalParameters;
}
@interface OIDAuthorizationResponse : NSObject <NSCopying, NSSecureCoding>

/*! @brief The request which was serviced.
*/
Expand Down
10 changes: 0 additions & 10 deletions Source/OIDAuthorizationResponse.m
Original file line number Diff line number Diff line change
Expand Up @@ -74,16 +74,6 @@

@implementation OIDAuthorizationResponse

@synthesize request = _request;
@synthesize authorizationCode = _authorizationCode;
@synthesize state = _state;
@synthesize accessToken = _accessToken;
@synthesize accessTokenExpirationDate = _accessTokenExpirationDate;
@synthesize tokenType = _tokenType;
@synthesize idToken = _idToken;
@synthesize scope = _scope;
@synthesize additionalParameters = _additionalParameters;

/*! @brief Returns a mapping of incoming parameters to instance variables.
@return A mapping of incoming parameters to instance variables.
*/
Expand Down
5 changes: 1 addition & 4 deletions Source/OIDAuthorizationService.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,7 @@ typedef void (^OIDRegistrationCompletion)(OIDRegistrationResponse *_Nullable reg
/*! @brief Performs various OAuth and OpenID Connect related calls via the user agent or
\NSURLSession.
*/
@interface OIDAuthorizationService : NSObject {
// property variables
OIDServiceConfiguration *_configuration;
}
@interface OIDAuthorizationService : NSObject

/*! @brief The service's configuration.
@remarks Each authorization service is initialized with a configuration. This configuration
Expand Down
15 changes: 6 additions & 9 deletions Source/OIDAuthorizationService.m
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,7 @@

NS_ASSUME_NONNULL_BEGIN

@interface OIDAuthorizationSession : NSObject<OIDExternalUserAgentSession> {
// private variables
OIDAuthorizationRequest *_request;
id<OIDExternalUserAgent> _externalUserAgent;
OIDAuthorizationCallback _pendingauthorizationFlowCallback;
}
@interface OIDAuthorizationSession : NSObject<OIDExternalUserAgentSession>

- (instancetype)init NS_UNAVAILABLE;

Expand All @@ -56,7 +51,11 @@ - (instancetype)initWithRequest:(OIDAuthorizationRequest *)request

@end

@implementation OIDAuthorizationSession
@implementation OIDAuthorizationSession {
OIDAuthorizationRequest *_request;
id<OIDExternalUserAgent> _externalUserAgent;
OIDAuthorizationCallback _pendingauthorizationFlowCallback;
}

- (instancetype)initWithRequest:(OIDAuthorizationRequest *)request {
self = [super init];
Expand Down Expand Up @@ -177,8 +176,6 @@ - (void)didFinishWithResponse:(nullable OIDAuthorizationResponse *)response

@implementation OIDAuthorizationService

@synthesize configuration = _configuration;

+ (void)discoverServiceConfigurationForIssuer:(NSURL *)issuerURL
completion:(OIDDiscoveryCallback)completion {
NSURL *fullDiscoveryURL =
Expand Down
7 changes: 1 addition & 6 deletions Source/OIDFieldMapping.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,7 @@ typedef _Nullable id(^OIDFieldMappingConversionFunction)(NSObject *_Nullable val
/*! @brief Describes the mapping of a key/value pair to an iVar with an optional conversion
function.
*/
@interface OIDFieldMapping : NSObject {
// property variables
NSString *_name;
Class _expectedType;
OIDFieldMappingConversionFunction _conversion;
}
@interface OIDFieldMapping : NSObject

/*! @brief The name of the instance variable the field should be mapped to.
*/
Expand Down
4 changes: 0 additions & 4 deletions Source/OIDFieldMapping.m
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@

@implementation OIDFieldMapping

@synthesize name = _name;
@synthesize expectedType = _expectedType;
@synthesize conversion = _conversion;

- (nonnull instancetype)init
OID_UNAVAILABLE_USE_INITIALIZER(@selector(initWithName:type:conversion:))

Expand Down
12 changes: 1 addition & 11 deletions Source/OIDIDToken.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,7 @@ NS_ASSUME_NONNULL_BEGIN
@see https://tools.ietf.org/html/rfc7519
@see https://jwt.io/
*/
@interface OIDIDToken : NSObject {
// property variables
NSDictionary *_header;
NSDictionary *_claims;
NSURL *_issuer;
NSString *_subject;
NSArray *_audience;
NSDate *_expiresAt;
NSDate *_issuedAt;
NSString *_nonce;
}
@interface OIDIDToken : NSObject

/*! @internal
@brief Unavailable. Please use @c initWithAuthorizationResponse:.
Expand Down
9 changes: 0 additions & 9 deletions Source/OIDIDToken.m
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,6 @@

@implementation OIDIDToken

@synthesize header = _header;
@synthesize claims = _claims;
@synthesize issuer = _issuer;
@synthesize subject = _subject;
@synthesize audience = _audience;
@synthesize expiresAt = _expiresAt;
@synthesize issuedAt = _issuedAt;
@synthesize nonce = _nonce;

- (instancetype)initWithIDTokenString:(NSString *)idToken {
self = [super init];
NSArray *sections = [idToken componentsSeparatedByString:@"."];
Expand Down
Loading

0 comments on commit eb59c89

Please sign in to comment.