001package com.box.sdkgen.box.oauth; 002 003/** Options of getAuthorizeUrl method */ 004public class GetAuthorizeUrlOptions { 005 006 /** Box API key used for identifying the application the user is authenticating with */ 007 public String clientId; 008 009 /** 010 * The URI to which Box redirects the browser after the user has granted or denied the application 011 * permission. This URI match one of the redirect URIs in the configuration of your application. 012 */ 013 public String redirectUri; 014 015 /** The type of response we would like to receive. */ 016 public String responseType; 017 018 /** 019 * A custom string of your choice. Box will pass the same string to the redirect URL when 020 * authentication is complete. This parameter can be used to identify a user on redirect, as well 021 * as protect against hijacked sessions and other exploits. 022 */ 023 public String state; 024 025 /** 026 * A space-separated list of application scopes you'd like to authenticate the user for. This 027 * defaults to all the scopes configured for the application in its configuration page. 028 */ 029 public String scope; 030 031 public GetAuthorizeUrlOptions() {} 032 033 protected GetAuthorizeUrlOptions(Builder builder) { 034 this.clientId = builder.clientId; 035 this.redirectUri = builder.redirectUri; 036 this.responseType = builder.responseType; 037 this.state = builder.state; 038 this.scope = builder.scope; 039 } 040 041 public String getClientId() { 042 return clientId; 043 } 044 045 public String getRedirectUri() { 046 return redirectUri; 047 } 048 049 public String getResponseType() { 050 return responseType; 051 } 052 053 public String getState() { 054 return state; 055 } 056 057 public String getScope() { 058 return scope; 059 } 060 061 public static class Builder { 062 063 protected String clientId; 064 065 protected String redirectUri; 066 067 protected String responseType; 068 069 protected String state; 070 071 protected String scope; 072 073 public Builder clientId(String clientId) { 074 this.clientId = clientId; 075 return this; 076 } 077 078 public Builder redirectUri(String redirectUri) { 079 this.redirectUri = redirectUri; 080 return this; 081 } 082 083 public Builder responseType(String responseType) { 084 this.responseType = responseType; 085 return this; 086 } 087 088 public Builder state(String state) { 089 this.state = state; 090 return this; 091 } 092 093 public Builder scope(String scope) { 094 this.scope = scope; 095 return this; 096 } 097 098 public GetAuthorizeUrlOptions build() { 099 return new GetAuthorizeUrlOptions(this); 100 } 101 } 102}