Display GUI Authorization Plug-in at Screen Saver Unlock

I have a NSWindow that I display at the Login Window using a non-privileged mech with an auth plug-in.


This window can be displayed at the Login Window without any issues by placing an entry in the system.login.console portion of the authdb.

I want to do the same for the Screen Saver unlock screen. When I put the entry in the authenticate portion of the authdb, the Window does load but is not shown. I have an audio clip play inside of awakeFromNib so I know the window is launching. The runModalForWindow will block the login until I press enter. Once I press enter the modal is stopped and things continue as normal.


How do I get the window to display at the Screen Saver unlock screen?

Also, something similar happens with my window at the Fast User Switching prompt (system.login.console). Except I can see the window behind the gradient background, but can not interact with it.


I have tried many combinations of NSScreenSaverWindowLevel (-1 +1 etc):

[[self window] setCanBecomeVisibleWithoutLogin:TRUE];

[[self window] setLevel:NSScreenSaverWindowLevel + 1];

[[self window] orderFrontRegardless];


Here is a simple example of a window:


https://github.com/tburgin/MacTech_2015/blob/master/VerifyAuthPlugin/Views/Prompt/PromptWindowController.m

In my experience debugging authorisation plug-ins is way too hard to attempt in the DevForums context. If no one else chimes in, I recommend you open a DTS tech support incident and I, or on of my colleagues, can help you out there.

ps One tip: make sure your window can become ‘key’, that is, it returns YES for the

canBecomeKeyWindow
property. If that’s not happening by default, you can fix it with with a (trivial) subclass of NSWindow.

Share and Enjoy

Quinn "The Eskimo!"
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Hey burgintj,


I'm curious if you ever found a solution to this issue. I've been trying quite a few things myself and working with DTS without much help.


Apple seems to suggest using a subclass of SFAuthorizationPluginView when displaying UI in the context of the screen saver authorization, but that doesn't seem suitable for our needs as it seems to require we re-implement the login window functionality.

Subclass NSWindow and override canBecomeKeyWindow to return YES.

Display GUI Authorization Plug-in at Screen Saver Unlock
 
 
Q