public class ProxyAuthentication extends Object
Constructor and Description |
---|
ProxyAuthentication() |
Modifier and Type | Method and Description |
---|---|
static <StatementT extends GraphStatement<StatementT>> |
executeAs(String userOrRole,
StatementT statement)
Adds proxy authentication information to a graph statement.
|
static <StatementT extends Statement<StatementT>> |
executeAs(String userOrRole,
StatementT statement)
Adds proxy authentication information to a CQL statement.
|
@NonNull public static <StatementT extends Statement<StatementT>> StatementT executeAs(@NonNull String userOrRole, @NonNull StatementT statement)
This allows executing a statement as another role than the one the session is currently authenticated as.
userOrRole
- the role to use for execution. If the statement was already configured with
another role, it will get replaced by this one.statement
- the statement to modify.statement
, but acting as the
provided role. Note: with the driver's default implementations, this will always be a copy;
but if you use a custom implementation, it might return the same instance (depending on the
behavior of statement.setCustomPayload()
).@NonNull public static <StatementT extends GraphStatement<StatementT>> StatementT executeAs(@NonNull String userOrRole, @NonNull StatementT statement)
executeAs(String, Statement)
Copyright © 2017–2024. All rights reserved.