Grant

public final class Grant

Class representing a Nylas Grant object.

Constructors

Link copied to clipboard
public Grant Grant(@Json(name = "id") String id, @Json(name = "provider") AuthProvider provider, @Json(name = "scope") List<String> scope, @Json(name = "created_at") Long createdAt, @Json(name = "grant_status") GrantStatus grantStatus, @Json(name = "email") String email, @Json(name = "user_agent") String userAgent, @Json(name = "ip") String ip, @Json(name = "state") String state, @Json(name = "updated_at") Long updatedAt, @Json(name = "provider_user_id") String providerUserId, @Json(name = "settings") Map<String, Object> settings)

Properties

Link copied to clipboard
private final Long createdAt

Unix timestamp when the grant was created.

Link copied to clipboard
private final String email

Email address associated with the grant.

Link copied to clipboard
private final GrantStatus grantStatus

Status of the grant, if it is still valid or if the user needs to re-authenticate.

Link copied to clipboard
private final String id

Globally unique object identifier.

Link copied to clipboard
private final String ip

End user's client IP address.

Link copied to clipboard
private final AuthProvider provider

OAuth provider that the user authenticated with.

Link copied to clipboard
private final String providerUserId

Provider's ID for the user this grant is associated with.

Link copied to clipboard
private final List<String> scope

Scopes specified for the grant.

Link copied to clipboard
private final Map<String, Object> settings

Settings required by the provider that were sent as part of the OAuth request.

Link copied to clipboard
private final String state

Initial state that was sent as part of the OAuth request.

Link copied to clipboard
private final Long updatedAt

Unix timestamp when the grant was updated.

Link copied to clipboard
private final String userAgent

End user's client user agent.

Functions

Link copied to clipboard
public final Long getCreatedAt()

Unix timestamp when the grant was created.

Link copied to clipboard
public final String getEmail()

Email address associated with the grant.

Link copied to clipboard
public final GrantStatus getGrantStatus()

Status of the grant, if it is still valid or if the user needs to re-authenticate.

Link copied to clipboard
public final String getId()

Globally unique object identifier.

Link copied to clipboard
public final String getIp()

End user's client IP address.

Link copied to clipboard
public final AuthProvider getProvider()

OAuth provider that the user authenticated with.

Link copied to clipboard
public final String getProviderUserId()

Provider's ID for the user this grant is associated with.

Link copied to clipboard
public final List<String> getScope()

Scopes specified for the grant.

Link copied to clipboard
public final Map<String, Object> getSettings()

Settings required by the provider that were sent as part of the OAuth request.

Link copied to clipboard
public final String getState()

Initial state that was sent as part of the OAuth request.

Link copied to clipboard
public final Long getUpdatedAt()

Unix timestamp when the grant was updated.

Link copied to clipboard
public final String getUserAgent()

End user's client user agent.