Login Configurations

Manage Login Configurations and User Groups with Affinidi Login Service.

Supported Languages

Package: @affinidi-tdk/login-configuration-client

npm install @affinidi-tdk/login-configuration-client --save

Package: affinidi_tdk_login_configuration_client

pip install affinidi_tdk_login_configuration_client

Classes and Methods

Configurations API

Use to manage Login Configuration to integrate Affinidi Login.

createLoginConfigurations

Create a new Login Configuration to integrate Affinidi Login.

Parameters

CreateLoginConfigurationInput [Object]

JSON object to provide the configuration details of the application. See more here.

Module Imports
import { ConfigurationApi, Configuration, CreateLoginConfigurationInput } from '@affinidi-tdk/login-configuration-client'
import affinidi_tdk_login_configuration_client
Sample Codes
// Pass the projectScopedToken generated from AuthProvider package
const authConfiguration = new Configuration({
  apiKey: authProvider.fetchProjectScopedToken.bind(authProvider)
})

const api = new ConfigurationApi(authConfiguration)

const request: CreateLoginConfigurationInput = {
    name: "Sample App",
    redirectUris: ["http://localhost:3000/auth/callback"]
}

const { data } = await api.createLoginConfigurations(request)
configuration = affinidi_tdk_login_configuration_client.Configuration()
# Pass the projectScopedToken generated from AuthProvider package
configuration.api_key['ProjectTokenAuth'] = projectScopedToken

with affinidi_tdk_login_configuration_client.ApiClient(configuration) as api_client:
    api_instance = affinidi_tdk_login_configuration_client.ConfigurationApi(api_client)

    request_json = {
        name: "Sample App",
        redirectUris: ["http://localhost:3000/auth/callback"]
    }

    create_login_configuration_input = affinidi_tdk_login_configuration_client.CreateLoginConfigurationInput.from_dict(request_json)

    api_response = api_instance.create_login_configurations(create_login_configuration_input=create_login_configuration_input)

deleteLoginConfigurationsById

Delete an existing Login Configuration by ID.

Parameters

configurationId [String]

ID of the Login Configuration to delete.

Module Imports
import { ConfigurationApi, Configuration } from '@affinidi-tdk/login-configuration-client'
import affinidi_tdk_login_configuration_client
Sample Codes
// Pass the projectScopedToken generated from AuthProvider package
const authConfiguration = new Configuration({
  apiKey: authProvider.fetchProjectScopedToken.bind(authProvider)
})

const api = new ConfigurationApi(authConfiguration)

// configurationID fetched from listLoginConfigurations
const configurationID = "<Config_ID>"

const result = await api.deleteLoginConfigurationsById(configurationID)
configuration = affinidi_tdk_login_configuration_client.Configuration()
# Pass the projectScopedToken generated from AuthProvider package
configuration.api_key['ProjectTokenAuth'] = projectScopedToken

with affinidi_tdk_login_configuration_client.ApiClient(configuration) as api_client:
    api_instance = affinidi_tdk_login_configuration_client.ConfigurationApi(api_client)

    configuration_id = "<Config_ID>" 

    api_instance.delete_login_configurations_by_id(configuration_id)

getClientMetadataByClientId

Retrieves the Client Metadata info of the Login Configuration by OAuth 2.0 Client ID.

Parameters

clientId [String]

OAuth 2.0 Client ID generated by Login Configuration.

Module Imports
import { ConfigurationApi, Configuration } from '@affinidi-tdk/login-configuration-client'
import affinidi_tdk_login_configuration_client
Sample Codes
// Pass the projectScopedToken generated from AuthProvider package
const authConfiguration = new Configuration({
  apiKey: authProvider.fetchProjectScopedToken.bind(authProvider)
})

const api = new ConfigurationApi(authConfiguration)

// configurationID fetched from listLoginConfigurations
const configurationID = "<Config_ID>"

const { data } = await api.getClientMetadataByClientId(configurationID)
configuration = affinidi_tdk_login_configuration_client.Configuration()
# Pass the projectScopedToken generated from AuthProvider package
configuration.api_key['ProjectTokenAuth'] = projectScopedToken

