How to get the ISRC code for a music track with a Gracenote API query - gracenote

I have tried with the following query which includes the LINK parameter which I found in the Gracenote forum. However the ISRC code is not returned:
<QUERIES>
<AUTH>
<CLIENT>xxx</CLIENT>
<USER>xxx</USER>
</AUTH>
<QUERY CMD="ALBUM_SEARCH">
<TEXT TYPE="ARTIST">Rihanna</TEXT><TEXT TYPE="TRACK_TITLE">Man Down</TEXT><TEXT TYPE="ALBUM_TITLE">Loud</TEXT><OPTION>
<PARAMETER>SELECT_EXTENDED</PARAMETER>
<VALUE>COVER,REVIEW,ARTIST_BIOGRAPHY,ARTIST_IMAGE,ARTIST_OET,MOOD,TEMPO,LINK</VALUE>
</OPTION><OPTION>
<PARAMETER>SELECT_DETAIL</PARAMETER>
<VALUE>GENRE:3LEVEL,MOOD:2LEVEL,TEMPO:3LEVEL,ARTIST_ORIGIN:4LEVEL,ARTIST_ERA:2LEVEL,ARTIST_TYPE:2LEVEL</VALUE>
</OPTION><OPTION>
<PARAMETER>COVER_SIZE</PARAMETER>
<VALUE>MEDIUM</VALUE>
</OPTION>
</QUERY>
</QUERIES>

Related

AD B2C SAML encryption error - Sequence contains no elements

I have followed the Microsoft documentation to encrypt the Assertions, but it gives me some error.
https://learn.microsoft.com/en-us/azure/active-directory-b2c/connect-with-saml-service-providers#enable-encrypted-assertions-optional
MetaData:
<EntityDescriptor xmlns="urn:oasis:names:tc:SAML:2.0:metadata" entityID="https://samltestapp2.azurewebsites.net">
<SPSSODescriptor AuthnRequestsSigned="true" WantAssertionsSigned="true" protocolSupportEnumeration=" urn:oasis:names:tc:SAML:2.0:protocol">
<NameIDFormat>urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified</NameIDFormat>
<AssertionConsumerService index="0" isDefault="true" Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" Location="https://samltestapp2.azurewebsites.net/SP/AssertionConsumer"/>
<KeyDescriptor use="encryption">
<KeyInfo xmlns="https://www.w3.org/2000/09/xmldsig#">
<X509Data>
<X509Certificate>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SmVTxMDHQpZ6k9fdms2Rdidl0o6BKKtjdkeE fH/F9XGJ2EbQKNwD</X509Certificate>
</X509Data>
</KeyInfo>
</KeyDescriptor>
</SPSSODescriptor>
</EntityDescriptor>
Relying party file:
<RelyingParty>
<DefaultUserJourney ReferenceId="SignUpOrSignInSAML" />
<UserJourneyBehaviors>
<JourneyInsights TelemetryEngine="ApplicationInsights" InstrumentationKey="xxxxxxxxxxxxxx" DeveloperMode="true" ClientEnabled="false" ServerEnabled="true" TelemetryVersion="1.0.0" />
<ScriptExecution>Allow</ScriptExecution>
</UserJourneyBehaviors>
<TechnicalProfile Id="PolicyProfile">
<DisplayName>PolicyProfile</DisplayName>
<Protocol Name="SAML2"/>
<Metadata>
<Item Key="PartnerEntity">{Settings:MetadataURL}</Item>
<Item Key="ResponsesSigned">false</Item>
<Item Key="WantsEncryptedAssertions">true</Item>
<Item Key="IdpInitiatedProfileEnabled">true</Item>
</Metadata>
<OutputClaims>
<OutputClaim ClaimTypeReferenceId="givenName" PartnerClaimType="givenName" />
<OutputClaim ClaimTypeReferenceId="surname" PartnerClaimType="surname" />
<OutputClaim ClaimTypeReferenceId="signInName" PartnerClaimType="sub"/>
</OutputClaims>
<SubjectNamingInfo ClaimType="sub" />
</TechnicalProfile>
</RelyingParty>
Saml2AssertionIssuer:
<TechnicalProfile Id="Saml2AssertionIssuer">
<DisplayName>Token Issuer</DisplayName>
<Protocol Name="SAML2"/>
<OutputTokenFormat>SAML2</OutputTokenFormat>
<Metadata>
<!-- The issuer contains the policy name; it should be the same name as configured in the relying party application. B2C_1A_signup_signin_SAML is used below. -->
<Item Key="IssuerUri">{Settings:SignupSignInSAMLIssuerURI}</Item>
</Metadata>
<CryptographicKeys>
<Key Id="MetadataSigning" StorageReferenceId="B2C_1A_SamlIdpCert"/>
<Key Id="SamlAssertionSigning" StorageReferenceId="B2C_1A_SamlIdpCert"/>
<Key Id="SamlMessageSigning" StorageReferenceId="B2C_1A_SamlIdpCert"/>
<Key Id="SamlAssertionDecryption" StorageReferenceId="B2C_1A_SamlIdpCertEnc"/>
</CryptographicKeys>
<InputClaims/>
<OutputClaims/>
<UseTechnicalProfileForSessionManagement ReferenceId="SM-Saml-issuer"/>
</TechnicalProfile>
I am getting the below error. It is working properly without encryption, but if I enable the encryption getting that issue. Can someone suggest me a way to resolve this error.
Thanks #Saravana. WantsSignedAssertion indicates whether the technical profile requires all incoming assertions to be signed and SAML Response Assertion elements received by the relying party application must be signed. B2C requires both, the message and the assertion to be signed. If only assertion is signed, then it fails, and B2C does not accept it.
Please verify with the SAML decoder tool and see if both the assertion and the message are signed or not.
Please let us know if you need more help.
Reference:- https://github.com/azure-ad-b2c/saml-sp/blob/master/saml-rp-spec.md

