org.apache.tinkerpop.gremlin.groovy.jsr223.dsl.credential

## Class CredentialGraph

- java.lang.Object
- - org.apache.tinkerpop.gremlin.groovy.jsr223.dsl.credential.CredentialGraph

- Deprecated.
  As of release 3.3.3, replaced by `CredentialTraversalDsl`.

      @Deprecated
      public class CredentialGraph
      extends Object

  A DSL for managing a "credentials graph" used by Gremlin Server for simple authentication functions. If the `Graph` is transactional, new transactions will be started for each method call.
  Author:
    Stephen Mallette (http://stephen.genoprime.com)

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CredentialGraph(Graph graph)` Deprecated.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `long` | `countUsers()` Deprecated. Get a count of the number of users in the database.
    `Vertex` | `createUser(String username, String password)` Deprecated. Creates a new user.
    `static CredentialGraph` | `credentials(Graph graph)` Deprecated. Wrap up any `Graph` instance in the `CredentialGraph` DSL.
    `Vertex` | `findUser(String username)` Deprecated. Finds a user by username and return `null` if one could not be found.
    `long` | `removeUser(String username)` Deprecated. Removes a user by name.
    `String` | `toString()` Deprecated.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### CredentialGraph

          public CredentialGraph(Graph graph)

      Deprecated.

  - ### Method Detail

    - #### findUser

          public Vertex findUser(String username)

      Deprecated.
      Finds a user by username and return `null` if one could not be found.
      Throws:
        `IllegalStateException` - if there is more than one user with a particular username.

    - #### createUser

          public Vertex createUser(String username,
                                   String password)

      Deprecated.
      Creates a new user.
      Returns:
        the newly created user vertex

    - #### removeUser

          public long removeUser(String username)

      Deprecated.
      Removes a user by name.
      Returns:
        the number of users removed (which should be one or zero)

    - #### countUsers

          public long countUsers()

      Deprecated.
      Get a count of the number of users in the database.

    - #### toString

          public String toString()

      Deprecated.
      Overrides:
        `toString` in class `Object`

    - #### credentials

          public static CredentialGraph credentials(Graph graph)

      Deprecated.
      Wrap up any `Graph` instance in the `CredentialGraph` DSL.

Copyright © 2013–2019 Apache Software Foundation. All rights reserved.