with affinidi_tdk_login_configuration_client.ApiClient(configuration) as api_client:
    api_instance = affinidi_tdk_login_configuration_client.ConfigurationApi(api_client)

    configuration_id = "<Config_ID>" 

    api_response = api_instance.get_client_metadata_by_client_id(configuration_id)

getLoginConfigurationsById

Retrieves the Login Configuration details by ID.

Parameters

configurationId [String]

ID of the existing Login Configuration to retrieve.

Module Imports
import { ConfigurationApi, Configuration } from '@affinidi-tdk/login-configuration-client'
import affinidi_tdk_login_configuration_client
Sample Codes
// Pass the projectScopedToken generated from AuthProvider package
const authConfiguration = new Configuration({
  apiKey: authProvider.fetchProjectScopedToken.bind(authProvider)
})

const api = new ConfigurationApi(authConfiguration)

// configurationID fetched from listLoginConfigurations
const configurationID = "<Config_ID>"

const { data } = await api.getLoginConfigurationsById(configurationID)
configuration = affinidi_tdk_login_configuration_client.Configuration()
# Pass the projectScopedToken generated from AuthProvider package
configuration.api_key['ProjectTokenAuth'] = projectScopedToken

with affinidi_tdk_login_configuration_client.ApiClient(configuration) as api_client:
    api_instance = affinidi_tdk_login_configuration_client.ConfigurationApi(api_client)

    configuration_id = "<Config_ID>" 

    api_response = api_instance.get_login_configurations_by_id(configuration_id)

listLoginConfigurations

List all the Login Configurations in the Project.

Parameters

limit [Integer]

Maximum number of records to fetch from the list.

exclusiveStartKey [String]

The base64url encoded key of the first item that this operation will evaluate (it is not returned). Use the value that was returned in the previous operation.

Module Imports
import { ConfigurationApi, Configuration } from '@affinidi-tdk/login-configuration-client'
import affinidi_tdk_login_configuration_client
Sample Codes
// Pass the projectScopedToken generated from AuthProvider package
const authConfiguration = new Configuration({
  apiKey: authProvider.fetchProjectScopedToken.bind(authProvider)
})

const api = new ConfigurationApi(authConfiguration)

const { data } = await api.listLoginConfigurations()
configuration = affinidi_tdk_login_configuration_client.Configuration()
# Pass the projectScopedToken generated from AuthProvider package
configuration.api_key['ProjectTokenAuth'] = projectScopedToken

with affinidi_tdk_login_configuration_client.ApiClient(configuration) as api_client:
    api_instance = affinidi_tdk_login_configuration_client.ConfigurationApi(api_client)

    api_response = api_instance.list_login_configurations()

updateLoginConfigurationsById

Update an existing Login Configuration by ID

Parameters

configurationId [String]

ID of the Login Configuration to update.

UpdateLoginConfigurationInput [Object]

JSON object to provide to update the Login Configuration details. See more here.

Module Imports
import { ConfigurationApi, Configuration, UpdateLoginConfigurationInput } from '@affinidi-tdk/login-configuration-client'
import affinidi_tdk_login_configuration_client
Sample Codes
// Pass the projectScopedToken generated from AuthProvider package
const authConfiguration = new Configuration({
  apiKey: authProvider.fetchProjectScopedToken.bind(authProvider)
})

const api = new ConfigurationApi(authConfiguration)

// configurationID fetched from listLoginConfigurations
const configurationID = "<Config_ID>"

// create a request object of type UpdateLoginConfigurationInput and add the attributes to be changed
const request: UpdateLoginConfigurationInput = {
    name: "My Updated Login Config"
    redirectUris: ["http://localhost:3001/api/auth/callback"]
}

const { data } = await api.updateLoginConfigurationsById(configurationID, request)
configuration = affinidi_tdk_login_configuration_client.Configuration()
# Pass the projectScopedToken generated from AuthProvider package
configuration.api_key['ProjectTokenAuth'] = projectScopedToken

