File tree Expand file tree Collapse file tree 4 files changed +15
-4
lines changed
astra-db-java/src/main/java/com/datastax/astra/internal/auth Expand file tree Collapse file tree 4 files changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -44,4 +44,15 @@ default String get() {
4444 */
4545 String getToken ();
4646
47+ /**
48+ * Building the token.
49+ *
50+ * @return
51+ * current token
52+ */
53+ default String getTokenAsString () {
54+ return getToken ();
55+ }
56+
57+
4758}
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ services:
1212 - DS_LICENSE=accept
1313 - HCD_AUTO_CONF_OFF=cassandra.yaml
1414 volumes :
15- - /Users/cedricklunven/dev/datastax/JAVA/astra-db-java /cassandra-hcd.yaml:/opt/hcd/resources/cassandra/conf/cassandra.yaml:rw
15+ - . /cassandra-hcd.yaml:/opt/hcd/resources/cassandra/conf/cassandra.yaml:rw
1616 ports :
1717 - " 9042:9042"
1818 healthcheck :
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ public static void main(String[] args) {
3535 int openAiEmbeddingDimension = 1536 ;
3636
3737 // Build a token in the form of Cassandra:base64(username):base64(password)
38- String token = new UsernamePasswordTokenProvider (cassandraUserName , cassandraPassword ).getToken ();
38+ String token = new UsernamePasswordTokenProvider (cassandraUserName , cassandraPassword ).getTokenAsString ();
3939 System .out .println ("1/7 - Creating Token: " + token );
4040
4141 // Initialize the client
Original file line number Diff line number Diff line change @@ -13,8 +13,8 @@ public class QuickStartLocal {
1313
1414 public static void main (String [] args ) {
1515
16- // Create a token
17- String token = new UsernamePasswordTokenProvider ("cassandra" , "cassandra" ).getToken ();
16+ // Create a Token
17+ String token = new UsernamePasswordTokenProvider ("cassandra" , "cassandra" ).getTokenAsString ();
1818 System .out .println ("Token: " + token );
1919
2020 // Initialize the client
You can’t perform that action at this time.
0 commit comments