ZDCLocalUserAuth

@interface ZDCLocalUserAuth <NSCoding, NSCopying>

Encapsulates the information necessary to authenticate the localUser with various systems.

  • Matches ZDDLocalUser.uuid, which is the global userID for the user throughout the ZeroDark ecosystem.

    Declaration

    Objective-C

    @property (readwrite, copy, nonatomic) NSString *localUserID;

    Swift

    var localUserID: String! { get set }
  • Part of the credentials used by AWS.

    Declaration

    Objective-C

    @property (readwrite, copy, nonatomic) NSString *aws_accessKeyID;

    Swift

    var aws_accessKeyID: String! { get set }
  • Part of the credentials used by AWS.

    Declaration

    Objective-C

    @property (readwrite, copy, nonatomic) NSString *aws_secret;

    Swift

    var aws_secret: String! { get set }
  • Part of the credentials used by AWS.

    Declaration

    Objective-C

    @property (readwrite, copy, nonatomic) NSString *aws_session;

    Swift

    var aws_session: String! { get set }
  • The AWS credentials are only valid for a short period of time. (usually just a few hours) This property stores when they expire, so we know if we can re-use them, or if we need to refresh them.

    Declaration

    Objective-C

    @property (readwrite, copy, nonatomic) NSDate *aws_expiration;

    Swift

    var aws_expiration: Date! { get set }
  • Used for Auth0, which is our identity broker (for now).

    This property can be exchanged for a fresh idToken from Auth0. And idToken is a JWT, that can itself be exchanged for AWS credentials.

    Declaration

    Objective-C

    @property (readwrite, copy, nonatomic) NSString *auth0_refreshToken;

    Swift

    var auth0_refreshToken: String! { get set }
  • An idToken is a JWT that can be exchanged for AWS credentials.

    These tokens have an expiration date, and therefore need to be regularly refreshed.

    Declaration

    Objective-C

    @property (readwrite, copy, nonatomic) NSString *auth0_idToken;

    Swift

    var auth0_idToken: String! { get set }