diff --git a/DauthSDK/src/main/AndroidManifest.xml b/DauthSDK/src/main/AndroidManifest.xml index 6b1bea1..562331d 100644 --- a/DauthSDK/src/main/AndroidManifest.xml +++ b/DauthSDK/src/main/AndroidManifest.xml @@ -1,6 +1,6 @@ + package="edu.nitt.delta.auth"> { fun onSuccess(value: T) diff --git a/DauthSDK/src/main/java/edu/nitt/delta/models/AuthorizationErrorType.kt b/DauthSDK/src/main/java/edu/nitt/delta/auth/models/AuthorizationErrorType.kt similarity index 83% rename from DauthSDK/src/main/java/edu/nitt/delta/models/AuthorizationErrorType.kt rename to DauthSDK/src/main/java/edu/nitt/delta/auth/models/AuthorizationErrorType.kt index 8912bc1..42485ab 100644 --- a/DauthSDK/src/main/java/edu/nitt/delta/models/AuthorizationErrorType.kt +++ b/DauthSDK/src/main/java/edu/nitt/delta/auth/models/AuthorizationErrorType.kt @@ -1,4 +1,4 @@ -package edu.nitt.delta.models +package edu.nitt.delta.auth.models enum class AuthorizationErrorType { NetworkError, diff --git a/DauthSDK/src/main/java/edu/nitt/delta/models/AuthorizationRequest.kt b/DauthSDK/src/main/java/edu/nitt/delta/auth/models/AuthorizationRequest.kt similarity index 83% rename from DauthSDK/src/main/java/edu/nitt/delta/models/AuthorizationRequest.kt rename to DauthSDK/src/main/java/edu/nitt/delta/auth/models/AuthorizationRequest.kt index 100dba1..a31cac7 100644 --- a/DauthSDK/src/main/java/edu/nitt/delta/models/AuthorizationRequest.kt +++ b/DauthSDK/src/main/java/edu/nitt/delta/auth/models/AuthorizationRequest.kt @@ -1,4 +1,4 @@ -package edu.nitt.delta.models +package edu.nitt.delta.auth.models data class AuthorizationRequest( val response_type: ResponseType, diff --git a/DauthSDK/src/main/java/edu/nitt/delta/models/AuthorizationResponse.kt b/DauthSDK/src/main/java/edu/nitt/delta/auth/models/AuthorizationResponse.kt similarity index 81% rename from DauthSDK/src/main/java/edu/nitt/delta/models/AuthorizationResponse.kt rename to DauthSDK/src/main/java/edu/nitt/delta/auth/models/AuthorizationResponse.kt index aea2d7f..e77a918 100644 --- a/DauthSDK/src/main/java/edu/nitt/delta/models/AuthorizationResponse.kt +++ b/DauthSDK/src/main/java/edu/nitt/delta/auth/models/AuthorizationResponse.kt @@ -1,4 +1,4 @@ -package edu.nitt.delta.models +package edu.nitt.delta.auth.models data class AuthorizationResponse( val authorizationCode : String, diff --git a/DauthSDK/src/main/java/edu/nitt/delta/models/ClientCredentials.kt b/DauthSDK/src/main/java/edu/nitt/delta/auth/models/ClientCredentials.kt similarity index 76% rename from DauthSDK/src/main/java/edu/nitt/delta/models/ClientCredentials.kt rename to DauthSDK/src/main/java/edu/nitt/delta/auth/models/ClientCredentials.kt index e47f9d0..a92c248 100644 --- a/DauthSDK/src/main/java/edu/nitt/delta/models/ClientCredentials.kt +++ b/DauthSDK/src/main/java/edu/nitt/delta/auth/models/ClientCredentials.kt @@ -1,4 +1,4 @@ -package edu.nitt.delta.models +package edu.nitt.delta.auth.models data class ClientCredentials( val clientId: String, diff --git a/DauthSDK/src/main/java/edu/nitt/delta/models/GrantType.kt b/DauthSDK/src/main/java/edu/nitt/delta/auth/models/GrantType.kt similarity index 80% rename from DauthSDK/src/main/java/edu/nitt/delta/models/GrantType.kt rename to DauthSDK/src/main/java/edu/nitt/delta/auth/models/GrantType.kt index f4ae755..cddc2a7 100644 --- a/DauthSDK/src/main/java/edu/nitt/delta/models/GrantType.kt +++ b/DauthSDK/src/main/java/edu/nitt/delta/auth/models/GrantType.kt @@ -1,4 +1,4 @@ -package edu.nitt.delta.models +package edu.nitt.delta.auth.models enum class GrantType { AuthorizationCode { diff --git a/DauthSDK/src/main/java/edu/nitt/delta/models/Key.kt b/DauthSDK/src/main/java/edu/nitt/delta/auth/models/Key.kt similarity index 80% rename from DauthSDK/src/main/java/edu/nitt/delta/models/Key.kt rename to DauthSDK/src/main/java/edu/nitt/delta/auth/models/Key.kt index 3fa26b8..7db3c6d 100644 --- a/DauthSDK/src/main/java/edu/nitt/delta/models/Key.kt +++ b/DauthSDK/src/main/java/edu/nitt/delta/auth/models/Key.kt @@ -1,4 +1,4 @@ -package edu.nitt.delta.models +package edu.nitt.delta.auth.models data class Key( val e: String, diff --git a/DauthSDK/src/main/java/edu/nitt/delta/models/ResponseType.kt b/DauthSDK/src/main/java/edu/nitt/delta/auth/models/ResponseType.kt similarity index 77% rename from DauthSDK/src/main/java/edu/nitt/delta/models/ResponseType.kt rename to DauthSDK/src/main/java/edu/nitt/delta/auth/models/ResponseType.kt index ab485ee..280d9fb 100644 --- a/DauthSDK/src/main/java/edu/nitt/delta/models/ResponseType.kt +++ b/DauthSDK/src/main/java/edu/nitt/delta/auth/models/ResponseType.kt @@ -1,4 +1,4 @@ -package edu.nitt.delta.models +package edu.nitt.delta.auth.models enum class ResponseType { Code{ diff --git a/DauthSDK/src/main/java/edu/nitt/delta/models/Result.kt b/DauthSDK/src/main/java/edu/nitt/delta/auth/models/Result.kt similarity index 71% rename from DauthSDK/src/main/java/edu/nitt/delta/models/Result.kt rename to DauthSDK/src/main/java/edu/nitt/delta/auth/models/Result.kt index b1a367d..aaf5eec 100644 --- a/DauthSDK/src/main/java/edu/nitt/delta/models/Result.kt +++ b/DauthSDK/src/main/java/edu/nitt/delta/auth/models/Result.kt @@ -1,4 +1,4 @@ -package edu.nitt.delta.models +package edu.nitt.delta.auth.models data class Result( val user: User?, diff --git a/DauthSDK/src/main/java/edu/nitt/delta/models/Scope.kt b/DauthSDK/src/main/java/edu/nitt/delta/auth/models/Scope.kt similarity index 94% rename from DauthSDK/src/main/java/edu/nitt/delta/models/Scope.kt rename to DauthSDK/src/main/java/edu/nitt/delta/auth/models/Scope.kt index 34b3b20..3c9ec63 100644 --- a/DauthSDK/src/main/java/edu/nitt/delta/models/Scope.kt +++ b/DauthSDK/src/main/java/edu/nitt/delta/auth/models/Scope.kt @@ -1,4 +1,4 @@ -package edu.nitt.delta.models +package edu.nitt.delta.auth.models enum class Scope { OpenID { diff --git a/DauthSDK/src/main/java/edu/nitt/delta/models/Token.kt b/DauthSDK/src/main/java/edu/nitt/delta/auth/models/Token.kt similarity index 74% rename from DauthSDK/src/main/java/edu/nitt/delta/models/Token.kt rename to DauthSDK/src/main/java/edu/nitt/delta/auth/models/Token.kt index 5f39272..78c8090 100644 --- a/DauthSDK/src/main/java/edu/nitt/delta/models/Token.kt +++ b/DauthSDK/src/main/java/edu/nitt/delta/auth/models/Token.kt @@ -1,4 +1,4 @@ -package edu.nitt.delta.models +package edu.nitt.delta.auth.models data class Token( val access_token: String, diff --git a/DauthSDK/src/main/java/edu/nitt/delta/models/TokenRequest.kt b/DauthSDK/src/main/java/edu/nitt/delta/auth/models/TokenRequest.kt similarity index 75% rename from DauthSDK/src/main/java/edu/nitt/delta/models/TokenRequest.kt rename to DauthSDK/src/main/java/edu/nitt/delta/auth/models/TokenRequest.kt index 7920209..fb30ea6 100644 --- a/DauthSDK/src/main/java/edu/nitt/delta/models/TokenRequest.kt +++ b/DauthSDK/src/main/java/edu/nitt/delta/auth/models/TokenRequest.kt @@ -1,4 +1,4 @@ -package edu.nitt.delta.models +package edu.nitt.delta.auth.models data class TokenRequest( val grant_type:String, diff --git a/DauthSDK/src/main/java/edu/nitt/delta/models/User.kt b/DauthSDK/src/main/java/edu/nitt/delta/auth/models/User.kt similarity index 75% rename from DauthSDK/src/main/java/edu/nitt/delta/models/User.kt rename to DauthSDK/src/main/java/edu/nitt/delta/auth/models/User.kt index 68ad681..b292559 100644 --- a/DauthSDK/src/main/java/edu/nitt/delta/models/User.kt +++ b/DauthSDK/src/main/java/edu/nitt/delta/auth/models/User.kt @@ -1,4 +1,4 @@ -package edu.nitt.delta.models +package edu.nitt.delta.auth.models data class User( val id: Int, diff --git a/DauthSDK/src/main/java/edu/nitt/delta/models/jwks.kt b/DauthSDK/src/main/java/edu/nitt/delta/auth/models/jwks.kt similarity index 55% rename from DauthSDK/src/main/java/edu/nitt/delta/models/jwks.kt rename to DauthSDK/src/main/java/edu/nitt/delta/auth/models/jwks.kt index cd801b6..dc231e4 100644 --- a/DauthSDK/src/main/java/edu/nitt/delta/models/jwks.kt +++ b/DauthSDK/src/main/java/edu/nitt/delta/auth/models/jwks.kt @@ -1,4 +1,4 @@ -package edu.nitt.delta.models +package edu.nitt.delta.auth.models data class jwks ( val key: List diff --git a/DauthSDK/src/main/java/edu/nitt/delta/models/jwt.kt b/DauthSDK/src/main/java/edu/nitt/delta/auth/models/jwt.kt similarity index 91% rename from DauthSDK/src/main/java/edu/nitt/delta/models/jwt.kt rename to DauthSDK/src/main/java/edu/nitt/delta/auth/models/jwt.kt index 7298a74..a82304f 100644 --- a/DauthSDK/src/main/java/edu/nitt/delta/models/jwt.kt +++ b/DauthSDK/src/main/java/edu/nitt/delta/auth/models/jwt.kt @@ -1,4 +1,4 @@ -package edu.nitt.delta.models +package edu.nitt.delta.auth.models data class jwt( val header: Header, diff --git a/DauthSDK/src/main/res/layout/activity_dauth_authenticator.xml b/DauthSDK/src/main/res/layout/activity_dauth_authenticator.xml index 70847b5..6ff3bd6 100644 --- a/DauthSDK/src/main/res/layout/activity_dauth_authenticator.xml +++ b/DauthSDK/src/main/res/layout/activity_dauth_authenticator.xml @@ -4,5 +4,5 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" - tools:context=".DAuthAuthenticatorActivity"> + tools:context=".auth.DAuthAuthenticatorActivity"> diff --git a/sampleApp/build.gradle b/sampleApp/build.gradle index 4ee65aa..ec25a06 100644 --- a/sampleApp/build.gradle +++ b/sampleApp/build.gradle @@ -7,7 +7,7 @@ android { compileSdk 30 defaultConfig { - applicationId "edu.nitt.delta" + applicationId "edu.nitt.delta.auth.sample" minSdk 21 targetSdk 30 versionCode 1 diff --git a/sampleApp/src/Java/java/edu/nitt/delta/MainActivity.java b/sampleApp/src/Java/java/edu/nitt/delta/auth/sample/MainActivity.java similarity index 82% rename from sampleApp/src/Java/java/edu/nitt/delta/MainActivity.java rename to sampleApp/src/Java/java/edu/nitt/delta/auth/sample/MainActivity.java index a1672b2..dda3fc9 100644 --- a/sampleApp/src/Java/java/edu/nitt/delta/MainActivity.java +++ b/sampleApp/src/Java/java/edu/nitt/delta/auth/sample/MainActivity.java @@ -1,4 +1,4 @@ -package edu.nitt.delta; +package edu.nitt.delta.auth.sample; import android.os.Bundle; import android.util.Log; @@ -8,14 +8,14 @@ import androidx.appcompat.app.AppCompatActivity; import java.util.ArrayList; import java.util.List; -import edu.nitt.delta.deltaButton.DeltaButton; -import edu.nitt.delta.interfaces.ResultListener; -import edu.nitt.delta.models.AuthorizationRequest; -import edu.nitt.delta.models.GrantType; -import edu.nitt.delta.models.ResponseType; -import edu.nitt.delta.models.Result; -import edu.nitt.delta.models.Scope; -import edu.nitt.delta.models.User; +import edu.nitt.delta.auth.DAuth; +import edu.nitt.delta.auth.deltaButton.DeltaButton; +import edu.nitt.delta.auth.interfaces.ResultListener; +import edu.nitt.delta.auth.models.AuthorizationRequest; +import edu.nitt.delta.auth.models.GrantType; +import edu.nitt.delta.auth.models.ResponseType; +import edu.nitt.delta.auth.models.Result; +import edu.nitt.delta.auth.models.Scope; /** * Sample activity in java to show the use of DAuth sign in diff --git a/sampleApp/src/Kotlin/java/edu/nitt/delta/MainActivity.kt b/sampleApp/src/Kotlin/java/edu/nitt/delta/auth/sample/MainActivity.kt similarity index 100% rename from sampleApp/src/Kotlin/java/edu/nitt/delta/MainActivity.kt rename to sampleApp/src/Kotlin/java/edu/nitt/delta/auth/sample/MainActivity.kt diff --git a/sampleApp/src/main/AndroidManifest.xml b/sampleApp/src/main/AndroidManifest.xml index a3b668c..4dde735 100644 --- a/sampleApp/src/main/AndroidManifest.xml +++ b/sampleApp/src/main/AndroidManifest.xml @@ -1,6 +1,6 @@ + package="edu.nitt.delta.auth.sample"> -