with affinidi_tdk_login_configuration_client.ApiClient(configuration) as api_client:
    api_instance = affinidi_tdk_login_configuration_client.ConfigurationApi(api_client)

    configuration_id = "<Config_ID>" 

    # Prepare the request data which contains the attributes to be changed
    request_json = {
        name: "My Updated Login Config"
        redirectUris: ["http://localhost:3001/api/auth/callback"]
    }

    update_login_configuration_input = affinidi_tdk_login_configuration_client.UpdateLoginConfigurationInput.from_dict(request_json)

    api_response = api_instance.update_login_configurations_by_id(configuration_id, update_login_configuration_input)

Group API

Used to manage the User Groups for the Project.

addUserToGroup

Add user to the user group.

Parameters

groupName [String]

Name of the group to add the user.

AddUserToGroupInput [Object]

JSON object to provide with the ID of the user to add. See more here.

Module Imports
import { GroupApi, Configuration, AddUserToGroupInput } from '@affinidi-tdk/login-configuration-client'
import affinidi_tdk_login_configuration_client
Sample Codes
// Pass the projectScopedToken generated from AuthProvider package
const authConfiguration = new Configuration({
  apiKey: authProvider.fetchProjectScopedToken.bind(authProvider)
})

const groupApi = new GroupApi(authConfiguration)

const groupName = "gold"

const userToBeAdded: AddUserToGroupInput = {
    userId: "did:key:890890890890890",
}

const { data } = await groupApi.addUserToGroup(groupName, userToBeAdded)
configuration = affinidi_tdk_login_configuration_client.Configuration()
# Pass the projectScopedToken generated from AuthProvider package
configuration.api_key['ProjectTokenAuth'] = projectScopedToken

with affinidi_tdk_login_configuration_client.ApiClient(configuration) as api_client:
    api_instance = affinidi_tdk_login_configuration_client.GroupApi(api_client)
    
    group_name = "gold"

    user_to_be_added_json = {
        user_id: "did:key:890890890890890"
    }
    
    add_user_to_group_input = affinidi_tdk_login_configuration_client.AddUserToGroupInput.from_dict(user_to_be_added_json) 

    api_response = api_instance.add_user_to_group(group_name, add_user_to_group_input)

createGroup

Create a user group.

Parameters

CreateGroupInput [Object]

JSON object to provide the name of the user group.

Module Imports
import { GroupApi, Configuration, CreateGroupInput } from '@affinidi-tdk/login-configuration-client'
import affinidi_tdk_login_configuration_client
Sample Codes
// Pass the projectScopedToken generated from AuthProvider package
const authConfiguration = new Configuration({
  apiKey: authProvider.fetchProjectScopedToken.bind(authProvider)
})

const groupApi = new GroupApi(authConfiguration)

const newGroupName : CreateGroupInput = {
    groupName: "silver"
}

const { data } = await groupApi.createGroup(newGroupName)
configuration = affinidi_tdk_login_configuration_client.Configuration()
# Pass the projectScopedToken generated from AuthProvider package
configuration.api_key['ProjectTokenAuth'] = projectScopedToken

with affinidi_tdk_login_configuration_client.ApiClient(configuration) as api_client:
    api_instance = affinidi_tdk_login_configuration_client.GroupApi(api_client)
    
    group_name_input = {
        group_name: "silver"
    }
    
    create_group_input = affinidi_tdk_login_configuration_client.CreateGroupInput.from_dict(group_name_input) 

    api_response = api_instance.create_group(create_group_input)

deleteGroup

Delete a group by name.

Parameters

groupName [String]

Name of the group to delete.

Module Imports
import { GroupApi, Configuration } from '@affinidi-tdk/login-configuration-client'
import affinidi_tdk_login_configuration_client
Sample Codes
// Pass the projectScopedToken generated from AuthProvider package
const authConfiguration = new Configuration({
  apiKey: authProvider.fetchProjectScopedToken.bind(authProvider)
})

