generated from deploymenttheory/Template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
jamfpro_api_handler_constants.go
60 lines (50 loc) · 3.48 KB
/
jamfpro_api_handler_constants.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
package jamfpro
// Endpoint constants represent the URL suffixes used for Jamf API token interactions.
const (
APIName = "jamf pro" // APIName: represents the name of the API.
DefaultBaseDomain = ".jamfcloud.com" // DefaultBaseDomain: represents the base domain for the jamf instance.
OAuthTokenEndpoint = "/api/oauth/token" // OAuthTokenEndpoint: The endpoint to obtain an OAuth token.
OAuthTokenScope = "" // OAuthTokenScope: Not used for Jamf.
BearerTokenEndpoint = "/api/v1/auth/token" // BearerTokenEndpoint: The endpoint to obtain a bearer token.
TokenRefreshEndpoint = "/api/v1/auth/keep-alive" // TokenRefreshEndpoint: The endpoint to refresh an existing token.
TokenInvalidateEndpoint = "/api/v1/auth/invalidate-token" // TokenInvalidateEndpoint: The endpoint to invalidate an active token.
BearerTokenAuthenticationSupport = true // BearerTokenAuthSuppport: A boolean to indicate if the API supports bearer token authentication.
OAuthAuthenticationSupport = true // OAuthAuthSuppport: A boolean to indicate if the API supports OAuth authentication.
OAuthWithCertAuthenticationSupport = false // OAuthWithCertAuthSuppport: A boolean to indicate if the API supports OAuth with client certificate authentication.
)
// GetDefaultBaseDomain returns the default base domain used for constructing API URLs to the http client.
func (j *JamfAPIHandler) GetDefaultBaseDomain() string {
return DefaultBaseDomain
}
// GetOAuthTokenEndpoint returns the endpoint for obtaining an OAuth token. Used for constructing API URLs for the http client.
func (j *JamfAPIHandler) GetOAuthTokenEndpoint() string {
return OAuthTokenEndpoint
}
// GetOAuthTokenScope returns the scope for the OAuth token scope
func (j *JamfAPIHandler) GetOAuthTokenScope() string {
return OAuthTokenScope
}
// GetBearerTokenEndpoint returns the endpoint for obtaining a bearer token. Used for constructing API URLs for the http client.
func (j *JamfAPIHandler) GetBearerTokenEndpoint() string {
return BearerTokenEndpoint
}
// GetTokenRefreshEndpoint returns the endpoint for refreshing an existing token. Used for constructing API URLs for the http client.
func (j *JamfAPIHandler) GetTokenRefreshEndpoint() string {
return TokenRefreshEndpoint
}
// GetTokenInvalidateEndpoint returns the endpoint for invalidating an active token. Used for constructing API URLs for the http client.
func (j *JamfAPIHandler) GetTokenInvalidateEndpoint() string {
return TokenInvalidateEndpoint
}
// GetAPIBearerTokenAuthenticationSupportStatus returns a boolean indicating if bearer token authentication is supported in the api handler.
func (j *JamfAPIHandler) GetAPIBearerTokenAuthenticationSupportStatus() bool {
return BearerTokenAuthenticationSupport
}
// GetAPIOAuthAuthenticationSupportStatus returns a boolean indicating if OAuth authentication is supported in the api handler.
func (j *JamfAPIHandler) GetAPIOAuthAuthenticationSupportStatus() bool {
return OAuthAuthenticationSupport
}
// GetAPIOAuthWithCertAuthenticationSupportStatus returns a boolean indicating if OAuth with client certificate authentication is supported in the api handler.
func (j *JamfAPIHandler) GetAPIOAuthWithCertAuthenticationSupportStatus() bool {
return OAuthWithCertAuthenticationSupport
}