securityinterface

package
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 18, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Rendered for darwin/amd64

Overview

Package securityinterface provides a fluent Go API over the macOS SecurityInterface framework.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthorizationPluginView

type AuthorizationPluginView struct {
	// contains filtered or unexported fields
}

@class SFAuthorizationPluginView @abstract SFAuthorizationPluginView is a class that you can use to insert an NSView into AuthorizationPlugin interfaces. @discussion SFAuthorizationPluginView provides AuthorizationPlugin writers with an easy way to provide a user interface for their AuthorizationPlugin without having to duplicate the standard authentication dialog or the login window dialog. This class was designed to be subclassed by the AuthorizationPlugin writer. The following methods were designed to be overridden: buttonPressed:, didActivate, willActivateWithUser:, didDeactivate, firstKeyView, firstResponder, lastKeyView, setEnabled:, and viewForType:. In order to display the user interface, the AuthorizationPlugin should create an instance of your subclass and then call displayView. That will cause the appropriate dialog to be displayed and when credentials are needed, the overridden methods will be called in order to display the NSView provided by the subclass.

AuthorizationPluginView wraps raw.SFAuthorizationPluginView with a fluent Go API.

func AuthorizationPluginViewFromID

func AuthorizationPluginViewFromID(id objc.ID) *AuthorizationPluginView

AuthorizationPluginViewFromID adopts an existing object pointer as a AuthorizationPluginView (nil for 0).

func NewAuthorizationPluginViewWithCallbacksAndEngineRef

func NewAuthorizationPluginViewWithCallbacksAndEngineRef(callbacks unsafe.Pointer, engineRef unsafe.Pointer) *AuthorizationPluginView

@method initWithCallbacks:andEngineRef: @abstract The initialization method of this class. You must provide the callbacks and engineRef that were provided to the AuthorizationPlugin and AuthorizationMechanismRef. @param callbacks The AuthorizationCallbacks provided to the AuthorizationPlugin. @param engineRef The AuthorizationEngineRef provided to the AuthorizationMechanismRef.

NewAuthorizationPluginViewWithCallbacksAndEngineRef creates a new AuthorizationPluginView.

func (*AuthorizationPluginView) ButtonPressed

func (x *AuthorizationPluginView) ButtonPressed(inButtonType SFButtonType)

@method buttonPressed: @abstract When a user presses a button, this method will be called to inform the SFAuthorizationPluginView of the user's action. By default buttonPressed: will set a result of Deny when the OK or Login buttons are pressed. If a user has pressed Login or OK button was pressed, the subclass needs to set the context values for the short name of the user so that user attributes can be looked up. Use kAuthorizationEnvironmentUsername as the key. The subclass should also set any additional context values that are needed by the authentication plugin to verify the user's credentials. @param inButtonType the type of button that was pressed.

ButtonPressed calls the underlying ButtonPressed.

func (*AuthorizationPluginView) Callbacks

func (x *AuthorizationPluginView) Callbacks() unsafe.Pointer

@method callbacks @abstract An accessor method to the AuthorizationEngineRef provided to the init method. Use this to get the function pointers to SetResult, SetContextValue, etc. See the AuthorizationCallbacks documentation for more details.

Callbacks calls the underlying Callbacks.

func (*AuthorizationPluginView) DidActivate

func (x *AuthorizationPluginView) DidActivate()

@method didActivate @abstract Called when the user interface was made active by the AuthorizationPlugin.

DidActivate calls the underlying DidActivate.

func (*AuthorizationPluginView) DidDeactivate

func (x *AuthorizationPluginView) DidDeactivate()

@method didDeactivate @abstract Called when the user interface is deactivated by the AuthorizationPlugin.

DidDeactivate calls the underlying DidDeactivate.

func (*AuthorizationPluginView) DisplayView

func (x *AuthorizationPluginView) DisplayView()

@method displayView @abstract displayView is called in order to display the user interface provided by the subclass. If you subclass this method, be sure to call [super displayView]. displayView will raise an SFDisplayViewException exception if an error occurs displaying the authorization dialog.

DisplayView calls the underlying DisplayView.

func (*AuthorizationPluginView) EngineRef

func (x *AuthorizationPluginView) EngineRef() unsafe.Pointer

@method engineRef @abstract An accessor method to the AuthorizationEngineRef provided to the init method. Use this value when calling the functions of the AuthorizationCallbacks when you need to set the result or set a context value.

EngineRef calls the underlying EngineRef.

func (*AuthorizationPluginView) FirstKeyView

func (x *AuthorizationPluginView) FirstKeyView() *appkit.NSView

@method firstKeyView @abstract When called by the AuthorizationPlugin, the subclass should return the first view in the keyboard loop of the NSView. The default value returned is nil.

FirstKeyView calls the underlying FirstKeyView.

func (*AuthorizationPluginView) FirstResponder

func (x *AuthorizationPluginView) FirstResponder() *appkit.NSResponder

@method firstResponder @abstract When called by the AuthorizationPlugin, the subclass should return the view that should get the focus for keyboard events. The default value returned is nil.

FirstResponder calls the underlying FirstResponder.

func (*AuthorizationPluginView) ID

ID returns the underlying Objective-C object pointer (objc.ID), for passing to C APIs that take an object or CFTypeRef pointer.

func (*AuthorizationPluginView) LastError

func (x *AuthorizationPluginView) LastError() unsafe.Pointer

@method lastError @abstract Called by the Apple provided SecurityAgent plugin to get a description of the error that occurred during evaluation. If no error occurred, the method should return nil. A downstream mechanism that works in cooperation with the SFAuthorizationPluginView can set a context value using the kAuthorizationContextFlagSticky flag to make it available to the SFAuthorizationPluginView in case of an error.

LastError calls the underlying LastError.

func (*AuthorizationPluginView) LastKeyView

func (x *AuthorizationPluginView) LastKeyView() *appkit.NSView

@method lastKeyView @abstract When called by the AuthorizationPlugin, the subclass should return the last view in the keyboard loop for the view. The default value returned is nil.

LastKeyView calls the underlying LastKeyView.

func (*AuthorizationPluginView) SetButtonEnabled

func (x *AuthorizationPluginView) SetButtonEnabled(inButtonType SFButtonType, inEnabled bool)

@method setButton:enabled: @abstract The SFAuthorizationPluginView calls this when it would like to disable a button in the UI. @param inButtonType the type of the button @param inEnabled YES to enabled the button, NO to disable the button

SetButtonEnabled calls the underlying SetButtonEnabled.

func (*AuthorizationPluginView) SetEnabled

func (x *AuthorizationPluginView) SetEnabled(inEnabled bool)

@method setEnabled: @abstract When called by the AuthorizationPlugin, the subclass should call setEnabled: on the controls that are in its view. @param inEnabled the state the controls should be in.

SetEnabled calls the underlying SetEnabled.

func (*AuthorizationPluginView) Unwrap

Unwrap returns the underlying raw.SFAuthorizationPluginView.

func (*AuthorizationPluginView) UpdateView