Flutter_Web_AUTH Redirect URI

I need some help with redirect URIs. I never used these before. So I have been trying to get Spotify authentication working and redirecting back to my application. I did what most people do I copied the code from this question and got it working with the suggestions from the answers.
StackOverflow URI Question
AndriodManifest.xml
<activity android:name="com.linusu.flutter_web_auth.CallbackActivity" >
<intent-filter android:label="flutter_web_auth">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="partyai"/>
</intent-filter>
</activity>
musiccontroller.dart
void loginSpotify() async {
// Present the dialog to the user
final result = await FlutterWebAuth.authenticate(
url:
"https://accounts.spotify.com/de/authorize?client_id=[client id is here ]\&response_type=token&redirect_uri=partyai://callback&scope=user-read-private%20user-read-email&state=34fFs29kd09",
callbackUrlScheme: "partyai",
);
// Extract token from resulting url
final token = Uri.parse(result);
String at = token.fragment;
at = "http://website/index.html?$at"; // Just for easy persing
var accesstoken = Uri.parse(at).queryParameters['access_token'];
print('token');
print(accesstoken);
}
So this code works perfectly fine. However, when I try to modify the "partyai" to "[mycustomname]" the program now doesn't redirect back to flutter nor does it receive the access token. Is there something I need to configure that the original person configured? like a redirect_url auth service? I'm not sure if that makes sense but please feel free to comment with any suggestions.
Also here's a list of URIs whitelisted in my Spotify developer account
queursion://callback
partyai://callback

Are the XML APIs deprecated in Authorize.Net?

I heard that authorize.net has a new API. I use an API to manage recurring payments where I send XML requests of the form shown below (in PHP, i.e. $authnet_ etc . will be replaced by actual values). Is this deprecated?
<?xml version=\"1.0\" encoding=\"UTF-8\" ?>
<ARBCreateSubscriptionRequest xmlns= \"AnetApi/xml/v1/schema/AnetApiSchema.xsd\">
<merchantAuthentication>
<name>$authnet_loginname</name>
<transactionKey>$authnet_transactionkey</transactionKey>
</merchantAuthentication>
<subscription>
<name>{$name}</name>
<paymentSchedule>
<interval>
<length>$length</length>
<unit>$unit</unit>
</interval>
<startDate>$startDate</startDate>
<totalOccurrences>$totalOccurrences</totalOccurrences>
</paymentSchedule>
<amount>$intern_amount</amount>
<payment>
<creditCard>
<cardNumber>$x_card_number</cardNumber>
<expirationDate>$expirationDate</expirationDate>
</creditCard>
</payment>
<order>
<invoiceNumber>$action_id</invoiceNumber>
<description>$description</description>
</order>
<customer>
<email>$x_email</email>
<phoneNumber> $x_phone </phoneNumber>
</customer>
<billTo>
<firstName>$intern_first_name</firstName>
<lastName>$intern_last_name</lastName>
<address>$intern_address</address>
<city>$intern_city</city>
<state>$intern_state</state>
<zip>$intern_zip</zip>
<country>$intern_country</country>
</billTo>
<shipTo>
<firstName>$intern_ship_to_first_name</firstName>
<lastName>$intern_ship_to_last_name</lastName>
<address>$intern_ship_to_address</address>
<city>$intern_ship_to_city</city>
<state>$intern_ship_to_state</state>
<zip>$intern_ship_to_zip</zip>
<country>$intern_ship_to_country</country>
</shipTo>
</subscription>
</ARBCreateSubscriptionRequest>
Authorize.Net did not deprecate XML formatted API requests. They work in parallel with the newer JSON format.
They still list it on their API Reference and documentation.

