You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**Update:**
- Splunk token is replaced **Session token**.
- Bearer is replaced with **Authentication**.
- Splunk Docs URL is pointing to latest release.
* Login using username and password will create Splunk token internally.
168
-
* Login using Credentials (username & password) OR directly using Splunk token are similar.
169
-
* In above two approaches, there is one limitation that expiration time of Splunk token cannot be extended. User has to re-login every time when token expires.
170
-
* To overcome this limitation, **Bearer** token is used instead of Splunk token.
171
-
* In **Bearer** token, user has a provision to set token expiration time. Splunk allows user to set relative/absolute time for token expiration.
172
-
* In other words, **Bearer** token is configurable whereas Splunk token cannot be configured.
173
-
174
-
#### Login using Bearer Token (RECOMMENDED)
167
+
* Login using username and password will create Session token internally.
168
+
* Login using Credentials (username & password) OR directly using Session token are similar.
169
+
* In above two approaches, there is one limitation that expiration time of Session token cannot be extended. User has to re-login every time when token expires.
170
+
* To overcome this limitation, **Authentication** token is used instead of Session token.
171
+
* In **Authentication** token, user has a provision to set token expiration time. Splunk allows user to set relative/absolute time for token expiration.
172
+
* In other words, **Authentication** token is configurable whereas Session token cannot be configured.
173
+
174
+
#### Login using Authentication Token (RECOMMENDED)
175
175
```java
176
176
importcom.splunk.Service;
177
177
importcom.splunk.ServiceArgs;
178
178
179
179
/**
180
-
* Login using Bearer token
180
+
* Login using Authentication token
181
181
*/
182
182
publicclassSplunkLogin {
183
183
184
184
staticService service =null;
185
185
/**
186
-
* Bearer Token.
186
+
* Authentication Token.
187
187
* Actual token length would be longer than this token length.
For more information on authentication using tokens, please visit [Splunk Docs](https://docs.splunk.com/Documentation/Splunk/8.2.3/Security/Setupauthenticationwithtokens).
265
+
For more information on authentication using tokens, please visit [Splunk Docs](https://docs.splunk.com/Documentation/Splunk/latest/Security/Setupauthenticationwithtokens).
0 commit comments