func (x *AuthorizationPluginView) UpdateView()

@method updateView @abstract updateView is called in order to have a new or modified NSView loaded by the AuthorizationPlugin.

UpdateView calls the underlying UpdateView.

func (*AuthorizationPluginView) ViewForType

func (x *AuthorizationPluginView) ViewForType(inType SFViewType) *appkit.NSView

@method viewForType: @abstract When called by the AuthorizationPlugin, the subclass should return the appropriate NSView for the requested SFViewType. The NSView and its contents should have the autoresize flags set as appropriate to allow for the view to be resized. @param inType is the type of view being requested by the AuthorizationPlugin. NOTE: Currently a maximum width of 394 points is supported, but Apple reserves the right to change that in the future. Do not assume that the width of the NSView won't change.

ViewForType calls the underlying ViewForType.

func (*AuthorizationPluginView) WillActivateWithUser

func (x *AuthorizationPluginView) WillActivateWithUser(inUserInformation *foundation.NSDictionary[objc.ID, objc.ID])

@method willActivateWithUser: @abstract Called by the Apple provided SecurityAgent plugin before the UI is made active. @param inUserInformation is a dictionary contains the following information: kSFAuthorizationPluginViewUserNameKey - an NSString with the selected user's name kSFAuthorizationPluginViewUserShortNameKey - an NSString with the selected user's short name The user name can be used to pre-populate a Text Field. NOTE: inUserInformation may be nil.

WillActivateWithUser calls the underlying WillActivateWithUser.

type AuthorizationPluginViewable

type AuthorizationPluginViewable interface {
	Unwrap() *raw.SFAuthorizationPluginView
	EngineRef() unsafe.Pointer
	Callbacks() unsafe.Pointer
	ButtonPressed(inButtonType SFButtonType)
	LastError() unsafe.Pointer
	DidActivate()
	WillActivateWithUser(inUserInformation *foundation.NSDictionary[objc.ID, objc.ID])
	DidDeactivate()
	FirstKeyView() *appkit.NSView
	FirstResponder() *appkit.NSResponder
	LastKeyView() *appkit.NSView
	SetEnabled(inEnabled bool)
	ViewForType(inType SFViewType) *appkit.NSView
	DisplayView()
	SetButtonEnabled(inButtonType SFButtonType, inEnabled bool)
	UpdateView()
}

AuthorizationPluginViewable is the interface implemented by AuthorizationPluginView, for mocking and DI.

type AuthorizationView

type AuthorizationView struct {
	// contains filtered or unexported fields
}

AuthorizationView wraps raw.SFAuthorizationView with a fluent Go API.

func AuthorizationViewFromID

func AuthorizationViewFromID(id objc.ID) *AuthorizationView

AuthorizationViewFromID adopts an existing object pointer as a AuthorizationView (nil for 0).

func NewAuthorizationView

func NewAuthorizationView() *AuthorizationView

NewAuthorizationView creates a new AuthorizationView.

func (*AuthorizationView) Authorization

@method authorization @abstract Returns the authorization object associated with this view.

Authorization calls the underlying Authorization.

func (*AuthorizationView) AuthorizationRights

func (x *AuthorizationView) AuthorizationRights() *security.AuthorizationItemSet

@method authorizationRights @abstract Returns the authorization rights for this view.

AuthorizationRights calls the underlying AuthorizationRights.

func (*AuthorizationView) AuthorizationState

func (x *AuthorizationView) AuthorizationState() SFAuthorizationViewState

@method authorizationState @abstract Returns the current state of the authorization view.

AuthorizationState calls the underlying AuthorizationState.

func (*AuthorizationView) Authorize

func (x *AuthorizationView) Authorize(inSender objc.ID) bool

@method authorize: @abstract

Authorize calls the underlying Authorize.

func (*AuthorizationView) Deauthorize

func (x *AuthorizationView) Deauthorize(inSender objc.ID) bool

@method deauthorize: @abstract

Deauthorize calls the underlying Deauthorize.

func (*AuthorizationView) Delegate

func (x *AuthorizationView) Delegate() objc.ID

@method delegate @abstract

Delegate calls the underlying Delegate.

func (*AuthorizationView) ID

func (x *AuthorizationView) ID() objc.ID

ID returns the underlying Objective-C object pointer (objc.ID), for passing to C APIs that take an object or CFTypeRef pointer.

func (*AuthorizationView) IsEnabled

func (x *AuthorizationView) IsEnabled() bool

@method isEnabled @abstract Indicates if the authorization view is enabled or disabled.

IsEnabled calls the underlying IsEnabled.

func (*AuthorizationView) SetAuthorizationRights

func (x *AuthorizationView) SetAuthorizationRights(authorizationRights *security.AuthorizationItemSet)

@method setAuthorizationRights: @abstract Sets the authorization rights for this view. @param authorizationRights Authorization rights.

SetAuthorizationRights calls the underlying SetAuthorizationRights.

func (*AuthorizationView) SetAutoupdate

func (x *AuthorizationView) SetAutoupdate(autoupdate bool)

@method setAutoupdate:

SetAutoupdate calls the underlying SetAutoupdate.

func (*AuthorizationView) SetAutoupdateInterval

func (x *AuthorizationView) SetAutoupdateInterval(autoupdate bool, interval float64)

@method setAutoUpdate:interval:

SetAutoupdateInterval calls the underlying SetAutoupdateInterval.

func (*AuthorizationView) SetDelegate

func (x *AuthorizationView) SetDelegate(delegate objc.ID)

@method setDelegate: @abstract Sets the delegate for this authorization view. If you want to hear state changes (for example, the user clicked the button), set your delegate and implement the delegate methods mentioned for SFAuthorizationViewDelegate @param delegate The client's delegate object.

SetDelegate calls the underlying SetDelegate.

func (*AuthorizationView) SetEnabled

func (x *AuthorizationView) SetEnabled(enabled bool)

@method setEnabled: @abstract Sets the current state of the authorization view. @param enabled Enable flag.

SetEnabled calls the underlying SetEnabled.

func (*AuthorizationView) SetFlags

func (x *AuthorizationView) SetFlags(flags security.AuthorizationFlags)

@method setFlags: @abstract Sets the current authorization flags for the view. @param flags Authorization flags.

SetFlags calls the underlying SetFlags.

func (*AuthorizationView) SetString

func (x *AuthorizationView) SetString(authorizationString string)

@method setString: @abstract A convenience method to specify an authorization rights set containing a single item with the name set to the specified string. @param authorizationString Authorization string.

SetString calls the underlying SetString.

func (*AuthorizationView) Unwrap

Unwrap returns the underlying raw.SFAuthorizationView.

func (*AuthorizationView) UpdateStatus

func (x *AuthorizationView) UpdateStatus(inSender objc.ID) bool

@method updateStatus: @abstract This method is called when the state of the authorization object has changed. @param inSender The action that is marked for updateStatus.

UpdateStatus calls the underlying UpdateStatus.

type AuthorizationViewable

type AuthorizationViewable interface {
	Unwrap() *raw.SFAuthorizationView
	SetString(authorizationString string)
	SetAuthorizationRights(authorizationRights *security.AuthorizationItemSet)
	AuthorizationRights() *security.AuthorizationItemSet
	Authorization() *securityfoundation.SFAuthorization
	UpdateStatus(inSender objc.ID) bool
	SetAutoupdate(autoupdate bool)
	SetAutoupdateInterval(autoupdate bool, interval float64)
	AuthorizationState() SFAuthorizationViewState
	SetEnabled(enabled bool)
	IsEnabled() bool
	SetFlags(flags security.AuthorizationFlags)
	SetDelegate(delegate objc.ID)
	Delegate() objc.ID
	Authorize(inSender objc.ID) bool
	Deauthorize(inSender objc.ID) bool
}

AuthorizationViewable is the interface implemented by AuthorizationView, for mocking and DI.

type CertificatePanel

type CertificatePanel struct {
	// contains filtered or unexported fields
}

CertificatePanel wraps raw.SFCertificatePanel with a fluent Go API.

func CertificatePanelFromID

func CertificatePanelFromID(id objc.ID) *CertificatePanel

CertificatePanelFromID adopts an existing object pointer as a CertificatePanel (nil for 0).

func NewCertificatePanel

func NewCertificatePanel() *CertificatePanel

NewCertificatePanel creates a new CertificatePanel.

func SharedCertificatePanel

func SharedCertificatePanel() *CertificatePanel

SharedCertificatePanel calls the underlying SFCertificatePanelSharedCertificatePanel.

func (*CertificatePanel) BeginSheetForWindowModalDelegateDidEndSelectorContextInfoCertificatesShowGroup

func (x *CertificatePanel) BeginSheetForWindowModalDelegateDidEndSelectorContextInfoCertificatesShowGroup(docWindow *appkit.NSWindow, delegate objc.ID, didEndSelector objc.SEL, contextInfo unsafe.Pointer, certificates *foundation.NSArray[objc.ID], showGroup bool)

@method beginSheetForWindow:modalDelegate:didEndSelector:contextInfo:certificates:showGroup: @abstract Displays one or more specified certificates in a modal sheet. @param docWindow The parent window to which the sheet is attached. @param modalDelegate The object whose didEndSelector method will be called when the sheet is dismissed. @param didEndSelector This method is called when the sheet is dismissed. @param contextInfo Client-defined contextual data which will be passed to the didEndSelector method. @param certificates The certificates to display. Pass a NSArray containing one or more SecCertificateRef instances in this parameter. @param showGroup Specifies whether additional certificates (other than the leaf certificate) are displayed. @discussion The didEndSelector method should have the following signature: - (void)certificateSheetDidEnd:(NSWindow *)sheet returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo

BeginSheetForWindowModalDelegateDidEndSelectorContextInfoCertificatesShowGroup calls the underlying BeginSheetForWindowModalDelegateDidEndSelectorContextInfoCertificatesShowGroup.

func (*CertificatePanel) BeginSheetForWindowModalDelegateDidEndSelectorContextInfoTrustShowGroup

func (x *CertificatePanel) BeginSheetForWindowModalDelegateDidEndSelectorContextInfoTrustShowGroup(docWindow *appkit.NSWindow, delegate objc.ID, didEndSelector objc.SEL, contextInfo unsafe.Pointer, trust unsafe.Pointer, showGroup bool)

@method beginSheetForWindow:modalDelegate:didEndSelector:contextInfo:trust:showGroup: @abstract Displays a certificate chain in a modal sheet. This is the preferred sheet method for SFCertificatePanel, since the SecTrustRef parameter lets you specify policies that determine whether the certificate is valid within your application's context. @param docWindow The parent window to which the sheet is attached. @param modalDelegate The object whose didEndSelector method will be called when the sheet is dismissed. @param didEndSelector This method is called when the sheet is dismissed. @param contextInfo Client-defined contextual data which will be passed to the didEndSelector method. @param trust A trust reference which contains the certificates to display. @param showGroup Specifies whether additional certificates (other than the leaf certificate) are displayed. @discussion The didEndSelector method should have the following signature: - (void)certificateSheetDidEnd:(NSWindow *)sheet returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo

BeginSheetForWindowModalDelegateDidEndSelectorContextInfoTrustShowGroup calls the underlying BeginSheetForWindowModalDelegateDidEndSelectorContextInfoTrustShowGroup.

func (*CertificatePanel) CertificateView

func (x *CertificatePanel) CertificateView() *CertificateView

CertificateView calls the underlying CertificateView.

func (*CertificatePanel) HelpAnchor

func (x *CertificatePanel) HelpAnchor() string

HelpAnchor calls the underlying HelpAnchor.

func (*CertificatePanel) ID

func (x *CertificatePanel) ID() objc.ID

ID returns the underlying Objective-C object pointer (objc.ID), for passing to C APIs that take an object or CFTypeRef pointer.

func (*CertificatePanel) Policies

func (x *CertificatePanel) Policies() *foundation.NSArray[objc.ID]

@method policies @abstract Returns an array of policies used to evaluate the status of the displayed certificates. @discussion This method returns an autoreleased NSArray containing one or more SecPolicyRef instances, as set by a previous setPolicies: call.

Policies calls the underlying Policies.

func (*CertificatePanel) RunModalForCertificatesShowGroup

func (x *CertificatePanel) RunModalForCertificatesShowGroup(certificates *foundation.NSArray[objc.ID], showGroup bool) int

@method runModalForCertificates:showGroup: @abstract Displays one or more specified certificates in a modal panel, returning NSOKButton when dismissed. @param certificates The certificates to display. Pass a NSArray containing one or more SecCertificateRef instances in this parameter. The leaf certificate is assumed to be at index 0; the order of additional certificates in the array is not critical. @param showGroup Specifies whether additional certificates (other than the leaf certificate) are displayed. To show only a single certificate, specify only one SecCertificateRef in the array and set showGroup to NO.

RunModalForCertificatesShowGroup calls the underlying RunModalForCertificatesShowGroup.

func (*CertificatePanel) RunModalForTrustShowGroup

func (x *CertificatePanel) RunModalForTrustShowGroup(trust unsafe.Pointer, showGroup bool) int

@method runModalForTrust:showGroup: @abstract Displays a certificate chain in a modal panel, returning NSOKButton when dismissed. This method is preferred over runModalForCertificates, since the SecTrustRef parameter lets you specify policies that determine whether the certificate is valid within your application's context. @param trust A trust reference which contains the certificates to display. @param showGroup Specifies whether additional certificates (other than the leaf certificate) are displayed.

RunModalForTrustShowGroup calls the underlying RunModalForTrustShowGroup.

func (*CertificatePanel) SetAlternateButtonTitle

func (x *CertificatePanel) SetAlternateButtonTitle(title string)

@method setAlternateButtonTitle: @abstract Customizes the title of the alternate button. @param title The new title for the alternate button. If title is set to nil, the button will not be shown.

