File tree Expand file tree Collapse file tree 3 files changed +32
-32
lines changed
main/java/com/databricks/sdk/core/oauth
test/java/com/databricks/sdk/core/oauth Expand file tree Collapse file tree 3 files changed +32
-32
lines changed Original file line number Diff line number Diff line change 11package com .databricks .sdk .core .oauth ;
22
33/**
4- * Represents an ID Token provided by an identity provider from an OAuth flow.
5- * This token can later be exchanged for an access token.
4+ * Represents an ID Token provided by an identity provider from an OAuth flow. This token can later
5+ * be exchanged for an access token.
66 */
77public class IDToken {
8- // The string value of the ID Token
9- private final String value ;
8+ // The string value of the ID Token
9+ private final String value ;
1010
11- /**
12- * Constructs an IDToken with a value.
13- * @param value The ID Token string.
14- */
15- public IDToken (String value ) {
16- this .value = value ;
17- }
11+ /**
12+ * Constructs an IDToken with a value.
13+ *
14+ * @param value The ID Token string.
15+ */
16+ public IDToken (String value ) {
17+ this .value = value ;
18+ }
1819
19- public String getValue () {
20- return value ;
21- }
22- }
20+ public String getValue () {
21+ return value ;
22+ }
23+ }
Original file line number Diff line number Diff line change 11package com .databricks .sdk .core .oauth ;
22
3- /**
4- * IDTokenSource is anything that returns an IDToken given an audience.
5- */
3+ /** IDTokenSource is anything that returns an IDToken given an audience. */
64public interface IDTokenSource {
7- /**
8- * Retrieves an ID Token for the specified audience.
9- *
10- * @param audience The intended recipient of the ID Token.
11- * @return An {@link IDToken} containing the token value.
12- */
13- IDToken getIDToken (String audience );
14- }
5+ /**
6+ * Retrieves an ID Token for the specified audience.
7+ *
8+ * @param audience The intended recipient of the ID Token.
9+ * @return An {@link IDToken} containing the token value.
10+ */
11+ IDToken getIDToken (String audience );
12+ }
Original file line number Diff line number Diff line change 11package com .databricks .sdk .core .oauth ;
22
33import static org .junit .jupiter .api .Assertions .assertEquals ;
4+
45import org .junit .jupiter .api .Test ;
56
67public class IDTokenTest {
78
8- private static final String accessToken = "testIdToken" ;
9+ private static final String accessToken = "testIdToken" ;
910
10- @ Test
11- void createIDToken () {
12- IDToken idToken = new IDToken (accessToken );
13- assertEquals (accessToken , idToken .getValue ());
14- }
11+ @ Test
12+ void createIDToken () {
13+ IDToken idToken = new IDToken (accessToken );
14+ assertEquals (accessToken , idToken .getValue ());
15+ }
1516}
You can’t perform that action at this time.
0 commit comments