public function create(array $body = [])
    {
        $body = OptionsResolver::resolve($body, [
            'id', 'policies', 'meta', 'no_parent', 'no_default_policy',
            'renewable', 'ttl', 'explicit_max_ttl', 'display_name', 'num_uses'
        ]);

        $params = [
            'body' => json_encode($body)
        ];

        return $this->client->post('/v1/auth/token/create', $params)->json();
    }
public function create(array $body = [])
    {
        $body = OptionsResolver::resolve($body, [
            'id', 'policies', 'meta', 'no_parent', 'no_default_policy',
            'renewable', 'ttl', 'explicit_max_ttl', 'display_name', 'num_uses'
        ]);

        $params = [
            'body' => json_encode($body)
        ];

        return $this->client->post('/v1/auth/token/create', $params)->json();
    }
public function create ( array $ body = [ ] ) { $ body = OptionsResolver :: resolve ( $ body , [ 'id' , 'policies' , 'meta' , 'no_parent' , 'no_default_policy' , 'renewable' , 'ttl' , 'explicit_max_ttl' , 'display_name' , 'num_uses' ] ) ; $ params = [ 'body' => json_encode ( $ body ) ] ; return $ this -> client -> post ( '/v1/auth/token/create' , $ params ) -> json ( ) ; }
Creates a new token.

Certain options are only available when called by a root token.

If used via the /auth/token/create-orphan endpoint, a root token is not required to create an orphan token
(otherwise set with the no_parent option). If used with a role name in the path, the token will be created
against the specified role name; this may override options set during this call.

@see    https://www.vaultproject.io/docs/auth/token.html
@param  array  $body
@return mixed
Creates a new token .