com.google.firebase.auth.internal.CryptoSigner Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of firebase-admin Show documentation
Show all versions of firebase-admin Show documentation
This is the official Firebase Admin Java SDK. Build extraordinary native JVM apps in
minutes with Firebase. The Firebase platform can power your app’s backend, user
authentication, static hosting, and more.
The newest version!
/*
* Copyright 2018 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.firebase.auth.internal;
import com.google.firebase.auth.FirebaseAuthException;
import com.google.firebase.internal.NonNull;
import java.io.IOException;
/**
* Represents an object that can be used to cryptographically sign data. Mainly used for signing
* custom JWT tokens issued to Firebase users.
*
* See {@link com.google.firebase.auth.FirebaseAuth#createCustomToken(String)}.
*/
interface CryptoSigner {
/**
* Signs the given payload.
*
* @param payload Data to be signed
* @return Signature as a byte array
* @throws FirebaseAuthException If an error occurs during signing
*/
@NonNull
byte[] sign(@NonNull byte[] payload) throws FirebaseAuthException;
/**
* Returns the client email of the service account used to sign payloads.
*
* @return A service account client email
*/
@NonNull
String getAccount();
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy