This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.fasterxml.jackson.annotation.JsonProperty; | |
public final class ApplePublicKey { | |
private final String kty; | |
private final String kid; | |
private final String use; | |
private final String alg; | |
private final String n; | |
private final String e; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class AppleIDTokenPayload { | |
private String iss; | |
private String aud; | |
private Long exp; | |
private Long iat; | |
private String sub;// users unique id | |
private String at_hash; | |
private Long auth_time; | |
private Boolean nonce_supported; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/***Imports ****/ | |
import org.bouncycastle.asn1.pkcs.PrivateKeyInfo; | |
import org.bouncycastle.openssl.PEMParser; | |
import org.bouncycastle.openssl.jcajce.JcaPEMKeyConverter; | |
import java.security.PrivateKey; | |
import java.security.PublicKey; | |
import io.jsonwebtoken.JwsHeader; | |
import io.jsonwebtoken.Jwts; | |
import io.jsonwebtoken.SignatureAlgorithm; | |
import java.util.Date; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/***** | |
* Tekraze.com for more | |
* | |
*****/ | |
///Imports | |
import org.springframework.data.domain.Page; | |
import org.springframework.data.domain.PageImpl; | |
import org.springframework.data.domain.PageRequest; | |
import org.springframework.data.domain.Pageable; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Method called from the UI */ | |
getImage(imageUrl: string) { | |
this.getBase64ImageFromURL(imageUrl).subscribe((base64Data: string) => { | |
this.base64TrimmedURL = base64Data; | |
this.createBlobImageFileAndShow(); | |
}); | |
} | |
/* Method to fetch image from Url */ | |
getBase64ImageFromURL(url: string): Observable<string> { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/**Method that will create Blob and show in new window */ | |
createBlobImageFileAndShow(): void { | |
this.dataURItoBlob(this.base64TrimmedURL).subscribe((blob: Blob) => { | |
const imageBlob: Blob = blob; | |
const imageName: string = this.generateName(); | |
const imageFile: File = new File([imageBlob], imageName, { | |
type: "image/jpeg" | |
}); | |
this.generatedImage = window.URL.createObjectURL(imageFile); | |
window.open(this.generatedImage); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package dehaze.mvp.service.dto.awstranscribe; | |
import java.io.Serializable; | |
import java.util.Objects; | |
public class TranscriptionResponseDTO implements Serializable { | |
private static final long serialVersionUID = 1L; | |
private String jobName; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/***** Step 1 Imports *********/ | |
import com.amazonaws.SdkClientException; | |
import com.amazonaws.auth.AWSStaticCredentialsProvider; | |
import com.amazonaws.auth.BasicAWSCredentials; | |
import com.amazonaws.client.builder.AwsClientBuilder.EndpointConfiguration; | |
import com.amazonaws.services.comprehend.AmazonComprehend; | |
import com.amazonaws.services.comprehend.AmazonComprehendClientBuilder; | |
import com.amazonaws.services.comprehend.model.DetectEntitiesRequest; | |
import com.amazonaws.services.comprehend.model.DetectEntitiesResult; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/********** Step 1 ********************** | |
*********** File Imports ***************/ | |
import com.amazonaws.services.transcribe.AmazonTranscribe; | |
import com.amazonaws.services.transcribe.AmazonTranscribeClientBuilder; | |
import com.amazonaws.services.transcribe.model.DeleteTranscriptionJobRequest; | |
import com.amazonaws.services.transcribe.model.GetTranscriptionJobRequest; | |
import com.amazonaws.services.transcribe.model.GetTranscriptionJobResult; | |
import com.amazonaws.services.transcribe.model.LanguageCode; | |
import com.amazonaws.services.transcribe.model.Media; | |
import com.amazonaws.services.transcribe.model.StartTranscriptionJobRequest; |