Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package com.databricks.sdk.core.oauth;

/**
* Represents an ID Token provided by an identity provider from an OAuth flow.
* IDToken is a token that can be exchanged for an access token.
*/
public class IDToken {
// The string value of the ID Token
private final String value;

/**
* Constructs an IDToken with a value.
* @param value The ID Token string.
*/
public IDToken(String value) {
this.value = value;
}

public String getValue() {
return value;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package com.databricks.sdk.core.oauth;

/**
* IDTokenSource is anything that returns an IDToken given an audience.
*/
public interface IDTokenSource {
/**
* Retrieves an ID Token for the specified audience.
*
* @param audience The intended recipient of the ID Token.
* @return An {@link IDToken} containing the token value.
*/
IDToken getIDToken(String audience);
}
Loading