SetAlternateButtonTitle calls the underlying SetAlternateButtonTitle.

func (*CertificatePanel) SetDefaultButtonTitle

func (x *CertificatePanel) SetDefaultButtonTitle(title string)

@method setDefaultButtonTitle: @abstract Customizes the title of the default button. @param title The new title for the default button.

SetDefaultButtonTitle calls the underlying SetDefaultButtonTitle.

func (*CertificatePanel) SetHelpAnchor

func (x *CertificatePanel) SetHelpAnchor(anchor string)

SetHelpAnchor calls the underlying SetHelpAnchor.

func (*CertificatePanel) SetPolicies

func (x *CertificatePanel) SetPolicies(policies objc.ID)

@method setPolicies: @abstract Specifies one or more policies that apply to the displayed certificates. @param policies The policies to use when evaluating the certificates' status. You can pass either a SecPolicyRef or a NSArray (containing one or more SecPolicyRef instances) in this parameter. If policies is set to nil, the Apple X.509 Basic Policy will be used. @discussion Applications will typically display a SFCertificatePanel in the context of a specific usage, such as SSL or S/MIME. You should set only the policy references which apply to your intended usage.

SetPolicies calls the underlying SetPolicies.

func (*CertificatePanel) SetShowsHelp

func (x *CertificatePanel) SetShowsHelp(showsHelp bool)

SetShowsHelp calls the underlying SetShowsHelp.

func (*CertificatePanel) ShowsHelp

func (x *CertificatePanel) ShowsHelp() bool

ShowsHelp calls the underlying ShowsHelp.

func (*CertificatePanel) Unwrap

Unwrap returns the underlying raw.SFCertificatePanel.

type CertificatePanelProvider

type CertificatePanelProvider interface {
	// contains filtered or unexported methods
}

CertificatePanelProvider is implemented by CertificatePanel and any idiomatic type wrapping a SFCertificatePanel subclass.

type CertificatePanelable

type CertificatePanelable interface {
	Unwrap() *raw.SFCertificatePanel
	RunModalForTrustShowGroup(trust unsafe.Pointer, showGroup bool) int
	RunModalForCertificatesShowGroup(certificates *foundation.NSArray[objc.ID], showGroup bool) int
	BeginSheetForWindowModalDelegateDidEndSelectorContextInfoTrustShowGroup(docWindow *appkit.NSWindow, delegate objc.ID, didEndSelector objc.SEL, contextInfo unsafe.Pointer, trust unsafe.Pointer, showGroup bool)
	BeginSheetForWindowModalDelegateDidEndSelectorContextInfoCertificatesShowGroup(docWindow *appkit.NSWindow, delegate objc.ID, didEndSelector objc.SEL, contextInfo unsafe.Pointer, certificates *foundation.NSArray[objc.ID], showGroup bool)
	SetPolicies(policies objc.ID)
	Policies() *foundation.NSArray[objc.ID]
	SetDefaultButtonTitle(title string)
	SetAlternateButtonTitle(title string)
	SetShowsHelp(showsHelp bool)
	ShowsHelp() bool
	SetHelpAnchor(anchor string)
	HelpAnchor() string
	CertificateView() *CertificateView
}

CertificatePanelable is the interface implemented by CertificatePanel, for mocking and DI.

type CertificateTrustPanel

type CertificateTrustPanel struct {
	// contains filtered or unexported fields
}

@class SFCertificateTrustPanel @abstract SFCertificateTrustPanel is a panel and sheet interface that allows a user to make trust decisions when one or more certificates involved in an operation are invalid or cannot be verified. It should be used whenever confirmation is required before proceeding with a certificate-related operation. It can also be displayed as an informative alert without requiring a decision to be made (if the operation or transaction has already occurred.)

CertificateTrustPanel wraps raw.SFCertificateTrustPanel with a fluent Go API.

func CertificateTrustPanelFromID

func CertificateTrustPanelFromID(id objc.ID) *CertificateTrustPanel

CertificateTrustPanelFromID adopts an existing object pointer as a CertificateTrustPanel (nil for 0).

func NewCertificateTrustPanel

func NewCertificateTrustPanel() *CertificateTrustPanel

NewCertificateTrustPanel creates a new CertificateTrustPanel.

func SharedCertificateTrustPanel

func SharedCertificateTrustPanel() *CertificateTrustPanel

SharedCertificateTrustPanel calls the underlying SFCertificateTrustPanelSharedCertificateTrustPanel.

func (*CertificateTrustPanel) BeginSheetForWindowModalDelegateDidEndSelectorContextInfoTrustMessage

func (x *CertificateTrustPanel) BeginSheetForWindowModalDelegateDidEndSelectorContextInfoTrustMessage(docWindow *appkit.NSWindow, delegate objc.ID, didEndSelector objc.SEL, contextInfo unsafe.Pointer, trust unsafe.Pointer, message string)

@method beginSheetForWindow:trust:message:modalDelegate:didEndSelector:contextInfo: @abstract Displays a modal sheet that shows the results of a certificate trust evaluation. @discussion The didEndSelector method should have the following signature: - (void)certificateTrustSheetDidEnd:(NSWindow *)sheet returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo returnCode will contain either NSOKButton or NSCancelButton. Note that the user can edit trust decisions in this panel; call SecTrustGetResult after the panel is dismissed to obtain the current trust result for the SecTrustRef. @param docWindow The parent window to which the sheet is attached. @param modalDelegate The object whose didEndSelector method will be called when the sheet is dismissed. @param didEndSelector This method is called when the sheet is dismissed. @param contextInfo Client-defined contextual data which will be passed to the didEndSelector method. @param trust A trust reference, previously created with SecTrustCreateWithCertificates (see <Security/SecTrust.h>). @param message Client-defined message string to display in the panel.

BeginSheetForWindowModalDelegateDidEndSelectorContextInfoTrustMessage calls the underlying BeginSheetForWindowModalDelegateDidEndSelectorContextInfoTrustMessage.

func (*CertificateTrustPanel) ID

func (x *CertificateTrustPanel) ID() objc.ID

ID returns the underlying Objective-C object pointer (objc.ID), for passing to C APIs that take an object or CFTypeRef pointer.

func (*CertificateTrustPanel) InformativeText

func (x *CertificateTrustPanel) InformativeText() string

@method informativeText @abstract Returns the informative text currently displayed in the SFCertificateTrustPanel.

InformativeText calls the underlying InformativeText.

func (*CertificateTrustPanel) RunModalForTrustMessage

func (x *CertificateTrustPanel) RunModalForTrustMessage(trust unsafe.Pointer, message string) int

@method runModalForTrust:message: @abstract Displays a modal panel that shows the results of a certificate trust evaluation. Returns NSOKButton if the default button is pressed, or NSCancelButton if the alternate button is pressed. Note that the user can edit trust decisions in this panel; call SecTrustGetResult after the panel is dismissed to obtain the current trust result for the SecTrustRef. @param trust A trust reference, previously created with SecTrustCreateWithCertificates (see <Security/SecTrust.h>). @param message Client-defined message string to display in the panel.

RunModalForTrustMessage calls the underlying RunModalForTrustMessage.

func (*CertificateTrustPanel) SetInformativeText

func (x *CertificateTrustPanel) SetInformativeText(informativeText string)

@method setInformativeText: @abstract Sets the optional informative text displayed in the SFCertificateTrustPanel. @param informativeText The informative text to display in the panel. @discussion By default, informative text describing the current certificate trust status is displayed. Call this method only if your application needs to customize the displayed informative text.

SetInformativeText calls the underlying SetInformativeText.

func (*CertificateTrustPanel) Unwrap

Unwrap returns the underlying raw.SFCertificateTrustPanel.

type CertificateTrustPanelable

type CertificateTrustPanelable interface {
	Unwrap() *raw.SFCertificateTrustPanel
	RunModalForTrustMessage(trust unsafe.Pointer, message string) int
	BeginSheetForWindowModalDelegateDidEndSelectorContextInfoTrustMessage(docWindow *appkit.NSWindow, delegate objc.ID, didEndSelector objc.SEL, contextInfo unsafe.Pointer, trust unsafe.Pointer, message string)
	SetInformativeText(informativeText string)
	InformativeText() string
}

CertificateTrustPanelable is the interface implemented by CertificateTrustPanel, for mocking and DI.

type CertificateView

type CertificateView struct {
	// contains filtered or unexported fields
}

CertificateView wraps raw.SFCertificateView with a fluent Go API.

func CertificateViewFromID

func CertificateViewFromID(id objc.ID) *CertificateView

CertificateViewFromID adopts an existing object pointer as a CertificateView (nil for 0).

func NewCertificateView

func NewCertificateView() *CertificateView

NewCertificateView creates a new CertificateView.

func (*CertificateView) Certificate

func (x *CertificateView) Certificate() unsafe.Pointer

@method certificate @abstract Returns the certificate currently displayed in the view.

Certificate calls the underlying Certificate.

func (*CertificateView) DetailsDisclosed

func (x *CertificateView) DetailsDisclosed() bool

@method detailsDisclosed @abstract Indicates if the view currently discloses the certificate's details.

DetailsDisclosed calls the underlying DetailsDisclosed.

func (*CertificateView) DetailsDisplayed

func (x *CertificateView) DetailsDisplayed() bool

@method detailsDisplayed @abstract Indicates if the view currently shows the certificate's details.

DetailsDisplayed calls the underlying DetailsDisplayed.

func (*CertificateView) ID

func (x *CertificateView) ID() objc.ID

ID returns the underlying Objective-C object pointer (objc.ID), for passing to C APIs that take an object or CFTypeRef pointer.

func (*CertificateView) IsEditable

func (x *CertificateView) IsEditable() bool

@method isEditable @abstract Indicates if the view allows the user to edit the certificate's trust.

IsEditable calls the underlying IsEditable.

func (*CertificateView) IsTrustDisplayed

func (x *CertificateView) IsTrustDisplayed() bool

@method isTrustDisplayed @abstract Indicates if the view currently shows the certificate's trust settings.

IsTrustDisplayed calls the underlying IsTrustDisplayed.

func (*CertificateView) Policies

func (x *CertificateView) Policies() *foundation.NSArray[objc.ID]

@method policies @abstract Returns an array of policies used to evaluate the status of the displayed certificate. @discussion This method returns an autoreleased NSArray containing one or more SecPolicyRef instances, as set by a previous setPolicies: call. The array will always contain at least one item (the Apple X.509 Basic Policy).

Policies calls the underlying Policies.

func (*CertificateView) PoliciesDisclosed

func (x *CertificateView) PoliciesDisclosed() bool

@method policiesDisclosed @abstract Indicates if the view currently discloses the trust policy settings.

PoliciesDisclosed calls the underlying PoliciesDisclosed.

func (*CertificateView) SaveTrustSettings

func (x *CertificateView) SaveTrustSettings()

@method saveTrustSettings @abstract Saves the user's current trust settings for the displayed certificate. @discussion If trust settings are not editable, this method effectively does nothing. You can use SecTrustGetUserTrust (see <Security/SecTrust.h>) to subsequently retrieve the trust settings.

SaveTrustSettings calls the underlying SaveTrustSettings.

func (*CertificateView) SetCertificate

func (x *CertificateView) SetCertificate(certificate unsafe.Pointer)

@method setCertificate: @abstract Specifies the certificate that's displayed in the view. @param certificate The new certificate for the view.

SetCertificate calls the underlying SetCertificate.

func (*CertificateView) SetDetailsDisclosed

func (x *CertificateView) SetDetailsDisclosed(disclosed bool)

@method setDetailsDisclosed: @abstract Specifies whether the certificate details subview is disclosed (i.e. the triangle is turned down). @param disclosed Pass YES to disclose the certificate details subview, or NO to collapse it. @discussion By default, the certificate details subview is not disclosed. Note that changing the disclosure state of a line item does not affect whether the item itself is shown; use setDisplayDetails: to cause it to be displayed or hidden.

SetDetailsDisclosed calls the underlying SetDetailsDisclosed.

func (*CertificateView) SetDisplayDetails

func (x *CertificateView) SetDisplayDetails(display bool)

@method setDisplayDetails: @abstract Specifies whether the user can see the certificate's entire contents. @param display Pass YES to display the certificate's details, or NO to hide them. @discussion For behavioral compatibility with Panther, certificate details are displayed by default. To hide the details of a certificate, you must explicitly set the display value to NO.

SetDisplayDetails calls the underlying SetDisplayDetails.

func (*CertificateView) SetDisplayTrust

func (x *CertificateView) SetDisplayTrust(display bool)

@method setDisplayTrust: @abstract Specifies whether the user can see the certificate's trust settings. @param display Pass YES to display the trust settings, or NO to hide them. @discussion Certificate trust settings are not displayed by default. To show the certificate's trust settings, you must explicitly set the display value to YES.

SetDisplayTrust calls the underlying SetDisplayTrust.

func (*CertificateView) SetEditableTrust

func (x *CertificateView) SetEditableTrust(editable bool)

@method setEditableTrust: @abstract Specifies whether the user can edit the certificate's trust settings. @param editable Pass YES if the trust settings should be editable.

SetEditableTrust calls the underlying SetEditableTrust.

func (*CertificateView) SetPolicies

func (x *CertificateView) SetPolicies(policies objc.ID)

@method setPolicies: @abstract Specifies one or more policies that apply to the displayed certificate. @param policies The policies to use when evaluating this certificate's status. You can pass either a SecPolicyRef or a NSArray (containing one or more SecPolicyRef instances) in this parameter. If policies is set to nil, the Apple X.509 Basic Policy will be used. @discussion Applications will typically display a SFCertificateView in the context of a specific usage, such as SSL or S/MIME. You should set only the policy references which apply to your intended usage.

SetPolicies calls the underlying SetPolicies.

func (*CertificateView) SetPoliciesDisclosed

func (x *CertificateView) SetPoliciesDisclosed(disclosed bool)

