// Path: src/main/java/org/dmfs/oauth2/client/OAuth2Scope.java
// public interface OAuth2Scope
// {
//     /**
//      * Returns whether this scope is empty.
//      *
//      * @return <code>true</code> if this scope is empty, <code>false</code> otherwise.
//      */
//     boolean isEmpty();
// 
//     /**
//      * Returns whether this scope contains the given scope token or not.
//      *
//      * @param token
//      *         The scope token to check for.
//      *
//      * @return <code>true</code> if the scope token is contained in this scope, <code>false</code> otherwise.
//      */
//     boolean hasToken(String token);
// 
//     /**
//      * Returns the number of tokens in this {@link OAuth2Scope}.
//      *
//      * @return The number of tokens in this {@link OAuth2Scope}.
//      */
//     int tokenCount();
// 
//     /**
//      * Returns a string version of this scope as described in <a href="https://tools.ietf.org/html/rfc6749#section-3.3">RFC 6749, section 3.3</a>, i.e. a list
//      * of scope tokens separated by spaces.
//      *
//      * @return A String containing a list scope tokens, separated by spaces, or an empty String if {@link #isEmpty()} returns <code>true</code>.
//      */
//     String toString();
// }


import org.dmfs.oauth2.client.OAuth2Scope;
import org.dmfs.rfc3986.Uri;
import org.dmfs.rfc3986.parameters.ParameterType;
import org.dmfs.rfc3986.parameters.parametertypes.BasicParameterType;
import org.dmfs.rfc3986.parameters.valuetypes.TextValueType;
import org.dmfs.rfc5545.Duration;
/*
 * Copyright 2017 dmfs GmbH
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.dmfs.oauth2.client.utils;



/**
 * A collection of parameter types as specified in <a href="https://tools.ietf.org/html/rfc6749">RFC 6749</a>.
 *
 * @author Marten Gajda
 */
public final class Parameters
{
    public final static ParameterType<CharSequence> ACCESS_TOKEN = new BasicParameterType<>("access_token", TextValueType.INSTANCE);

    public final static ParameterType<CharSequence> AUTH_CODE = new BasicParameterType<>("code", TextValueType.INSTANCE);

    public final static ParameterType<CharSequence> CLIENT_ID = new BasicParameterType<>("client_id", TextValueType.INSTANCE);

    public final static ParameterType<CharSequence> CODE_CHALLENGE = new BasicParameterType<>("code_challenge", TextValueType.INSTANCE);

    public final static ParameterType<CharSequence> CODE_CHALLENGE_METHOD = new BasicParameterType<>("code_challenge_method", TextValueType.INSTANCE);

    public final static ParameterType<Duration> EXPIRES_IN = new BasicParameterType<>("expires_in", new DurationValueType());

    public final static ParameterType<Uri> REDIRECT_URI = new BasicParameterType<>("redirect_uri", new UriValueType());

    public final static ParameterType<CharSequence> RESPONSE_TYPE = new BasicParameterType<>("response_type", TextValueType.INSTANCE);

// Path: src/main/java/org/dmfs/oauth2/client/OAuth2Scope.java
// public interface OAuth2Scope
// {
//     /**
//      * Returns whether this scope is empty.
//      *
//      * @return <code>true</code> if this scope is empty, <code>false</code> otherwise.
//      */
//     boolean isEmpty();
// 
//     /**
//      * Returns whether this scope contains the given scope token or not.
//      *
//      * @param token
//      *         The scope token to check for.
//      *
//      * @return <code>true</code> if the scope token is contained in this scope, <code>false</code> otherwise.
//      */
//     boolean hasToken(String token);
// 
//     /**
//      * Returns the number of tokens in this {@link OAuth2Scope}.
//      *
//      * @return The number of tokens in this {@link OAuth2Scope}.
//      */
//     int tokenCount();
// 
//     /**
//      * Returns a string version of this scope as described in <a href="https://tools.ietf.org/html/rfc6749#section-3.3">RFC 6749, section 3.3</a>, i.e. a list
//      * of scope tokens separated by spaces.
//      *
//      * @return A String containing a list scope tokens, separated by spaces, or an empty String if {@link #isEmpty()} returns <code>true</code>.
//      */
//     String toString();
// }


// Path: src/main/java/org/dmfs/oauth2/client/utils/Parameters.java
import org.dmfs.oauth2.client.OAuth2Scope;
import org.dmfs.rfc3986.Uri;
import org.dmfs.rfc3986.parameters.ParameterType;
import org.dmfs.rfc3986.parameters.parametertypes.BasicParameterType;
import org.dmfs.rfc3986.parameters.valuetypes.TextValueType;
import org.dmfs.rfc5545.Duration;

/*
 * Copyright 2017 dmfs GmbH
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.dmfs.oauth2.client.utils;



/**
 * A collection of parameter types as specified in <a href="https://tools.ietf.org/html/rfc6749">RFC 6749</a>.
 *
 * @author Marten Gajda
 */
public final class Parameters
{
    public final static ParameterType<CharSequence> ACCESS_TOKEN = new BasicParameterType<>("access_token", TextValueType.INSTANCE);

    public final static ParameterType<CharSequence> AUTH_CODE = new BasicParameterType<>("code", TextValueType.INSTANCE);

    public final static ParameterType<CharSequence> CLIENT_ID = new BasicParameterType<>("client_id", TextValueType.INSTANCE);

    public final static ParameterType<CharSequence> CODE_CHALLENGE = new BasicParameterType<>("code_challenge", TextValueType.INSTANCE);

    public final static ParameterType<CharSequence> CODE_CHALLENGE_METHOD = new BasicParameterType<>("code_challenge_method", TextValueType.INSTANCE);

    public final static ParameterType<Duration> EXPIRES_IN = new BasicParameterType<>("expires_in", new DurationValueType());

    public final static ParameterType<Uri> REDIRECT_URI = new BasicParameterType<>("redirect_uri", new UriValueType());

    public final static ParameterType<CharSequence> RESPONSE_TYPE = new BasicParameterType<>("response_type", TextValueType.INSTANCE);

    public final static ParameterType<OAuth2Scope> SCOPE = new BasicParameterType<OAuth2Scope>("scope", new OAuth2ScopeValueType());