> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cdp.coinbase.com/llms.txt
> Use this file to discover all available pages before exploring further.

# AuthenticationMethod

> AuthenticationMethod API reference.

Package: [`com.coinbase.cdp.types`](/sdks/cdp-sdks-v2/java/com/coinbase/cdp/types/index)

```java theme={null}
public final class AuthenticationMethod extends Object
```

## Method Details

### `get`

```java theme={null}
public Object get()
```

**Returns:**

`Object`

### `visit`

```java theme={null}
public <T> T visit(AuthenticationMethod.Visitor<T> visitor)
```

**Parameters:**

`visitor` - [AuthenticationMethod](/sdks/cdp-sdks-v2/java/com/coinbase/cdp/types/AuthenticationMethod).`Visitor`\<`T`>

**Returns:**

`T`

### `equals`

```java theme={null}
public boolean equals(Object other)
```

**Overrides:**

`[equals](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#equals\(java.lang.Object\) "class or interface in java.lang")` in class `[Object](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html "class or interface in java.lang")`

**Parameters:**

`other` - `Object`

**Returns:**

`boolean`

### `hashCode`

```java theme={null}
public int hashCode()
```

**Overrides:**

`[hashCode](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#hashCode\(\) "class or interface in java.lang")` in class `[Object](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html "class or interface in java.lang")`

**Returns:**

`int`

### `toString`

```java theme={null}
public String toString()
```

**Overrides:**

`[toString](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#toString\(\) "class or interface in java.lang")` in class `[Object](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html "class or interface in java.lang")`

**Returns:**

`String`

### `of`

**Overload 1**

```java theme={null}
public static AuthenticationMethod of(DeveloperJwtAuthentication value)
```

**Parameters:**

`value` - [DeveloperJwtAuthentication](/sdks/cdp-sdks-v2/java/com/coinbase/cdp/types/DeveloperJwtAuthentication)

**Returns:**

[AuthenticationMethod](/sdks/cdp-sdks-v2/java/com/coinbase/cdp/types/AuthenticationMethod)

**Overload 2**

```java theme={null}
public static AuthenticationMethod of(EmailAuthentication value)
```

**Parameters:**

`value` - [EmailAuthentication](/sdks/cdp-sdks-v2/java/com/coinbase/cdp/types/EmailAuthentication)

**Returns:**

[AuthenticationMethod](/sdks/cdp-sdks-v2/java/com/coinbase/cdp/types/AuthenticationMethod)

**Overload 3**

```java theme={null}
public static AuthenticationMethod of(OAuth2Authentication value)
```

**Parameters:**

`value` - [OAuth2Authentication](/sdks/cdp-sdks-v2/java/com/coinbase/cdp/types/OAuth2Authentication)

**Returns:**

[AuthenticationMethod](/sdks/cdp-sdks-v2/java/com/coinbase/cdp/types/AuthenticationMethod)

**Overload 4**

```java theme={null}
public static AuthenticationMethod of(SiweAuthentication value)
```

**Parameters:**

`value` - [SiweAuthentication](/sdks/cdp-sdks-v2/java/com/coinbase/cdp/types/SiweAuthentication)

**Returns:**

[AuthenticationMethod](/sdks/cdp-sdks-v2/java/com/coinbase/cdp/types/AuthenticationMethod)

**Overload 5**

```java theme={null}
public static AuthenticationMethod of(SmsAuthentication value)
```

**Parameters:**

`value` - [SmsAuthentication](/sdks/cdp-sdks-v2/java/com/coinbase/cdp/types/SmsAuthentication)

**Returns:**

[AuthenticationMethod](/sdks/cdp-sdks-v2/java/com/coinbase/cdp/types/AuthenticationMethod)

**Overload 6**

```java theme={null}
public static AuthenticationMethod of(TelegramAuthentication value)
```

**Parameters:**

`value` - [TelegramAuthentication](/sdks/cdp-sdks-v2/java/com/coinbase/cdp/types/TelegramAuthentication)

**Returns:**

[AuthenticationMethod](/sdks/cdp-sdks-v2/java/com/coinbase/cdp/types/AuthenticationMethod)
