RVP_Cocoa_SDK_Login

public class RVP_Cocoa_SDK_Login : A_RVP_Cocoa_SDK_Security_Object

Public Properties and Calculated Properties

  • Declaration

    Swift

    override public var asDictionary: [String : Any?] { get }

    Return Value

    all of the values for this object, as a Dictionary. READ ONLY

  • NOTE: Although this will let anyone with write permission set the ID, it will not be accepted on the server, unless the admin also has at least read permissions for the user object.

    Declaration

    Swift

    public var userObjectID: Int? { get set }

    Return Value

    the ID (Int) of any User Object associated with this login. nil, if there is none.

  • Declaration

    Swift

    public var isLoggedIn: Bool { get }

    Return Value

    true, if this login is currently logged in. READ ONLY

  • Declaration

    Swift

    public var isManager: Bool { get }

    Return Value

    true, if this login is a Manager login. READ ONLY

  • Declaration

    Swift

    public var isMainAdmin: Bool { get }

    Return Value

    true, if this login is a “God” (Main admin) login. READ ONLY

Public Instance Methods

  • This is the default initializer.

    Declaration

    Swift

    public override init(sdkInstance inSDKInstance: RVP_Cocoa_SDK?, objectInfoData inData: [String : Any])

    Parameters

    sdkInstance

    REQUIRED (Can be nil) This is the SDK instance that “owns” this object. It may be nil for history instances.

    objectInfoData

    REQUIRED This is the parsed JSON data for this object, as a Dictionary.

  • Password changes are write-only. We can’t see existing passwords, only send a new one.

    Declaration

    Swift

    public func changePasswordTo(_ inPassword: String)
  • This is called to convert this login to a manager.

    Declaration

    Swift

    public func convertLoginToManager(refCon inRefCon: Any?)

    Parameters

    refCon

    This is an optional Any parameter that is simply returned after the call is complete. “refCon” is a very old concept, that stands for “Reference Context.” It allows the caller of an async operation to attach context to a call.

  • This is called to convert this login to a standard user.

    Declaration

    Swift

    public func convertLoginToUser(refCon inRefCon: Any?)

    Parameters

    refCon

    This is an optional Any parameter that is simply returned after the call is complete. “refCon” is a very old concept, that stands for “Reference Context.” It allows the caller of an async operation to attach context to a call.