ERP Operation not found error in WSO2EI DSS

I have created a REST - data service in WSO2EI an tried accessing through postman client tool, but I am getting this error.
End Point: http://LAPTOP-T4F1HOAM:8280/services/getStudRecNo?user_id=test8
The endpoint reference (EPR) for the Operation not found is /services/getStudRecNo?user_id=test8 and the WSA Action = null. If this EPR was previously reachable, please contact the server administrator.
Can anyone please help.
Thanks
dss code.
<data name="getStudRecNo" transports="http https local">
<description>get student unique id</description>
<config enableOData="false" id="mySchoolDB">
<property name="driverClassName">org.postgresql.Driver</property>
<property name="url">jdbc:postgresql://localhost:5432/mySchool</property>
<property name="username">admin</property>
<property name="password">admin</property>
</config>
<query id="GetStudentRecordNo" useConfig="mySchoolDB">
<sql>SELECT getstudentid FROM getstudentid(?)</sql>
<result outputType="json">{"entries": {"entry": [ { "getstudentid": "$getstudentid"} ]}}</result>
<param defaultValue="TEST" name="user_id" sqlType="STRING"/>
</query>
<operation name="getsrno">
<call-query href="GetStudentRecordNo">
<with-param name="user_id" query-param="user_id"/>
</call-query>
</operation>
<resource method="GET" path="getsrno">
<call-query href="GetStudentRecordNo">
<with-param name="user_id" query-param="user_id"/>
</call-query>
</resource>
</data>
You have to append the resource path ("getsrno" in your case) to the URL. Then the URL would look like,
http://LAPTOP-T4F1HOAM:8280/services/getStudRecNo/getsrno?user_id=test8
Further, since the resource's HTTP method is GET, the request should also be a GET request.

NLog - DDL for Log Table and Setting the ConnectionString Programmatically

1:
Is there a create statement for the Database Target Log Table for all the possible fields documented somewhere? I created one by guessing and I could check the source, but it would be handy if the generic SQL was available. I searched StackOverflow and the NLog site, but the SQL I found was dated and contained incorrect field types.
2:
If you're configuring a database target from a nlog.config file, how do you programmatically set the connection string? Something like:
Logger dbLogger = LogManager.GetLogger("dbLogger");
DatabaseTarget t = dbLogger.GetDatabaseTarget;
t.ConnectionString = "...";
in application_start.
Thanks in advance.
Is this below sample helpful to you? I found this in nlog site. Have you tried this?
<target xsi:type="Database" name="db">
<!-- SQL command to be executed for each entry -->
<commandText>INSERT INTO [LogEntries](TimeStamp, Message, Level, Logger) VALUES(getutcdate(), #msg, #level, #logger)</commandText>
<!-- parameters for the command -->
<parameter name="#msg" layout="${message}" />
<parameter name="#level" layout="${level}" />
<parameter name="#logger" layout="${logger}" />
<!-- connection string -->
<dbProvider>System.Data.SqlClient</dbProvider>
<connectionString>server=.\SQLEXPRESS;database=MyLogs;integrated security=sspi</connectionString>
<!-- commands to install database -->
<install-command>
<text>CREATE DATABASE MyLogs</text>
<connectionString>server=.\SQLEXPRESS;database=master;integrated security=sspi</connectionString>
<ignoreFailures>true</ignoreFailures>
</install-command>
<install-command>
<text>
CREATE TABLE LogEntries(
id int primary key not null identity(1,1),
TimeStamp datetime2,
Message nvarchar(max),
level nvarchar(10),
logger nvarchar(128))
</text>
</install-command>
<!-- commands to uninstall database -->
<uninstall-command>
<text>DROP DATABASE MyLogs</text>
<connectionString>server=.\SQLEXPRESS;database=master;integrated security=sspi</connectionString>
<ignoreFailures>true</ignoreFailures>
</uninstall-command>
</target>

Resources