public final class

TenantAwareFirebaseAuth

extends AbstractFirebaseAuth
java.lang.Object
   ↳ com.google.firebase.auth.AbstractFirebaseAuth
     ↳ com.google.firebase.auth.multitenancy.TenantAwareFirebaseAuth

Class Overview

The tenant-aware Firebase client.

This can be used to perform a variety of authentication-related operations, scoped to a particular tenant.

Summary

Public Methods
String createSessionCookie(String idToken, SessionCookieOptions options)
Creates a new Firebase session cookie from the given ID token and options.
ApiFuture<String> createSessionCookieAsync(String idToken, SessionCookieOptions options)
Similar to createSessionCookie(String, SessionCookieOptions) but performs the operation asynchronously.
String getTenantId()
Returns the client's tenant ID.
[Expand]
Inherited Methods
From class com.google.firebase.auth.AbstractFirebaseAuth
From class java.lang.Object

Public Methods

public String createSessionCookie (String idToken, SessionCookieOptions options)

Creates a new Firebase session cookie from the given ID token and options. The returned JWT can be set as a server-side session cookie with a custom cookie policy.

Parameters
idToken The Firebase ID token to exchange for a session cookie.
options Additional options required to create the cookie.
Returns
  • A Firebase session cookie string.

public ApiFuture<String> createSessionCookieAsync (String idToken, SessionCookieOptions options)

Similar to createSessionCookie(String, SessionCookieOptions) but performs the operation asynchronously.

Parameters
idToken The Firebase ID token to exchange for a session cookie.
options Additional options required to create the cookie.
Returns
  • An ApiFuture which will complete successfully with a session cookie string. If an error occurs while generating the cookie or if the specified ID token is invalid, the future throws a FirebaseAuthException.

public String getTenantId ()

Returns the client's tenant ID.