const groupApi = new GroupApi(authConfiguration)

const groupName = "bronze"

const result = await groupApi.deleteGroup(groupName)
configuration = affinidi_tdk_login_configuration_client.Configuration()
# Pass the projectScopedToken generated from AuthProvider package
configuration.api_key['ProjectTokenAuth'] = projectScopedToken

with affinidi_tdk_login_configuration_client.ApiClient(configuration) as api_client:
    api_instance = affinidi_tdk_login_configuration_client.GroupApi(api_client)
    
    group_name = "bronze"
    
    api_instance.delete_group(group_name)

getGroupById

Retrieve a group by the group name.

Parameters

groupName [String]

Name of the group to retrieve.

Module Imports
import { GroupApi, Configuration } from '@affinidi-tdk/login-configuration-client'
import affinidi_tdk_login_configuration_client
Sample Codes
// Pass the projectScopedToken generated from AuthProvider package
const authConfiguration = new Configuration({
  apiKey: authProvider.fetchProjectScopedToken.bind(authProvider)
})

const groupApi = new GroupApi(authConfiguration)

const groupName = "silver"

const result = await groupApi.getGroupById(groupName)
configuration = affinidi_tdk_login_configuration_client.Configuration()
# Pass the projectScopedToken generated from AuthProvider package
configuration.api_key['ProjectTokenAuth'] = projectScopedToken

with affinidi_tdk_login_configuration_client.ApiClient(configuration) as api_client:
    api_instance = affinidi_tdk_login_configuration_client.GroupApi(api_client)
    
    group_name = "bronze"
    
    api_response = api_instance.get_group_by_id(group_name)

listGroupUserMappings

List all the users from the group.

Parameters

groupName [String]

Name of the group to list.

limit [Integer]

Maximum number of records to fetch in a list.

exclusiveStartKey [String]

The base64url encoded key of the first item that this operation will evaluate (it is not returned). Use the value that was returned in the previous operation.

sortOrder [String]

sort response in specific order. By default it is in desc order.

Module Imports
import { GroupApi, Configuration } from '@affinidi-tdk/login-configuration-client'
import affinidi_tdk_login_configuration_client
Sample Codes
// Pass the projectScopedToken generated from AuthProvider package
const authConfiguration = new Configuration({
  apiKey: authProvider.fetchProjectScopedToken.bind(authProvider)
})

const groupApi = new GroupApi(authConfiguration)

const groupName = "gold"

const { data } = await groupApi.listGroupUserMappings(groupName)
configuration = affinidi_tdk_login_configuration_client.Configuration()
# Pass the projectScopedToken generated from AuthProvider package
configuration.api_key['ProjectTokenAuth'] = projectScopedToken

with affinidi_tdk_login_configuration_client.ApiClient(configuration) as api_client:
    api_instance = affinidi_tdk_login_configuration_client.GroupApi(api_client)
    
    group_name = "gold" 

    limit = 56 # int | Maximum number of records to fetch in a list (optional)
    
    exclusive_start_key = "exclusive_start_key_example" # str | The base64url encoded key of the first item that this operation will evaluate (it is not returned). Use the value that was returned in the previous operation. (optional)
    
    sort_order = "desc"

    api_response = api_instance.list_group_user_mappings(group_name, limit=limit, exclusive_start_key=exclusive_start_key, sort_order=sort_order)

listGroups

List all the groups in the Project.

Parameters

No Parameters Required

Module Imports
import { GroupApi, Configuration } from '@affinidi-tdk/login-configuration-client'
import affinidi_tdk_login_configuration_client
Sample Codes
// Pass the projectScopedToken generated from AuthProvider package
const authConfiguration = new Configuration({
  apiKey: authProvider.fetchProjectScopedToken.bind(authProvider)
})

const groupApi = new GroupApi(authConfiguration)

const { data } = await groupApi.listGroups()
configuration = affinidi_tdk_login_configuration_client.Configuration()
# Pass the projectScopedToken generated from AuthProvider package
configuration.api_key['ProjectTokenAuth'] = projectScopedToken

