Search in sources :

Example 1 with HttpBasedServiceCredential

use of org.apereo.cas.authentication.HttpBasedServiceCredential in project cas by apereo.

the class KryoTranscoderTests method internalProxyTest.

private void internalProxyTest(final String proxyUrl) throws MalformedURLException {
    final Credential proxyCredential = new HttpBasedServiceCredential(new URL(proxyUrl), RegisteredServiceTestUtils.getRegisteredService("https://.+"));
    final TicketGrantingTicket expectedTGT = new MockTicketGrantingTicket(USERNAME);
    expectedTGT.grantServiceTicket(ST_ID, null, null, false, true);
    assertEquals(expectedTGT, transcoder.decode(transcoder.encode(expectedTGT)));
}
Also used : MockTicketGrantingTicket(org.apereo.cas.mock.MockTicketGrantingTicket) UsernamePasswordCredential(org.apereo.cas.authentication.UsernamePasswordCredential) Credential(org.apereo.cas.authentication.Credential) HttpBasedServiceCredential(org.apereo.cas.authentication.HttpBasedServiceCredential) HttpBasedServiceCredential(org.apereo.cas.authentication.HttpBasedServiceCredential) TicketGrantingTicket(org.apereo.cas.ticket.TicketGrantingTicket) MockTicketGrantingTicket(org.apereo.cas.mock.MockTicketGrantingTicket) URL(java.net.URL)

Aggregations

URL (java.net.URL)1 Credential (org.apereo.cas.authentication.Credential)1 HttpBasedServiceCredential (org.apereo.cas.authentication.HttpBasedServiceCredential)1 UsernamePasswordCredential (org.apereo.cas.authentication.UsernamePasswordCredential)1 MockTicketGrantingTicket (org.apereo.cas.mock.MockTicketGrantingTicket)1 TicketGrantingTicket (org.apereo.cas.ticket.TicketGrantingTicket)1