coreFirebase

package
v2024.14.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 17, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package coreFirebase

This is the STY-Holdings shared services

NOTES:

None

COPYRIGHT & WARRANTY:

Copyright (c) 2022 STY-Holdings, inc
All rights reserved.

This software is the confidential and proprietary information of STY-Holdings, Inc.
Use is subject to license terms.

Unauthorized copying of this file, via any medium is strictly prohibited.

Proprietary and confidential

Written by <Replace with FULL_NAME> / syacko
STY-Holdings, Inc.
support@sty-holdings.com
www.sty-holdings.com

01-2024
USA

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 coreFirebase

This is the STY-Holdings shared services

NOTES:

None

COPYRIGHT & WARRANTY:

Copyright (c) 2022 STY-Holdings, inc
All rights reserved.

This software is the confidential and proprietary information of STY-Holdings, Inc.
Use is subject to license terms.

Unauthorized copying of this file, via any medium is strictly prohibited.

Proprietary and confidential

Written by <Replace with FULL_NAME> / syacko
STY-Holdings, Inc.
support@sty-holdings.com
www.sty-holdings.com

01-2024
USA

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.

Index

Constants

View Source
const (
	//
	//goland:noinspection ALL
	TEST_FIREBASE_IDTOKEN_VALID   = "" /* 934-byte string literal not displayed */
	TEST_FIREBASE_IDTOKEN_INVALID = "" /* 922-byte string literal not displayed */
)

Variables

View Source
var (
	CTXBackground = context.Background()
)

Functions

func FindFirebaseAuthUser

func FindFirebaseAuthUser(
	authPtr *auth.Client,
	requestorId string,
) (
	userRecordPtr *auth.UserRecord,
	errorInfo pi.ErrorInfo,
)

FindFirebaseAuthUser - determines if the user exists in the Firebase Auth database. If so, then pointer to the user is return, otherwise, an error.

func GetFirebaseAppAuthConnection

func GetFirebaseAppAuthConnection(credentialsLocation string) (
	appPtr *firebase.App,
	authPtr *auth.Client,
	errorInfo pi.ErrorInfo,
)

GetFirebaseFirestoreConnection

func GetFirebaseAuthConnection

func GetFirebaseAuthConnection(appPtr *firebase.App) (
	authPtr *auth.Client,
	errorInfo pi.ErrorInfo,
)

GetFirebaseAuthConnection - creates a new Firebase Auth Connection

func GetFirebaseIdTokenPayload

func GetFirebaseIdTokenPayload(
	authPtr *auth.Client,
	idToken string,
) (
	tokenPayload map[any]interface{},
	errorInfo pi.ErrorInfo,
)

GetFirebaseIdTokenPayload

func GetIdTokenPtr

func GetIdTokenPtr(
	authPtr *auth.Client,
	idToken string,
) (
	IdTokenPtr *auth.Token,
	errorInfo pi.ErrorInfo,
)

GetIdTokenPtr

func IsFirebaseIdTokenValid

func IsFirebaseIdTokenValid(
	authPtr *auth.Client,
	idToken string,
) bool

IsFirebaseIdTokenValid

func NewFirebaseApp

func NewFirebaseApp(credentialsLocation string) (
	appPtr *firebase.App,
	errorInfo pi.ErrorInfo,
)

NewFirebaseApp - creates a new Firebase App

func SetFirebaseAuthEmailVerified

func SetFirebaseAuthEmailVerified(
	authPtr *auth.Client,
	requestorId string,
) (errorInfo pi.ErrorInfo)

SetFirebaseAuthEmailVerified - This will set the Firebase Auth email verify flag to true

func ValidateFirebaseJWTPayload

func ValidateFirebaseJWTPayload(
	tokenPayload map[any]interface{},
	audience, issuer string,
) (errorInfo pi.ErrorInfo)

ValidateFirebaseJWTPayload - Firebase ID Token that is returned when a user logs on successfully

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL