This file contains hidden or 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
| Replaces firewalld by iptables: | |
| # yum install iptables-services | |
| # yum install ebtables | |
| # yum install ipset-service | |
| # systemctl mask --now firewalld.service // disable firewalld | |
| # systemctl status iptables.service // should be inactive | |
| # systemctl enable --now iptables.service | |
| # systemctl enable --now ip6tables.service | |
| # systemctl enable --now etables.service |
This file contains hidden or 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 com.twinpeek.android.app; | |
| import java.io.File; | |
| import java.security.MessageDigest; | |
| import java.security.NoSuchAlgorithmException; | |
| import java.security.NoSuchProviderException; | |
| import android.content.Context; | |
| import android.content.pm.ApplicationInfo; | |
| import android.content.pm.PackageInfo; |
This file contains hidden or 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 android.os.Handler; | |
| import android.os.Looper; | |
| import com.squareup.otto.Bus; | |
| /** | |
| * Maintains a singleton instance for obtaining the bus. Ideally this would be replaced with a more efficient means | |
| * such as through injection directly into interested classes. | |
| * <p> | |
| * Created by ChrisC on 17/05/17. | |
| */ |
This file contains hidden or 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
| /** | |
| * Created by ChrisC on 22/05/17. | |
| */ | |
| public enum RestClient { | |
| INSTANCE; | |
This file contains hidden or 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 TokenInterceptor implements Interceptor { | |
| private static final String TAG = TokenManager.class.getName(); | |
| private static final String header = "X-Header"; | |
| /** | |
| * Constructor for Token interceptor | |
| */ | |
| public TokenInterceptor() { |
This file contains hidden or 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 APIKeyInterceptor implements Interceptor { | |
| private static final String SECRET_KEY_HEADER = "secret_key"; | |
| private static final String UUID_HEADER = "uuid"; | |
| private static final String TAG = "APIKeyInterceptor"; | |
| @Override | |
| public Response intercept(Chain chain) throws IOException { | |
| Request request = chain.request(); | |
| Log.d(TAG, "intercept ===============> "+request.url()); |
This file contains hidden or 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 TokenManager { | |
| private static final String TAG = TokenManager.class.getName(); | |
| private static TokenManager instance; | |
| private String token; | |
| private TokenManager() { | |
| token = ""; |
This file contains hidden or 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 java.util.Properties; | |
| import javax.mail.Authenticator; | |
| import javax.mail.Folder; | |
| import javax.mail.MessagingException; | |
| import javax.mail.Session; | |
| import javax.mail.Store; | |
| import android.support.annotation.Nullable; | |
| import android.support.annotation.WorkerThread; |
This file contains hidden or 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
| # Add project specific ProGuard rules here. | |
| # By default, the flags in this file are appended to flags specified | |
| # in /home/chris/Android/Sdk/tools/proguard/proguard-android.txt | |
| # You can edit the include path and order by changing the proguardFiles | |
| # directive in build.gradle. | |
| # | |
| # For more details, see | |
| # http://developer.android.com/guide/developing/tools/proguard.html | |
| # Add any project specific keep options here: |
This file contains hidden or 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 org.springframework.boot.actuate.autoconfigure.ManagementServerProperties; | |
| import org.springframework.boot.autoconfigure.SpringBootApplication; | |
| import org.springframework.boot.builder.SpringApplicationBuilder; | |
| import org.springframework.core.annotation.Order; | |
| import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; | |
| import org.springframework.security.config.annotation.web.builders.HttpSecurity; | |
| import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; | |
| import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; | |
| import org.springframework.security.web.authentication.www.BasicAuthenticationEntryPoint; |
OlderNewer