Skip to content

Commit 8d39517

Browse files
authored
new token endpoints (#7)
1 parent 1500b45 commit 8d39517

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

action.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
@logger.catch
1818
def get_jamf_token(url, auth_type, username, password):
1919
if auth_type == "auth":
20-
token_request = requests.post(url=f"{url}/uapi/auth/tokens", auth=(username,password))
20+
token_request = requests.post(url=f"{url}/api/v1/auth/token", auth=(username,password))
2121
elif auth_type =='oauth':
2222
data = {"client_id": username,"client_secret": password, "grant_type": "client_credentials"}
2323
token_request = requests.post(url=f"{url}/api/oauth/token", data=data)
@@ -44,7 +44,7 @@ def get_jamf_token(url, auth_type, username, password):
4444
@logger.catch
4545
def invalidate_jamf_token(url, token):
4646
header = {"Authorization": f"Bearer {token}"}
47-
token_request = requests.post(url=f"{url}/uapi/auth/invalidateToken", headers=header)
47+
token_request = requests.post(url=f"{url}/api/v1/auth/invalidate-token", headers=header)
4848
if token_request.status_code == requests.codes.no_content:
4949
logger.success("token invalidated succesfully")
5050
return True

0 commit comments

Comments
 (0)