All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.vrap.rmf.base.client.oauth2.ClientCredentialsBuilder Maven / Gradle / Ivy

There is a newer version: 17.17.0
Show newest version

package io.vrap.rmf.base.client.oauth2;

import java.util.Objects;

public class ClientCredentialsBuilder {
    private String clientId;
    private String clientSecret;
    private String scopes;

    public ClientCredentialsBuilder() {
    }

    public ClientCredentialsBuilder withClientId(final String clientId) {
        this.clientId = clientId;
        return this;
    }

    public ClientCredentialsBuilder withClientSecret(final String clientSecret) {
        this.clientSecret = clientSecret;
        return this;
    }

    public ClientCredentialsBuilder withScopes(final String scopes) {
        this.scopes = scopes;
        return this;
    }

    public ClientCredentialsImpl build() {
        Objects.requireNonNull(this.clientId);
        Objects.requireNonNull(this.clientSecret);
        return new ClientCredentialsImpl(clientId, clientSecret, scopes);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy