GlideOAuthClientRequest - Scoped, Global
-
- UpdatedJan 30, 2025
- 2 minutes to read
- Yokohama
- API reference
The GlideOAuthClientRequest API provides methods for handling OAuth client requests.
You can use this API in global and scoped scripts. In scoped scripts use the sn_auth
namespace identifier.
GlideOAuthClientRequest - getGrantType()
Retrieves the grant type.
Name | Type | Description |
---|---|---|
none |
Type | Description |
---|---|
String | The grant type. |
GlideOAuthClientRequest - getHeader(String name)
Retrieves the HTTP headers for the string you provide.
Name | Type | Description |
---|---|---|
name | String | The name of the parameter. |
Type | Description |
---|---|
StringMap | The string map with the HTTP headers. |
GlideOAuthClientRequest - getHeaders()
Retrieves the HTTP headers.
Name | Type | Description |
---|---|---|
none |
Type | Description |
---|---|
StringMap | The string map with the HTTP headers. |
GlideOAuthClientRequest - getParameter(String name)
Retrieves the parameters for the parameter name you provide.
Name | Type | Description |
---|---|---|
name | String | The parameter name for which you want the parameters. |
Type | Description |
---|---|
String | The parameters. |
GlideOAuthClientRequest - getPassword()
Retrieves the password.
Name | Type | Description |
---|---|---|
none |
Type | Description |
---|---|
String | The password. |
GlideOAuthClientRequest - getRefreshToken()
Retrieves the refresh token.
Name | Type | Description |
---|---|---|
none |
Type | Description |
---|---|
String | The refresh token. |
GlideOAuthClientRequest - getScope()
Retrieves the scope.
Name | Type | Description |
---|---|---|
none |
Type | Description |
---|---|
String | The scope. |
GlideOAuthClientRequest - getUserName()
Retrieves the user name.
Name | Type | Description |
---|---|---|
none |
Type | Description |
---|---|
String | The user name. |
GlideOAuthClientRequest - setGrantType(String grantType)
Sets the grant type for the string you provide.
Name | Type | Description |
---|---|---|
name | String | The grant type. |
Type | Description |
---|---|
void |
GlideOAuthClientRequest - setHead(String name, String value)
Retrieves the HTTP headers for the string you provide.
Name | Type | Description |
---|---|---|
name | String | The name of the parameter. |
value | String | The value of the parameter. |
Type | Description |
---|---|
void |
GlideOAuthClientRequest - setParameter(String name, String value)
Sets the parameters for the name:value pair of strings you provide.
Name | Type | Description |
---|---|---|
name | String | The parameter name for which you want the parameters. |
value | String | The value of the parameter. |
Type | Description |
---|---|
void |
GlideOAuthClientRequest - setPassword(String password)
Sets the password with the string you provide.
Name | Type | Description |
---|---|---|
password | String | The user name. |
Type | Description |
---|---|
void |
GlideOAuthClientRequest - setRefreshToken(String refreshToken)
Sets the refresh token with the string you provide.
Name | Type | Description |
---|---|---|
refreshToken | String | The refresh token. |
Type | Description |
---|---|
void |
Example
This example shows a resource owner password grant type request.
This example shows a refresh token grant type request.
GlideOAuthClientRequest - setScope(String scope)
Sets the scope for the string you provide.
Name | Type | Description |
---|---|---|
scope | String | The scope. |
Type | Description |
---|---|
void |
GlideOAuthClientRequest - setUserName(String userName)
Sets the user name with the string you provide.
Name | Type | Description |
---|---|---|
userName | String | The user name. |
Type | Description |
---|---|
void |
On this page
- GlideOAuthClientRequest - getGrantType()
- GlideOAuthClientRequest - getHeader(String name)
- GlideOAuthClientRequest - getHeaders()
- GlideOAuthClientRequest - getParameter(String name)
- GlideOAuthClientRequest - getPassword()
- GlideOAuthClientRequest - getRefreshToken()
- GlideOAuthClientRequest - getScope()
- GlideOAuthClientRequest - getUserName()
- GlideOAuthClientRequest - setGrantType(String grantType)
- GlideOAuthClientRequest - setHead(String name, String value)
- GlideOAuthClientRequest - setParameter(String name, String value)
- GlideOAuthClientRequest - setPassword(String password)
- GlideOAuthClientRequest - setRefreshToken(String refreshToken)
- GlideOAuthClientRequest - setScope(String scope)
- GlideOAuthClientRequest - setUserName(String userName)