// ObtainAccessClaimsFromMetadata obtains token claims from given context with gRPC metadata.
ObtainAccessClaimsFromMetadata obtains token claims from given context with gRPC metadata.
// ObtainAccessClaimsFromMetadata obtains token claims from given context with gRPC metadata .
func (ad *SysAccountRepo) ObtainAccessClaimsFromMetadata(ctx context.Context, isAccess bool) (claims sharedAuth.TokenClaims, err error) {
	var authmeta string
	if authmeta, err = sharedAuth.FromMetadata(ctx); err != nil {
		return sharedAuth.TokenClaims{}, err
	}
	if claims, err = ad.tokenCfg.ParseTokenStringToClaim(authmeta, isAccess); err != nil {
		return sharedAuth.TokenClaims{}, err
	}
	return claims, nil
}
func ( ad * SysAccountRepo ) ObtainAccessClaimsFromMetadata ( ctx context . Context , isAccess bool ) ( claims sharedAuth . TokenClaims , err error ) { var authmeta string if authmeta , err = sharedAuth . FromMetadata ( ctx ) ; err != nil { return sharedAuth . TokenClaims { } , err } if claims , err = ad . tokenCfg . ParseTokenStringToClaim ( authmeta , isAccess ) ; err != nil { return sharedAuth . TokenClaims { } , err } return claims , nil }
ObtainAccessClaimsFromMetadata obtains token claims from given context with gRPC metadata.
ObtainAccessClaimsFromMetadata obtains token claims from given context with gRPC metadata .