@method setPoliciesDisclosed: @abstract Specifies whether the trust policy settings are disclosed (i.e. the triangle is turned down). @param disclosed Pass YES to disclose the trust policies subview, or NO to collapse it. @discussion By default, the trust policies subview is not disclosed. Note that changing the disclosure state of a line item does not affect whether the item itself is shown; use setDisplayTrust: to cause it to be displayed or hidden.

SetPoliciesDisclosed calls the underlying SetPoliciesDisclosed.

func (*CertificateView) Unwrap

func (x *CertificateView) Unwrap() *raw.SFCertificateView

Unwrap returns the underlying raw.SFCertificateView.

type CertificateViewable

type CertificateViewable interface {
	Unwrap() *raw.SFCertificateView
	SetCertificate(certificate unsafe.Pointer)
	Certificate() unsafe.Pointer
	SetPolicies(policies objc.ID)
	Policies() *foundation.NSArray[objc.ID]
	SetEditableTrust(editable bool)
	IsEditable() bool
	SetDisplayTrust(display bool)
	IsTrustDisplayed() bool
	SaveTrustSettings()
	SetDisplayDetails(display bool)
	DetailsDisplayed() bool
	SetDetailsDisclosed(disclosed bool)
	DetailsDisclosed() bool
	SetPoliciesDisclosed(disclosed bool)
	PoliciesDisclosed() bool
}

CertificateViewable is the interface implemented by CertificateView, for mocking and DI.

type ChooseIdentityPanel

type ChooseIdentityPanel struct {
	// contains filtered or unexported fields
}

ChooseIdentityPanel wraps raw.SFChooseIdentityPanel with a fluent Go API.

func ChooseIdentityPanelFromID

func ChooseIdentityPanelFromID(id objc.ID) *ChooseIdentityPanel

ChooseIdentityPanelFromID adopts an existing object pointer as a ChooseIdentityPanel (nil for 0).

func NewChooseIdentityPanel

func NewChooseIdentityPanel() *ChooseIdentityPanel

NewChooseIdentityPanel creates a new ChooseIdentityPanel.

func SharedChooseIdentityPanel

func SharedChooseIdentityPanel() *ChooseIdentityPanel

SharedChooseIdentityPanel calls the underlying SFChooseIdentityPanelSharedChooseIdentityPanel.

func (*ChooseIdentityPanel) BeginSheetForWindowModalDelegateDidEndSelectorContextInfoIdentitiesMessage

func (x *ChooseIdentityPanel) BeginSheetForWindowModalDelegateDidEndSelectorContextInfoIdentitiesMessage(docWindow *appkit.NSWindow, delegate objc.ID, didEndSelector objc.SEL, contextInfo unsafe.Pointer, identities *foundation.NSArray[objc.ID], message string)

@method beginSheetForWindow:modalDelegate:didEndSelector:contextInfo:identities:message: @abstract Displays a sheet version of the SFChooseIdentityPanel. The didEndSelector returnCode will contain either NSOKButton or NSCancelButton. @param docWindow The parent window to which the sheet is attached. @param modalDelegate The object whose didEndSelector method will be called when the sheet is dismissed. @param didEndSelector This method is called when the sheet is dismissed. @param contextInfo Client-defined contextual data which will be passed to the didEndSelector method. @param identities An array of SecIdentityRef objects, usually obtained from an identity search (see <Security/SecIdentitySearch.h>). @param message Client-defined message string to display in the panel. @discussion The didEndSelector method should have the following signature: - (void)chooseIdentitySheetDidEnd:(NSWindow *)sheet returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo

BeginSheetForWindowModalDelegateDidEndSelectorContextInfoIdentitiesMessage calls the underlying BeginSheetForWindowModalDelegateDidEndSelectorContextInfoIdentitiesMessage.

func (*ChooseIdentityPanel) Domain

func (x *ChooseIdentityPanel) Domain() string

@method domain @abstract Returns the domain which will be associated with the chosen identity.

Domain calls the underlying Domain.

func (*ChooseIdentityPanel) HelpAnchor

func (x *ChooseIdentityPanel) HelpAnchor() string

HelpAnchor calls the underlying HelpAnchor.

func (*ChooseIdentityPanel) ID

func (x *ChooseIdentityPanel) ID() objc.ID

ID returns the underlying Objective-C object pointer (objc.ID), for passing to C APIs that take an object or CFTypeRef pointer.

func (*ChooseIdentityPanel) Identity

func (x *ChooseIdentityPanel) Identity() unsafe.Pointer

@method identity @abstract Returns the identity that the user chose in the panel.

Identity calls the underlying Identity.

func (*ChooseIdentityPanel) InformativeText

func (x *ChooseIdentityPanel) InformativeText() string

@method informativeText @abstract Returns the informative text currently displayed in the SFChooseIdentityPanel.

InformativeText calls the underlying InformativeText.

func (*ChooseIdentityPanel) Policies

func (x *ChooseIdentityPanel) Policies() *foundation.NSArray[objc.ID]

@method policies @abstract Returns an array of policies used to evaluate the status of the displayed certificates. @discussion This method returns an autoreleased NSArray containing one or more SecPolicyRef instances, as set by a previous setPolicies: call.

Policies calls the underlying Policies.

func (*ChooseIdentityPanel) RunModalForIdentitiesMessage

func (x *ChooseIdentityPanel) RunModalForIdentitiesMessage(identities *foundation.NSArray[objc.ID], message string) int

@method runModalForIdentities:message: @abstract Displays a supplied list of identities in a modal panel, returning NSOKButton or NSCancelButton when dismissed. Use the -identity method to subsequently obtain the identity chosen by the user. @param identities An array of SecIdentityRef objects, usually obtained from an identity search (see <Security/SecIdentitySearch.h>). @param message Client-defined message string to display in the panel.

RunModalForIdentitiesMessage calls the underlying RunModalForIdentitiesMessage.

func (*ChooseIdentityPanel) SetAlternateButtonTitle

func (x *ChooseIdentityPanel) SetAlternateButtonTitle(title string)

@method setAlternateButtonTitle: @abstract Customizes the title of the alternate button. @param title The new title for the alternate button. If title is set to nil, the button will not be shown.

SetAlternateButtonTitle calls the underlying SetAlternateButtonTitle.

func (*ChooseIdentityPanel) SetDefaultButtonTitle

func (x *ChooseIdentityPanel) SetDefaultButtonTitle(title string)

@method setDefaultButtonTitle: @abstract Customizes the title of the default button. @param title The new title for the default button.

SetDefaultButtonTitle calls the underlying SetDefaultButtonTitle.

func (*ChooseIdentityPanel) SetDomain

func (x *ChooseIdentityPanel) SetDomain(domainString string)

@method setDomain: @abstract Sets an optional domain in which the identity is to be used. @param domainString A string containing a hostname, RFC822 name (email address), URL, or similar identifier. @discussion Call this method to associate a domain with the chosen identity. If the user chooses an identity and a domain has been set, an identity preference item will be created in the default keychain. Subsequently, calling SecIdentitySearchCreateWithPolicy and SecIdentitySearchCopyNext will return the preferred identity for this domain first.

