public class FileIDTokenSource extends Object implements IDTokenSource
IDTokenSource that reads the ID token from a file. The token is read
using UTF-8 encoding and any leading/trailing whitespace is trimmed. The file should contain
exactly one non-empty line with the token value. Files with multiple non-empty lines or only
empty lines will result in an error.IDTokenSource| Constructor and Description |
|---|
FileIDTokenSource(String filePath)
Creates a new FileIDTokenSource that reads from the specified file.
|
| Modifier and Type | Method and Description |
|---|---|
IDToken |
getIDToken(String audience)
Retrieves an ID Token from the file.
|
public FileIDTokenSource(String filePath)
filePath - Path to the file containing the ID token. The file should contain a single line
with the token value.IllegalArgumentException - if the file path is null or empty.public IDToken getIDToken(String audience)
getIDToken in interface IDTokenSourceaudience - The intended recipient of the ID Token. This parameter is not used in this
implementation as the token is read directly from the file.IDToken containing the token value from the file.IllegalArgumentException - if the file path is null or empty.DatabricksException - in the following cases:
Copyright © 2025. All rights reserved.