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

org.springframework.social.partnercenter.security.AzureADAuthOperations Maven / Gradle / Ivy

Go to download

A provider extension for Spring Social to enable connectivity with Microsoft and an API binding for Microsoft's Partner Center API.

There is a newer version: 10.11.0
Show newest version
package org.springframework.social.partnercenter.security;

import org.springframework.social.oauth2.AccessGrant;
import org.springframework.social.partnercenter.http.logging.LogLevel;
import org.springframework.util.MultiValueMap;

public interface AzureADAuthOperations {

	/**
	 * Exchange the authorization code for an access grant.
	 * @return the access grant.
	 */
	AccessGrant exchangeForAccess();
	/**
	 * Exchange the authorization code for an access grant.
	 * @param authorizationCode the authorization code returned by the provider upon user authorization
	 * @param additionalParameters any additional parameters to be sent when exchanging the authorization code for an access grant. Should not be encoded.
	 * @return the access grant.
	 */
	AccessGrant exchangeForAccess(String authorizationCode, MultiValueMap additionalParameters);

	/**
	 * Exchanges user credentials for an access grant using OAuth2's Resource Owner Credentials Grant (aka, "password" grant).
	 * @param username the user's username on the provider
	 * @param password the user's password on the provider
	 * @param additionalParameters any additional parameters to be sent when exchanging the credentials for an access grant. Should not be encoded.
	 * @return the access grant.
	 */
	AccessGrant exchangeCredentialsForAccess(String username, String password, MultiValueMap additionalParameters);

	/**
	 * Refreshes a previous access grant.
	 * @param additionalParameters any additional parameters to be sent when refreshing a previous access grant. Should not be encoded.
	 * @return the access grant.
	 */
	AccessGrant refreshAccess(MultiValueMap additionalParameters);

	/**
	 * Refreshes a previous access grant.
	 * @param refreshToken the refresh token from the previous access grant.
	 * @param additionalParameters any additional parameters to be sent when refreshing a previous access grant. Should not be encoded.
	 * @return the access grant.
	 */
	AccessGrant refreshAccess(String refreshToken, MultiValueMap additionalParameters);

	/**
	 * adds request and response logging to restTemplate
	 * @param logLevel level at which logging will be written
	 */
	void enableSlf4j(LogLevel logLevel);

	boolean isSlf4jEnabled();
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy