Search in sources :

Example 1 with BitbucketProfileDefinition

use of org.pac4j.oauth.profile.bitbucket.BitbucketProfileDefinition in project pac4j by pac4j.

the class BitbucketClient method clientInit.

@Override
protected void clientInit() {
    configuration.setApi(new BitBucketApi());
    configuration.setProfileDefinition(new BitbucketProfileDefinition());
    defaultLogoutActionBuilder((ctx, profile, targetUrl) -> RedirectAction.redirect("https://bitbucket.org/account/signout/"));
    super.clientInit();
}
Also used : BitBucketApi(org.pac4j.scribe.builder.api.BitBucketApi) BitbucketProfileDefinition(org.pac4j.oauth.profile.bitbucket.BitbucketProfileDefinition)

Example 2 with BitbucketProfileDefinition

use of org.pac4j.oauth.profile.bitbucket.BitbucketProfileDefinition in project pac4j by pac4j.

the class RunOAuth10Client method getClient.

@Override
protected IndirectClient getClient() {
    final OAuth10Configuration config = new OAuth10Configuration();
    config.setKey("bjEt8BMpLwFDqZUvp6");
    config.setSecret("NN6fVXRTcV2qYVejVLZqxBRqHgn3ygD4");
    config.setApi(new BitBucketApi());
    config.setProfileDefinition(new BitbucketProfileDefinition());
    final OAuth10Client client = new OAuth10Client();
    client.setCallbackUrl(PAC4J_BASE_URL);
    client.setConfiguration(config);
    return client;
}
Also used : BitBucketApi(org.pac4j.scribe.builder.api.BitBucketApi) BitbucketProfileDefinition(org.pac4j.oauth.profile.bitbucket.BitbucketProfileDefinition) OAuth10Client(org.pac4j.oauth.client.OAuth10Client) OAuth10Configuration(org.pac4j.oauth.config.OAuth10Configuration)

Aggregations

BitbucketProfileDefinition (org.pac4j.oauth.profile.bitbucket.BitbucketProfileDefinition)2 BitBucketApi (org.pac4j.scribe.builder.api.BitBucketApi)2 OAuth10Client (org.pac4j.oauth.client.OAuth10Client)1 OAuth10Configuration (org.pac4j.oauth.config.OAuth10Configuration)1