The context is needed to access the check for availability
public class Auth0Fingerprint implements FingerprintManager.AuthenticationCallback {
private final FingerprintManagerCompat manager;
# | |
# Build configuration for Circle CI | |
# | |
machine: | |
environment: | |
ANDROID_HOME: /usr/local/android-sdk-linux | |
GRADLE_OPTS: '-Dorg.gradle.jvmargs="-Xmx2048m -XX:+HeapDumpOnOutOfMemoryError"' | |
_JAVA_OPTIONS: "-Xms512m -Xmx1024m" | |
ANDROID_API_LEVEL: 25 |
Recently we introduced a helper class available here to handle Auth0 Credentials. Usage is simple: Once you create a new instance by passing an AuthenticationAPIClient
(to renew credentials) and a Storage
(to do persistance), you can call any of this 2 public methods:
saveCredentials
: To synchronously save a pair of credentials in the storage. Will throw if the access_token or id_token is null, or if the expires_at date is missing.getCredentials
: To asynchronously get a pair of credentials from the storage.
The simple credentials manager receives a pair of Credentials and perform:
Because the manager receives a Storage
, which abstracts the logic of reading/writing stuff, how the values are persisted is up to that implementation. What it's missing is a security layer to encrypt the values before saving them, ask for authentication before retrieving them, or both of the previous.
We can enhance the existing manager to make it encrypt/decrypt the content before persisting it. Then as an extra improvement, we can ask for user authentication before allowing them to obtain the credentials.
The CredentialsManager
usage can be divided in two:
//Copyright 2017 - https://github.com/lbalmaceda | |
//Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
//The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOF |
while true;do clear;echo "Cotizacion $(date)";echo -e "Dolar (Santander) : \t" $(curl -Ls "https://bit.ly/2O9Mvvm"|grep '[0-9]{2},[0-9]{2}' -Eo|head -n2);echo -e "Dolar (Nacion) : \t" $(curl -Ls "https://bit.ly/2NvKhcM"|tr -d ' '|grep DolarU\.S\.A -A2|grep -oE '[0-9]{2},[0-9]{2}'|tr '\n' ' ');echo -e "Dolar (Galicia) : \t" $(curl -Ls "https://bit.ly/2wWvApx"|jq -r '.buy + "0", .sell + "0"'|tr '\n' ' ');echo -e "Dolar (BBVA-Frances) : \t" $(curl -Ls "https://bit.ly/2O0wxUt"|iconv -f iso-8859-1 -t utf-8|sed -n "s,detalles,\n,gp"|grep -oE '[0-9]{2},[0-9]{2}'|head -n2|tr '\n' ' ');sleep 600;done |