Search in sources :

Example 1 with ClientType

use of com.hw.helper.ClientType in project mt-auth by publicdevop2019.

the class ClientUtility method getInvalidClientAsResource.

public static Client getInvalidClientAsResource(String... resourceIds) {
    Client client = getClientRaw(resourceIds);
    Set<ClientType> strings = new HashSet<>();
    strings.add(ClientType.FRONTEND_APP);
    strings.add(ClientType.FIRST_PARTY);
    client.setTypes(strings);
    client.setResourceIndicator(true);
    return client;
}
Also used : ClientType(com.hw.helper.ClientType) Client(com.hw.helper.Client) HashSet(java.util.HashSet)

Example 2 with ClientType

use of com.hw.helper.ClientType in project mt-auth by publicdevop2019.

the class ClientUtility method getClientAsResource.

public static Client getClientAsResource(String... resourceIds) {
    Client client = getClientRaw(resourceIds);
    client.setResourceIndicator(true);
    Set<ClientType> strings = new HashSet<>();
    strings.add(ClientType.BACKEND_APP);
    strings.add(ClientType.FIRST_PARTY);
    client.setTypes(strings);
    return client;
}
Also used : ClientType(com.hw.helper.ClientType) Client(com.hw.helper.Client) HashSet(java.util.HashSet)

Example 3 with ClientType

use of com.hw.helper.ClientType in project mt-auth by publicdevop2019.

the class ClientUtility method getClientAsNonResource.

/**
 * get client as non resource.
 *
 * @return different GRANT_TYPE_PASSWORD client obj
 */
public static Client getClientAsNonResource(String... resourceIds) {
    Client client = getClientRaw(resourceIds);
    client.setResourceIndicator(false);
    Set<ClientType> types = new HashSet<>();
    types.add(ClientType.BACKEND_APP);
    types.add(ClientType.FIRST_PARTY);
    client.setTypes(types);
    return client;
}
Also used : ClientType(com.hw.helper.ClientType) Client(com.hw.helper.Client) HashSet(java.util.HashSet)

Aggregations

Client (com.hw.helper.Client)3 ClientType (com.hw.helper.ClientType)3 HashSet (java.util.HashSet)3