SetDomain calls the underlying SetDomain.

func (*ChooseIdentityPanel) SetHelpAnchor

func (x *ChooseIdentityPanel) SetHelpAnchor(anchor string)

SetHelpAnchor calls the underlying SetHelpAnchor.

func (*ChooseIdentityPanel) SetInformativeText

func (x *ChooseIdentityPanel) SetInformativeText(informativeText string)

@method setInformativeText: @abstract Sets the optional informative text displayed in the SFChooseIdentityPanel. @param informativeText The informative text to display in the panel. @discussion Call this method to set the informative text to be displayed.

SetInformativeText calls the underlying SetInformativeText.

func (*ChooseIdentityPanel) SetPolicies

func (x *ChooseIdentityPanel) SetPolicies(policies objc.ID)

@method setPolicies: @abstract Specifies one or more policies that apply to the displayed certificates. @param policies The policies to use when evaluating the certificates' status. You can pass either a SecPolicyRef or a NSArray (containing one or more SecPolicyRef instances) in this parameter. If policies is set to nil, the Apple X.509 Basic Policy will be used. @discussion Applications will typically display a SFChooseIdentityPanel in the context of a specific usage, such as SSL or S/MIME. You should set only the policy references which apply to your intended usage.

SetPolicies calls the underlying SetPolicies.

func (*ChooseIdentityPanel) SetShowsHelp

func (x *ChooseIdentityPanel) SetShowsHelp(showsHelp bool)

SetShowsHelp calls the underlying SetShowsHelp.

func (*ChooseIdentityPanel) ShowsHelp

func (x *ChooseIdentityPanel) ShowsHelp() bool

ShowsHelp calls the underlying ShowsHelp.

func (*ChooseIdentityPanel) Unwrap

Unwrap returns the underlying raw.SFChooseIdentityPanel.

type ChooseIdentityPanelable

type ChooseIdentityPanelable interface {
	Unwrap() *raw.SFChooseIdentityPanel
	RunModalForIdentitiesMessage(identities *foundation.NSArray[objc.ID], message string) int
	BeginSheetForWindowModalDelegateDidEndSelectorContextInfoIdentitiesMessage(docWindow *appkit.NSWindow, delegate objc.ID, didEndSelector objc.SEL, contextInfo unsafe.Pointer, identities *foundation.NSArray[objc.ID], message string)
	Identity() unsafe.Pointer
	SetPolicies(policies objc.ID)
	Policies() *foundation.NSArray[objc.ID]
	SetDefaultButtonTitle(title string)
	SetAlternateButtonTitle(title string)
	SetShowsHelp(showsHelp bool)
	ShowsHelp() bool
	SetHelpAnchor(anchor string)
	HelpAnchor() string
	SetInformativeText(informativeText string)
	InformativeText() string
	SetDomain(domainString string)
	Domain() string
}

ChooseIdentityPanelable is the interface implemented by ChooseIdentityPanel, for mocking and DI.

type ChooseIdentityTableCellView

type ChooseIdentityTableCellView struct {
	// contains filtered or unexported fields
}

ChooseIdentityTableCellView wraps raw.SFChooseIdentityTableCellView with a fluent Go API.

func ChooseIdentityTableCellViewFromID

func ChooseIdentityTableCellViewFromID(id objc.ID) *ChooseIdentityTableCellView

ChooseIdentityTableCellViewFromID adopts an existing object pointer as a ChooseIdentityTableCellView (nil for 0).

func NewChooseIdentityTableCellView

func NewChooseIdentityTableCellView() *ChooseIdentityTableCellView

NewChooseIdentityTableCellView creates a new ChooseIdentityTableCellView.

func (*ChooseIdentityTableCellView) ID

ID returns the underlying Objective-C object pointer (objc.ID), for passing to C APIs that take an object or CFTypeRef pointer.

func (*ChooseIdentityTableCellView) IssuerTextField

func (x *ChooseIdentityTableCellView) IssuerTextField() *appkit.NSTextField

IssuerTextField calls the underlying IssuerTextField.

func (*ChooseIdentityTableCellView) SetIssuerTextField

func (x *ChooseIdentityTableCellView) SetIssuerTextField(issuerTextField *appkit.NSTextField)

SetIssuerTextField calls the underlying SetIssuerTextField.

func (*ChooseIdentityTableCellView) Unwrap

Unwrap returns the underlying raw.SFChooseIdentityTableCellView.

func (*ChooseIdentityTableCellView) WithIssuerTextField

func (x *ChooseIdentityTableCellView) WithIssuerTextField(issuerTextField *appkit.NSTextField) *ChooseIdentityTableCellView

WithIssuerTextField sets the issuerTextField property and returns the receiver for chaining.

type ChooseIdentityTableCellViewable

type ChooseIdentityTableCellViewable interface {
	Unwrap() *raw.SFChooseIdentityTableCellView
	WithIssuerTextField(issuerTextField *appkit.NSTextField) *ChooseIdentityTableCellView
	IssuerTextField() *appkit.NSTextField
	SetIssuerTextField(issuerTextField *appkit.NSTextField)
}

ChooseIdentityTableCellViewable is the interface implemented by ChooseIdentityTableCellView, for mocking and DI.

type KeychainSavePanel

type KeychainSavePanel struct {
	// contains filtered or unexported fields
}

@class SFKeychainSavePanel @abstract SFKeychainSavePanel is a panel and sheet interface used to create a keychain using the NSSavePanel UI.

KeychainSavePanel wraps raw.SFKeychainSavePanel with a fluent Go API.

func KeychainSavePanelFromID

func KeychainSavePanelFromID(id objc.ID) *KeychainSavePanel

KeychainSavePanelFromID adopts an existing object pointer as a KeychainSavePanel (nil for 0).

func NewKeychainSavePanel

func NewKeychainSavePanel() *KeychainSavePanel

NewKeychainSavePanel creates a new KeychainSavePanel.

func SharedKeychainSavePanel

func SharedKeychainSavePanel() *KeychainSavePanel

SharedKeychainSavePanel calls the underlying SFKeychainSavePanelSharedKeychainSavePanel.

func (*KeychainSavePanel) Error

func (x *KeychainSavePanel) Error() unsafe.Pointer

@method error @abstract Returns the last error encountered by SFKeychainSavePanel. @result The error object.

Error calls the underlying Error.

func (*KeychainSavePanel) ID

func (x *KeychainSavePanel) ID() objc.ID

ID returns the underlying Objective-C object pointer (objc.ID), for passing to C APIs that take an object or CFTypeRef pointer.

func (*KeychainSavePanel) Keychain

func (x *KeychainSavePanel) Keychain() unsafe.Pointer

@method keychain @abstract Returns the keychain created by the SFKeychainSavePanel. @result The keychain object.

Keychain calls the underlying Keychain.

func (*KeychainSavePanel) SetPassword

func (x *KeychainSavePanel) SetPassword(password string)

