// Verifies the token with the intended audience.  Returns the parsed OIDC doc
Verifies the token with the intended audience.  Returns the parsed OIDC doc
// Verifies the token with the intended audience . Returns the parsed OIDC doc
func verifyGoogleIDToken(ctx context.Context, aud string, rawToken string) (gcpIdentityDoc, error) {
	token, err := jwt.ParseWithClaims(rawToken, &gcpIdentityDoc{}, getKey)
	if err != nil {
		glog.V(2).Infof("Error parsing JWT %v", err)
		return gcpIdentityDoc{}, err
	}
	if claims, ok := token.Claims.(*gcpIdentityDoc); ok && token.Valid {
		glog.V(5).Infof("OIDC doc has Audience [%s]   Issuer [%v]", claims.Audience, claims.StandardClaims.Issuer)
		return *claims, nil
	}
	return gcpIdentityDoc{}, errors.New("Error parsing JWT Claims")
}
func verifyGoogleIDToken ( ctx context . Context , aud string , rawToken string ) ( gcpIdentityDoc , error ) { token , err := jwt . ParseWithClaims ( rawToken , & gcpIdentityDoc { } , getKey ) if err != nil { glog . V ( 2 ) . Infof ( " " , err ) return gcpIdentityDoc { } , err } if claims , ok := token . Claims . ( * gcpIdentityDoc ) ; ok && token . Valid { glog . V ( 5 ) . Infof ( " " , claims . Audience , claims . StandardClaims . Issuer ) return * claims , nil } return gcpIdentityDoc { } , errors . New ( " " ) }
Verifies the token with the intended audience.
Verifies the token with the intended audience .