Skip to content

Commit

Permalink
move MSA_TENANT to AccountType
Browse files Browse the repository at this point in the history
  • Loading branch information
tido64 committed Nov 30, 2021
1 parent af94015 commit e04f1e7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@ enum class AccountType(val type: String) {
ORGANIZATIONAL("Organizational");

companion object {
// Source: https://docs.microsoft.com/en-us/azure/active-directory/develop/id-tokens
private const val MSA_TENANT = "9188040d-6c67-4c5b-b112-36a304b66dad"

fun fromIssuer(issuer: String): AccountType {
return if (issuer.contains(TokenBroker.MSA_TENANT))
return if (issuer.contains(MSA_TENANT))
MICROSOFT_ACCOUNT
else
ORGANIZATIONAL
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ class TokenBroker private constructor(context: Context) {
companion object {
const val EMPTY_GUID = "00000000-0000-0000-0000-000000000000"

// Source: https://docs.microsoft.com/en-us/azure/active-directory/develop/id-tokens
const val MSA_TENANT = "9188040d-6c67-4c5b-b112-36a304b66dad"

@Volatile
private var INSTANCE: TokenBroker? = null

Expand Down

0 comments on commit e04f1e7

Please sign in to comment.