This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Here is a workaround for the lack of a client credentials flow in Xero's OAuth 2.0 / OpenID Connect implementation. | |
From Xero's FAQ: https://developer.xero.com/faq/all/oauth-private | |
"Is there an equivalent of two-legged private apps in OAuth 2.0? | |
No, all users will follow the same OAuth 2.0 code flow. | |
Once you have an access token and refresh token you can refresh indefinitely or until the token is revoked by the user." | |
Workaround: | |
1. Login to Xero as the Xero user to use for the machine-to-machine flow workaround. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Source: http://www.powershellmagazine.com/2013/07/18/pstip-how-to-switch-off-display-with-powershell/ | |
# Turn display off by calling WindowsAPI. | |
# PostMessage(HWND_BROADCAST,WM_SYSCOMMAND, SC_MONITORPOWER, POWER_OFF) | |
# HWND_BROADCAST 0xffff | |
# WM_SYSCOMMAND 0x0112 | |
# SC_MONITORPOWER 0xf170 | |
# POWER_OFF 0x0002 | |