@method setPassword: @abstract Specifies the password for the keychain that will be created. @param The password string object.

SetPassword calls the underlying SetPassword.

func (*KeychainSavePanel) Unwrap

Unwrap returns the underlying raw.SFKeychainSavePanel.

type KeychainSavePanelable

type KeychainSavePanelable interface {
	Unwrap() *raw.SFKeychainSavePanel
	SetPassword(password string)
	Keychain() unsafe.Pointer
	Error() unsafe.Pointer
}

KeychainSavePanelable is the interface implemented by KeychainSavePanel, for mocking and DI.

type KeychainSettingsPanel

type KeychainSettingsPanel struct {
	// contains filtered or unexported fields
}

KeychainSettingsPanel wraps raw.SFKeychainSettingsPanel with a fluent Go API.

func KeychainSettingsPanelFromID

func KeychainSettingsPanelFromID(id objc.ID) *KeychainSettingsPanel

KeychainSettingsPanelFromID adopts an existing object pointer as a KeychainSettingsPanel (nil for 0).

func NewKeychainSettingsPanel

func NewKeychainSettingsPanel() *KeychainSettingsPanel

NewKeychainSettingsPanel creates a new KeychainSettingsPanel.

func SharedKeychainSettingsPanel

func SharedKeychainSettingsPanel() *KeychainSettingsPanel

SharedKeychainSettingsPanel calls the underlying SFKeychainSettingsPanelSharedKeychainSettingsPanel.

func (*KeychainSettingsPanel) BeginSheetForWindowModalDelegateDidEndSelectorContextInfoSettingsKeychain

func (x *KeychainSettingsPanel) BeginSheetForWindowModalDelegateDidEndSelectorContextInfoSettingsKeychain(docWindow *appkit.NSWindow, delegate objc.ID, didEndSelector objc.SEL, contextInfo unsafe.Pointer, settings *security.SecKeychainSettings, keychain unsafe.Pointer)

@method beginSheetForWindow:settings:keychain:modalDelegate:didEndSelector:contextInfo: @abstract Presents a sheet version of SFKeychainSettingsPanel. The didEndSelector returnCode will contain either NSOKButton or NSCancelButton. @param docWindow The panel in which the settings sheet slides down; acting as a document modal window. If docWindow is nil, the behavior defaults to a standalone modal window. @param delegate Delegate object in which didEndSelector is a method. @param didEndSelector The didEndSelector method is optional. If implemented by the delegate, this method is invoked after the modal session has ended, but before dismissing the same panel. The didEndSelector may dismiss the keychain panel itself; otherwise it will be dismissed on return from the method. The didEndSelector should have the following signature: - (void)settingsPanelDidEnd:(NSWindow *)sheet returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo; @param contextInfo A client-defined context. @param settings A pointer to a keychain settings structure. Since this structure is versioned, you must preallocate it and fill in the version of the structure. @param keychain The keychain that will have its settings changed.

BeginSheetForWindowModalDelegateDidEndSelectorContextInfoSettingsKeychain calls the underlying BeginSheetForWindowModalDelegateDidEndSelectorContextInfoSettingsKeychain.

func (*KeychainSettingsPanel) ID

func (x *KeychainSettingsPanel) ID() objc.ID

ID returns the underlying Objective-C object pointer (objc.ID), for passing to C APIs that take an object or CFTypeRef pointer.

func (*KeychainSettingsPanel) RunModalForSettingsKeychain

func (x *KeychainSettingsPanel) RunModalForSettingsKeychain(settings *security.SecKeychainSettings, keychain unsafe.Pointer) int

@method runModalForSettings:keychain: @abstract Changes the keychain settings using the settings panel. The panel contains settings such as "lock on sleep", "automatic lock", etc. If the user attempts to change the settings of a locked keychain, the unlock panel will be presented. It returns NSOKButton or NSCancelButton. @param settings A pointer to a keychain settings structure. Since this structure is versioned, you must preallocate it and fill in the version of the structure. @param keychain The keychain that will have its settings changed.

RunModalForSettingsKeychain calls the underlying RunModalForSettingsKeychain.

func (*KeychainSettingsPanel) Unwrap

Unwrap returns the underlying raw.SFKeychainSettingsPanel.

type KeychainSettingsPanelable

type KeychainSettingsPanelable interface {
	Unwrap() *raw.SFKeychainSettingsPanel
	RunModalForSettingsKeychain(settings *security.SecKeychainSettings, keychain unsafe.Pointer) int
	BeginSheetForWindowModalDelegateDidEndSelectorContextInfoSettingsKeychain(docWindow *appkit.NSWindow, delegate objc.ID, didEndSelector objc.SEL, contextInfo unsafe.Pointer, settings *security.SecKeychainSettings, keychain unsafe.Pointer)
}

KeychainSettingsPanelable is the interface implemented by KeychainSettingsPanel, for mocking and DI.

type SFAuthorizationViewState added in v0.5.0

type SFAuthorizationViewState int64

@typedef SFAuthorizationViewState @abstract Defines the current state of the authorization view. @constant SFAuthorizationStartupState Indicates the state is starting up. @constant SFAuthorizationViewLockedState Indicates the state is locked. @constant SFAuthorizationViewInProgressState Indicates the state is 'in progress'. @constant SFAuthorizationViewUnlockedState Indicates the state is unlocked.

const (
	SFAuthorizationStartupState        SFAuthorizationViewState = 0
	SFAuthorizationViewLockedState     SFAuthorizationViewState = 1
	SFAuthorizationViewInProgressState SFAuthorizationViewState = 2
	SFAuthorizationViewUnlockedState   SFAuthorizationViewState = 3
)

func (SFAuthorizationViewState) String added in v0.5.0

func (e SFAuthorizationViewState) String() string

type SFButtonType added in v0.5.0

type SFButtonType int64

@typedef SFButtonType @abstract Defines the button types that are used by AuthorizationPlugins. @constant SFButtonTypeCancel Indicates the Cancel button was pressed. @constant SFButtonTypeOK Indicates the OK button was pressed. @constant SFButtonTypeBack Indicates the Back button was pressed. @constant SFButtonTypeLogin Indicates the Login button was pressed.

const (
	SFButtonTypeCancel SFButtonType = 0
	SFButtonTypeOK     SFButtonType = 1
	SFButtonTypeBack   SFButtonType = 0
	SFButtonTypeLogin  SFButtonType = 1
)

func (SFButtonType) String added in v0.5.0

func (e SFButtonType) String() string

type SFViewType added in v0.5.0

type SFViewType int64

@typedef SFViewType @abstract Defines the view types requested by AuthorizationPlugins. @constant SFViewTypeIdentityAndCredentials Indicates a view that has controls for identity and credentials was requested. @constant SFViewTypeCredentials Indicates a view that has controls for credentials was requested.

const (
	SFViewTypeIdentityAndCredentials SFViewType = 0
	SFViewTypeCredentials            SFViewType = 1
)

func (SFViewType) String added in v0.5.0

func (e SFViewType) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL