Search in sources :

Example 31 with Client

use of org.orcid.pojo.ajaxForm.Client in project ORCID-Source by ORCID.

the class DeveloperToolsController method getEmptyClient.

@RequestMapping(value = "/client.json", method = RequestMethod.GET)
@ResponseBody
public Client getEmptyClient(HttpServletRequest request) {
    Client emptyObject = new Client();
    emptyObject.setClientSecret(Text.valueOf(StringUtils.EMPTY));
    RedirectUri redirectUri = new RedirectUri();
    redirectUri.setValue(new Text());
    redirectUri.setType(Text.valueOf(RedirectUriType.SSO_AUTHENTICATION.value()));
    List<RedirectUri> set = new ArrayList<RedirectUri>();
    set.add(redirectUri);
    emptyObject.setRedirectUris(set);
    return emptyObject;
}
Also used : ArrayList(java.util.ArrayList) RedirectUri(org.orcid.pojo.ajaxForm.RedirectUri) Text(org.orcid.pojo.ajaxForm.Text) Client(org.orcid.pojo.ajaxForm.Client) RequestMapping(org.springframework.web.bind.annotation.RequestMapping) ResponseBody(org.springframework.web.bind.annotation.ResponseBody)

Aggregations

Client (org.orcid.pojo.ajaxForm.Client)31 Test (org.junit.Test)23 RedirectUri (org.orcid.pojo.ajaxForm.RedirectUri)21 ArrayList (java.util.ArrayList)14 BaseControllerTest (org.orcid.frontend.web.util.BaseControllerTest)14 Text (org.orcid.pojo.ajaxForm.Text)6 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)5 ResponseBody (org.springframework.web.bind.annotation.ResponseBody)5 OrcidClient (org.orcid.jaxb.model.clientgroup.OrcidClient)3 DBUnitTest (org.orcid.test.DBUnitTest)3 Rollback (org.springframework.test.annotation.Rollback)2 Transactional (org.springframework.transaction.annotation.Transactional)2 HashSet (java.util.HashSet)1 Produces (javax.ws.rs.Produces)1 Before (org.junit.Before)1 InvocationOnMock (org.mockito.invocation.InvocationOnMock)1 OrcidClientGroupManagementException (org.orcid.core.exception.OrcidClientGroupManagementException)1 OrcidClientGroup (org.orcid.jaxb.model.clientgroup.OrcidClientGroup)1 OrcidProfile (org.orcid.jaxb.model.message.OrcidProfile)1 ClientDetailsEntity (org.orcid.persistence.jpa.entities.ClientDetailsEntity)1