[ 
https://issues.apache.org/jira/browse/MPIR-478?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17929351#comment-17929351
 ] 

ASF GitHub Bot commented on MPIR-478:
-------------------------------------

slawekjaranowski commented on code in PR #97:
URL: 
https://github.com/apache/maven-project-info-reports-plugin/pull/97#discussion_r1966507864


##########
src/main/java/org/apache/maven/report/projectinfo/avatars/GravatarProvider.java:
##########
@@ -0,0 +1,156 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.maven.report.projectinfo.avatars;
+
+import javax.inject.Named;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.security.MessageDigest;
+import java.security.NoSuchAlgorithmException;
+import java.util.Locale;
+
+import org.codehaus.plexus.util.IOUtil;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Provider for user avatar from gravatar.com
+ * <p>
+ * <a href="https://docs.gravatar.com/api/avatars/images/";>Gravatar API</a>
+ */
+@Named("gravatar")
+class GravatarProvider implements AvatarsProvider {
+
+    private static final Logger LOGGER = 
LoggerFactory.getLogger(GravatarProvider.class);
+
+    private static final String AVATAR_SIZE = "s=60";
+
+    private static final String AVATAR_DIRECTORY = "avatars";
+
+    private static final String AVATAR_DEFAULT_FILE_NAME = 
"00000000000000000000000000000000.jpg";

Review Comment:
   I don't know if it default value ... it is used as hash for that we don't 
have an avatar and gravatar return a default image for it.
   
   Also when we use different value which has not avatar connected will be the 
same.





> describe use of gravatar.com for profiles in team report
> --------------------------------------------------------
>
>                 Key: MPIR-478
>                 URL: https://issues.apache.org/jira/browse/MPIR-478
>             Project: Maven Project Info Reports Plugin
>          Issue Type: Improvement
>          Components: team
>    Affects Versions: 3.8.0
>            Reporter: Herve Boutemy
>            Assignee: Slawomir Jaranowski
>            Priority: Major
>             Fix For: 3.9.0
>
>
> like MARTIFACT-83, to clarify privacy implications
> see 
> https://github.com/apache/maven-project-info-reports-plugin/blob/master/src/main/java/org/apache/maven/report/projectinfo/TeamReport.java



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to