Android Question Jason Web Signature (JWS) and RsaSignature2018

ismamokan

Member
Hi to all Guro!

Has anyone of you already implemented Jason Web Signature (JWS) using RsaSignature2018 in B4A? Thanks.
 

Johan Hormaza

Well-Known Member
Licensed User
Longtime User
B4X
B4X:
    Dim basicAuth As String
    basicAuth = $"${Main.PUBLIC_KEY}:${Main.PRIVATE_KEY}"$
    Dim job As HttpJob
    job.Initialize("",Me)
    job.PostString("https://apify.epayco.co/login?",$""$)
    job.GetRequest.SetHeader("Authorization", $"Basic ${su.EncodeBase64(basicAuth.GetBytes("UTF8"))}:"$)
    job.GetRequest.SetContentType("application/json")
    Wait For (job) JobDone(job As HttpJob)
    Log("Result Token: " & job.Success)
    If job.Success Then
        Log(job.GetString)
        Dim parser As JSONParser
        parser.Initialize(job.GetString)
        Dim RootMap As Map = parser.NextObject
        Dim token As String = RootMap.Get("token")
        Main.TokenJWT = token
    Else
        Log(job.ErrorMessage)
    End If
    job.Release
 
Upvote 0

ismamokan

Member
thanks so much sir johan
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…