with affinidi_tdk_login_configuration_client.ApiClient(configuration) as api_client:
    api_instance = affinidi_tdk_login_configuration_client.GroupApi(api_client)
    
    api_response = api_instance.list_groups()

removeUserFromGroup

Remove user from the group.

Parameters

groupName [String]

Name of the group where the user will be removed.

RemoveUserFromGroupInput [Object]

JSON object to provide the ID of the user to remove. See more here.

Module Imports
import { GroupApi, Configuration, RemoveUserFromGroupInput } from '@affinidi-tdk/login-configuration-client'
import affinidi_tdk_login_configuration_client
Sample Codes
// Pass the projectScopedToken generated from AuthProvider package
const authConfiguration = new Configuration({
  apiKey: authProvider.fetchProjectScopedToken.bind(authProvider)
})

const groupApi = new GroupApi(authConfiguration)

const groupName = "gold"

const userToRemove : RemoveUserFromGroupInput = {
    "userId": "did:key:890890890890890"
}

const { data } = await groupApi.removeUserFromGroup(groupName, userToRemove)
configuration = affinidi_tdk_login_configuration_client.Configuration()
# Pass the projectScopedToken generated from AuthProvider package
configuration.api_key['ProjectTokenAuth'] = projectScopedToken

with affinidi_tdk_login_configuration_client.ApiClient(configuration) as api_client:
    api_instance = affinidi_tdk_login_configuration_client.GroupApi(api_client)
    
    group_name = "gold" 

    user_to_remove_json = {
        "userId": "did:key:890890890890890"
    }

    remove_user_from_group_input = affinidi_tdk_login_configuration_client.RemoveUserFromGroupInput.from_dict(user_to_remove_json)

    api_instance.remove_user_from_group(group_name, remove_user_from_group_input)

DenyList API

Used to block groups and users to deny access on services like Affinidi Login when users are authenticating.

blockGroups

Block users by group.

Parameters

GroupNamesInput [Object]

List of groups to block. See more here.

Module Imports
import { DenyListApi, Configuration, GroupNamesInput } from '@affinidi-tdk/login-configuration-client'
import affinidi_tdk_login_configuration_client
Sample Codes
// Pass the projectScopedToken generated from AuthProvider package
const authConfiguration = new Configuration({
  apiKey: authProvider.fetchProjectScopedToken.bind(authProvider)
})

const api = new DenyListApi(authConfiguration)

const request: GroupNamesInput = [
    "group-1",
    "group-2"
]

const { data } = await api.blockGroups(request)
configuration = affinidi_tdk_login_configuration_client.Configuration()
# Pass the projectScopedToken generated from AuthProvider package
configuration.api_key['ProjectTokenAuth'] = projectScopedToken

with affinidi_tdk_login_configuration_client.ApiClient(configuration) as api_client:
    api_instance = affinidi_tdk_login_configuration_client.DenyListApi(api_client)

    request_json = [
        "group-1",
        "group-2"
    ]

    api_response = api_instance.block_groups(group_names_input=request_json)

blockUsers

Block by User ID (DID).

Parameters

BlockedUsersInput [Object]

List of User IDs (DIDs) to block. See more here.

Module Imports
import { DenyListApi, Configuration, BlockedUsersInput } from '@affinidi-tdk/login-configuration-client'
import affinidi_tdk_login_configuration_client
Sample Codes
// Pass the projectScopedToken generated from AuthProvider package
const authConfiguration = new Configuration({
  apiKey: authProvider.fetchProjectScopedToken.bind(authProvider)
})

const api = new DenyListApi(authConfiguration)

const request: BlockedUsersInput = [
    "user-1-did",
    "user-2-did"
]

const { data } = await api.blockUsers(request)
configuration = affinidi_tdk_login_configuration_client.Configuration()
# Pass the projectScopedToken generated from AuthProvider package
configuration.api_key['ProjectTokenAuth'] = projectScopedToken

