Wifi and Power option while developing Mac OS X Authorisation Plugin.

Hi,

I am working on Authorisation Plugin for Mac OS X and able to get going for most of the parts and taking inspiration from Jamf Authorisation Plugin repo https://github.com/jamf/NoMADLogin-AD.

I have seen in project they are implementing logic for following.

  1. Connecting to Wifi
  2. Power management (Sleep, Restart, Power Off)

Question: I was wondering these things need to be implemented or is there a way some components from Mac OS X could be integrated calling some API and I don't have to implement them and I see say a top bar where these items are viable as we see in default login screen.

I have developed my own login screen and I do see it is all blank everything I have to implement from scratch.

Trying luck here if any API is out there to reduce work, else no option but to implement all logic.

I'll really appreciate if someone just could help me know such API's are present or not. In case there are will save lot of effort.

Thanks,

Answered by DTS Engineer in 827794022
Written by garrow in 827766022
my use case of showing embeded browser seems very limited.

To be clear, we don’t support folks trying to present a web view in the pre-login context. Quoting myself here:

don’t use a web view in your GUI authorization plug-ins. That means both the WKWebView and the legacy WebView. Web views are too complex to work reliably in the odd environment in which authorization plug-ins are executed.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Written by garrow in 774291021
I am working on Authorisation Plugin

I’d like to talk with you about this privately; please open a DTS code-level support request so we can do that. When you submit your request, include the URL of this thread so that your question gets routed efficiently.

Written by garrow in 774291021
I have developed my own login screen

Using an SFAuthorizationPluginView subclass? Or something else?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Hi Quinn

As advised I have created DTS code request.

Written by garrow in 824812022
As advised I have created DTS code request.

I got it, but I’m unable to reply because the email address associated with your developer account bounces. Please fix that and post back here when you’re done.

The email address in question is g*****_m*****_d**_a***_i**@p*********.com, where each * is a lowercase letter.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Sincere apologies for the confusion regarding my email. I was unaware that the previous ID had become inactive, my bad.

I have now updated my primary email to an active one. Please try sending the email again.

Written by garrow in 824890022
I have now updated my primary email to an active one.

Cool. I’ve just sent an initial email to that address. If you don’t get it in the next few hours, please reach out to me via email (my address is in my signature).

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Thanks for sharing code example in DTS request, it cleared lot of doubts. I have tried the code shared with me, one using SFAuthorizationPluginView and another using NSWindowController.

  • With SFAuthorizationPluginView I get a password prompt at the bottom of screen and it is hosted inside the normal/default login window of Mac OS. In documentation also it is written the maximum width it will support is 394 points for now, which for my use case of showing embeded browser seems very limited. However I do get wifi and power options.
  • With NSWindowController it is a blank slate/screen. I do not see any wifi or power options, similar to my first attempt. All I see is a box with few buttons and red image as per view code.

Just wanted to confirm, I have no other option but to provide wifi and power options by my own self. By trying the examples it is clear though, but still if there is some hope :).

Written by garrow in 827766022
my use case of showing embeded browser seems very limited.

To be clear, we don’t support folks trying to present a web view in the pre-login context. Quoting myself here:

don’t use a web view in your GUI authorization plug-ins. That means both the WKWebView and the legacy WebView. Web views are too complex to work reliably in the odd environment in which authorization plug-ins are executed.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

ok, I got your point, I'll revisit the requirements again.

Once again, thanks for all your input, really appreciate.

Wifi and Power option while developing Mac OS X Authorisation Plugin.
 
 
Q