with affinidi_tdk_login_configuration_client.ApiClient(configuration) as api_client:
    api_instance = affinidi_tdk_login_configuration_client.DenyListApi(api_client)

    request_json = [
        "user-1-did",
        "user-2-did"
    ]

    api_response = api_instance.block_users(blocked_users_input=request_json)

listBlockedGroups

Get list of blocked groups.

Parameters

pageToken [String]

Used for pagination.

Module Imports
import { DenyListApi, Configuration } from '@affinidi-tdk/login-configuration-client'
import affinidi_tdk_login_configuration_client
Sample Codes
// Pass the projectScopedToken generated from AuthProvider package
const authConfiguration = new Configuration({
  apiKey: authProvider.fetchProjectScopedToken.bind(authProvider)
})

const api = new DenyListApi(authConfiguration)

const { data } = await api.listBlockedGroups()
configuration = affinidi_tdk_login_configuration_client.Configuration()
# Pass the projectScopedToken generated from AuthProvider package
configuration.api_key['ProjectTokenAuth'] = projectScopedToken

with affinidi_tdk_login_configuration_client.ApiClient(configuration) as api_client:
    api_instance = affinidi_tdk_login_configuration_client.DenyListApi(api_client)

    api_response = api_instance.list_blocked_groups()

listBlockedUsers

Get list of blocked users.

Parameters

pageToken [String]

Used for pagination.

Module Imports
import { DenyListApi, Configuration } from '@affinidi-tdk/login-configuration-client'
import affinidi_tdk_login_configuration_client
Sample Codes
// Pass the projectScopedToken generated from AuthProvider package
const authConfiguration = new Configuration({
  apiKey: authProvider.fetchProjectScopedToken.bind(authProvider)
})

const api = new DenyListApi(authConfiguration)

const { data } = await api.listBlockedUsers()
configuration = affinidi_tdk_login_configuration_client.Configuration()
# Pass the projectScopedToken generated from AuthProvider package
configuration.api_key['ProjectTokenAuth'] = projectScopedToken

with affinidi_tdk_login_configuration_client.ApiClient(configuration) as api_client:
    api_instance = affinidi_tdk_login_configuration_client.DenyListApi(api_client)

    api_response = api_instance.list_blocked_users()

unblockGroups

Unblock users by group.

Parameters

GroupNamesInput [Object]

List of groups to block. See more here.

Module Imports
import { DenyListApi, Configuration, GroupNamesInput } from '@affinidi-tdk/login-configuration-client'
import affinidi_tdk_login_configuration_client
Sample Codes
// Pass the projectScopedToken generated from AuthProvider package
const authConfiguration = new Configuration({
  apiKey: authProvider.fetchProjectScopedToken.bind(authProvider)
})

const api = new DenyListApi(authConfiguration)

const request: GroupNamesInput = [
    "group-1-name",
    "group-2-name"
]

const { data } = await api.unblockGroups(request)
configuration = affinidi_tdk_login_configuration_client.Configuration()
# Pass the projectScopedToken generated from AuthProvider package
configuration.api_key['ProjectTokenAuth'] = projectScopedToken

with affinidi_tdk_login_configuration_client.ApiClient(configuration) as api_client:
    api_instance = affinidi_tdk_login_configuration_client.DenyListApi(api_client)

    request_json = [
        "group-1-name",
        "group-2-name"
    ]

    api_response = api_instance.unblock_groups(group_names_input=request_json)

unblockUsers

Unblock by User ID (DID).

Parameters

BlockedUsersInput [Object]

List of User IDs (DIDs) to block. See more here.

Module Imports
import { DenyListApi, Configuration, BlockedUsersInput } from '@affinidi-tdk/login-configuration-client'
import affinidi_tdk_login_configuration_client
Sample Codes
// Pass the projectScopedToken generated from AuthProvider package
const authConfiguration = new Configuration({
  apiKey: authProvider.fetchProjectScopedToken.bind(authProvider)
})

const api = new DenyListApi(authConfiguration)

const request: BlockedUsersInput = [
    "user-1-did",
    "user-2-did"
]

const { data } = await api.unblockUsers(request)
configuration = affinidi_tdk_login_configuration_client.Configuration()
# Pass the projectScopedToken generated from AuthProvider package
configuration.api_key['ProjectTokenAuth'] = projectScopedToken

with affinidi_tdk_login_configuration_client.ApiClient(configuration) as api_client:
    api_instance = affinidi_tdk_login_configuration_client.DenyListApi(api_client)

    request_json = [
        "user-1-did",
        "user-2-did"
    ]

    api_response = api_instance.unblock_users(blocked_users_input=request_json)

AllowList API

Used to allow groups and users to grant access on services like Affinidi Login when users are authenticating.

allowGroups

Allows users by group.

Parameters

GroupNamesInput [Object]

List of groups to allow. See more here.

Module Imports
import { AllowListApi, Configuration, GroupNamesInput } from '@affinidi-tdk/login-configuration-client'
import affinidi_tdk_login_configuration_client
Sample Codes
// Pass the projectScopedToken generated from AuthProvider package
const authConfiguration = new Configuration({
  apiKey: authProvider.fetchProjectScopedToken.bind(authProvider)
})

const api = new AllowListApi(authConfiguration)

const request: GroupNamesInput = [
    "group-1",
    "group-2"
]

const { data } = await api.allowGroups(request)
configuration = affinidi_tdk_login_configuration_client.Configuration()
# Pass the projectScopedToken generated from AuthProvider package
configuration.api_key['ProjectTokenAuth'] = projectScopedToken

with affinidi_tdk_login_configuration_client.ApiClient(configuration) as api_client:
    api_instance = affinidi_tdk_login_configuration_client.AllowListApi(api_client)

    request_json = [
        "group-1",
        "group-2"
    ]

    api_response = api_instance.allow_groups(group_names_input=request_json)

disallowGroups

Disallow access to users by group.

Parameters

GroupNamesInput [Object]

List of groups to disallow. See more here.

Module Imports
import { AllowListApi, Configuration, GroupNamesInput } from '@affinidi-tdk/login-configuration-client'
import affinidi_tdk_login_configuration_client
Sample Codes
// Pass the projectScopedToken generated from AuthProvider package
const authConfiguration = new Configuration({
  apiKey: authProvider.fetchProjectScopedToken.bind(authProvider)
})

const api = new AllowListApi(authConfiguration)

const request: GroupNamesInput = [
    "group-1",
    "group-2"
]

const { data } = await api.disallowGroups(request)
configuration = affinidi_tdk_login_configuration_client.Configuration()
# Pass the projectScopedToken generated from AuthProvider package
configuration.api_key['ProjectTokenAuth'] = projectScopedToken

with affinidi_tdk_login_configuration_client.ApiClient(configuration) as api_client:
    api_instance = affinidi_tdk_login_configuration_client.AllowListApi(api_client)

    request_json = [
        "group-1",
        "group-2"
    ]

    api_response = api_instance.disallow_groups(group_names_input=request_json)

listAllowedGroups

Get list of allowed groups.

Parameters

pageToken [String]

Used for pagination.

Module Imports
import { AllowListApi, Configuration } from '@affinidi-tdk/login-configuration-client'
import affinidi_tdk_login_configuration_client
Sample Codes
// Pass the projectScopedToken generated from AuthProvider package
const authConfiguration = new Configuration({
  apiKey: authProvider.fetchProjectScopedToken.bind(authProvider)
})

const api = new AllowListApi(authConfiguration)

const { data } = await api.listAllowedGroups()
configuration = affinidi_tdk_login_configuration_client.Configuration()
# Pass the projectScopedToken generated from AuthProvider package
configuration.api_key['ProjectTokenAuth'] = projectScopedToken

with affinidi_tdk_login_configuration_client.ApiClient(configuration) as api_client:
    api_instance = affinidi_tdk_login_configuration_client.AllowListApi(api_client)

    api_response = api_instance.list_allowed_groups()